Sakai/OSPortfolio

ID #1042

Sakai development terminology: Java, Maven

Java Terminology

An applet is a mini-program that only a Web browser can execute (client-side programming).

A servlet is a mini-program that only a Java-based Web server can execute (server-side programming).

A jar file (java archive) is a library for other java code to reference.

A war file (web archive) is server-side code to either handle user-facing web data (process web forms, generate html) or to provide a back-stage utilities (database interaction, business logic).

An ear file (enterprise archive) is not used in Sakai.

Maven Terminology

Every project directory has its own project.xml to tell Maven how to build that project:

<project>
<groupId>folder-name-here</groupId>
<artifactId>item-name-here</artifactId>
<currentVersion>1.0</currentVersion>
...
</project>

The GROUPID is the name of the folder used within the maven repository; the ARTIFACTID is the name of the item created within that folder (including the version number, as part of the file name) -- here, we'd create "folder-name-here/.../item-name-here-1.0" witin ~/.maven/repository.

<project>
...
<properties>
<deploy.type>jar</deploy.type>
</properties>
</project>

The deploy.type tells maven where to put the artifact:

  • jar: make a .jar library within the maven repository for other java classes to reference later
  • war: puts the .war artifact under Tomcat's webapps directory
  • shared: artifact winds up in Tomcat's shared/lib directory for run-time use (service API)
  • components: creates a war file for the sakai-specfic 'components' folder under Tomcat

Last update: 2007-08-30 01:37
Author: will trillich
Revision: 1.0

Print this record Print this record
Send to a friend Send to a friend
Show this as PDF file Show this as PDF file
Export as XML-File Export as XML-File

Please rate this entry:

Average rating: 5 out of 5 (24 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry