Install the Sakai master project
Sakai makes use of Maven's Project Object Model to provide an XML representation of basic project information covering dependency management, build targets, external repositories, issue tracking, mailing lists, reporting plugins, developer bios, etc. A top-level master pom.xml file located in the
/master project acts as a parent for other Sakai pom.xml files. If you are building Sakai for the first time you should install the master project first by issuing the
install goals from the
/master project folder.
Install and deploy Sakai
Once you have built the master pom, issue the following Maven goals from the top-level Sakai source directory:
-Dmaven.tomcat.home specifies Tomcat's location. -Dsakai.home specifies the location of the sakai properties file(s) within Tomcat. -Djava.net.preferIPv4Stack can help resolve issues with Maven hanging while attempting to pull from certain repositories. These can be omitted if specified in Maven's
settings.xml file (version 2.x) or in MAVEN_OPTS (version 3.x).
Your first Sakai build will take some time as Maven downloads and stocks your local
.m2/repository with missing dependencies while performing the build and deploying
.jar files to Tomcat's
$CATALINA_HOME/shared/lib folders. If during this process Maven reports that the build failed read the accompanying error message carefully to troubleshoot the issue (see the Troubleshooting section).
You can also issue
mvn clean install sakai:deploy from any sakai project module top-level folder in order to build and deploy portions of Sakai such as individual tools.
Maven Goal Options
There are a number of other ways to build and deploy Sakai using Maven:
Print debug output
Build and Deploy in offline mode
If your local repository contains all Sakai project dependencies, you can run Maven "offline" by adding the
Skip unit tests
There may be occasions when you want to build and deploy Sakai without executing the set of unit tests that accompany many of the Sakai modules. If so add
-Dmaven.test.skip=true to the goals you issue:
Perform a "framework" build
The framework build profile triggers a Sakai build minus it's tool set.
The -Pframework build profile is no longer supported in Sakai 10.x versions.
Perform a "cafe" build
The programmers' cafe build profile is favored by many developers new to Sakai as well as those developing or testing new capabilities.
The -Pcafe build profile is no longer supported in Sakai 10.x versions.