Updates to the Sakai Maven Archetype (including a new name)

A quick update that I’ve released a new version of the archetype for Sakai. I’ve renamed the artifactId to sakai-wicket-maven-archetype so that we can accommodate more archetypes within Sakai. One of the great things about the Sakai CLE is you can use almost any Java framework to present your view, and we want to nurture that by allowing other developers to create archetypes that best represent how to create a Sakai app in their preferred framework.

The command to use the archetype to generate a project is slightly different:

mvn archetype:generate -DarchetypeGroupId=org.sakaiproject.maven-archetype -DarchetypeArtifactId=sakai-wicket-maven-archetype -DarchetypeVersion=1.0 -DarchetypeRepository=https://source.sakaiproject.org/maven2/

The version is still 1.0.

I also tidied a few bits and pieces up. Maven automatically generates the parent block for multi module projects, and if it can’t do this because one already exists, then it prints a log message which actually looks like an error.

[INFO] Parent element not overwritten in /private/tmp/sample-project/api/pom.xml

So I removed the parent blocks in the sub modules and let Maven create them.

In addition, Maven seems to have a problem with using properties, but it’s not a problem since it can resolve them anyway and everything works out fine. Weird.

[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 48,column 42] : ${wicket.version} is not a valid reference.

So to make it even cleaner, I removed the properties and just set the versions on the artifacts directly.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s