Dashboard > SakaiPedia > Using Maven 1
  SakaiPedia Log In | Signup View a printable version of the current page.  
  Using Maven 1
Added by Mark J. Norton, last edited by Mark J. Norton on Dec 26, 2006  (view change)
Labels: 
(None)

Maven is a Java build tool that Sakai uses to create modules and service JARs. The early stages of Sakai development were done using Maven 1.02 (Sakai 2.3 and earlier). Sakai is moving to Maven 2.x as of the 2.4 release. See Using Maven 2 for more information.

To use Maven properly in Sakai development, be sure to install the plug-in using the following command:

Maven Plugin Install
maven plugin:download -DgroupId=sakaiproject -DartifactId=sakai -Dversion=2.1

Repositories

The correct repository to use in your build.properties file (post 2.1) is:

https://source.sakaiproject.org/maven/

iBiblio Weirdness - Charles Severance

Talking to other folks, a suggestion was made to add a mirror of
ibiblio to our repo list in case ibiblio has a hiccup.

http://horde.planetmirror.com/pub/maven/

Is one folks have used. I for one am taking the advice

maven.repo.remote=http://www.ibiblio.org/maven/,http://
cvs.sakaiproject.org/maven/,http://horde.planetmirror.com/pub/maven/

Version

Sakai currently (as of QA release Sakai 2.0.1 002 ) uses Maven 1.0.2 (not Maven 1.1.x or Maven 2.x).

Maven Repositories - Zach Thomas

I just want to add that it is super super easy to create your own
Maven remote repository. We finally decided to look into this after
we had added a few jars to the build that were unique to us.

All you do is create a directory under any web server you happen to
have access to, and copy whichever folders and files you want from
your .maven/repository directory.

Then add the url to the maven.repo.remote property in your
build.properties file. I only wish I had done it sooner.

We don't have a full mirror, but it's not a bad idea. I enjoy
downloading files at 4 megabytes per second.

Using Java 1.5 in Maven 1.02

While the newer versions of Maven know about Java 5 automatically, the older versions assume 1.4. Add the following line:

maven.compile.target=1.5

to your build.properties file. See also maven properties.

Skipping JUnit Tests

To ignore unit test failures: "-Dmaven.test.failure.ignore=true"

Tell Maven to not run the unit tests at all: "-Dmaven.test.skip=true"

Debugging Maven Failures

Sometimes maven can fail in very cryptic ways. More information can be had by running maven using the "-X test" flag. This is a test/verbose mode that show a lot more data, inluding supressed exceptions.

Hint: Don't use Maven 1.1 Beta 2 since it won't work with Sakai
I needed to downgrade to version 1.0.2 to be able to compile the sakai sources.

Site running on a free Atlassian Confluence Open Source Project License granted to Sakai Foundation. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators