Building Sakai from source with Maven -- from subdirectories (or, one module or project at a time)

Once your maven is set up properly, you can issue maven commands from the top-level directory of your source tree, to build and to deploy Sakai/OSPortfolio:

maven bld dpl

The "build" portion compiles your source code (primarily java) from items in the "src" directories, and plops the appropriate results into the "target" directories. The "deploy" portion moves those results into the Tomcat directory structure in order to serve up your Sakai/OSP instance.

But when you're tweaking just a portion of the source code -- for example, the providers -- you shouldn't have to wait for a half hour to rebuild the entire tree, right? It's just a few little changes local to one project of one module... You should be able to quickly update just the compiled items that depend on those few items that have changed in your subtree, and then deploy those, in a matter of seconds...

"We have the technology. We can rebuild it!"

To do that, you need the Sakai plugin for maven. (You also need to set up your maven as outlined in the normal setup docs):

Once you've done that, your maven will behave nicely, even from inside subdirectories of your source tree. You can tweak a few files from one project, then issue the build-and-deploy command from there, and you're ready to restart Tomcat (in a matter of seconds, instead of half an hour)...

This applies to version 2.4 as of July 2007.

OSP is an open-source electronic portfolio built into Sakai, which is an open-source CLE (collaborative learning environment).