Maven2 mini guide

Creating a new project

mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=org.objectweb.petals -DartifactId=YOUR_PROJECT_NAME

Creating artefacts

SU

mvn archetype:create -DarchetypeGroupId=org.objectweb.petals -DarchetypeArtifactId=maven-archetype-petals-jbi-service-unit -DarchetypeVersion=1.0.0 -DgroupId=org.objectweb.petals -DartifactId=YOUR_SU_NAME -Dversion=1.0-SNAPSHOT

SA

mvn archetype:create -DarchetypeGroupId=org.objectweb.petals -DarchetypeArtifactId=maven-archetype-petals-jbi-service-assembly -DarchetypeVersion=1.0.0 -DgroupId=org.objectweb.petals -DartifactId=YOUR_SA_NAME -Dversion=1.0-SNAPSHOT

BC

SE

SL

Installing 3rd party JARs

mvn install:install-file
  -Dfile=<path-to-file>
  -DgroupId=<group-id>
  -DartifactId=<artifact-id>
  -Dversion=<version>
  -Dpackaging=<packaging>

You can add -DgeneratePom to generate a POM file or add -DpomFile= to provide one

Deploying artefacts to repository

Deploying a POM

mvn -N deploy:deploy-file
  -DrepositoryId=objectweb
  -Durl=scp://jupiter.objectweb.org:/var/lib/gforge/chroot/home/groups/maven/htdocs/maven2
  -DpomFile=pom.xml
  -Dfile=pom.xml

Where -N is the option for non recursive deployment

Deploying a JAR

Deploying source JAR

Same as for deploying JAR plus -Dclassifier=sources