Maven project generator plugin for Sakai OAE
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

What is it?

It's the maven plugin for Sakai OAE.


1. Download and install Maven 2 or 3

2. Add the pluginGroups and repositories entry to your ~/.m2/settings.xml file. Here is an example:

<settings xmlns=""

          <name>Sakai repository</name>
          <name>Sakai Plugins</name>

These entries allow the plugin to automagically detect the oae: plugin, and be able to run independenty from any existing Sakai pom.xml file.

How to use it

Run mvn oae:help from the command-line and the plugin should be able to take you from there.

Extending the packaging / scaffolding template

Creating a new scaffolding goal

To create a new goal for scaffolding, you can extend the AbstractTemplateExtractorPlugin and follow the javadocs. Don't forget to add the standard mojo doclets like @goal and '@requiresProject false'. See OsgiEmptyMojo as a demonstration.

Package template

  • The template archive must be stored in a tar file.
  • Filename expression: A simple filename expression that can be used to name files dynamically based on input parameters.
  • *.vtdl files: A file that should be run through the velocity template processor. The ".vtlg" at the end is automatically choppoed off of the file extension after it is processed.

For example:

Consider file /tmp/template.tar that has the following content:


and the file file.txt.vtlg has text: "ArtifactId: $artifactId".

If you execute mvn oae:osgi -DtemplateUrl=file:///tmp/template.tar -DartifactId=todo, then the generated content in the working directory will be:

The resulting content is: todo/src/main/java/file-todo.txt

and the file file-todo.txt has content: "ArtifactId: todo"

Registering in the help directory

To register a new goal into the mvn oae:help directory, you must place a class that implements HelpProvider inside the package org.sakaiproject.oae.maven.plugins. For simplicity, we use convention over configuration here. Your HelpProvider class must have static method "createHelp()" to provide the help contents, please see the HelpProvider javadoc for more info. If you extend AbstractTemplateExtractorPlugin and placed it in the proper package, then this is all taken care of for you.