Building Maven Projects

You can build Maven projects on the command line, or you can use Maven build and unit test projects in an IDE.

For information about building projects using Maven in the Eclipse IDE, see http://maven.apache.org/eclipse-plugin.html.

On the command line, run:
mvn clean install
As the project builds, you see progress messages:
[INFO] Scanning for projects...   
Downloading: http://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/
2.3.7/maven-bundle-plugin-2.3.7.pom   
Downloaded: http://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/   
2.3.7/maven-bundle-plugin-2.3.7.pom    
(4 KB at 15.0 KB/sec)
[…]
 [INFO] Installing C:\ZMobiliser\customStateExample\customState\target\customState-1.0-SNAPSHOT.jar
to C:\Users\I824993\.\m2\repository\com\sap\example\customState\1.0-SNAPSHOT\customState-1.0-SNAPSHOT.jar
[INFO] Installing C:\ZMobiliser\customStateExample\customState\pom.xml to 
C:\Users\I824993\.m2\repository\com\sap\example\customState\1.0-SNAPSHOT\customState-1.0-SNAPSHOT.pom
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:install (default-install) @ customState ---   
[INFO] Local OBR update disabled (enable with -DobrRepository)   
[INFO] ------------------------------------------------------------------------   
[INFO] BUILD SUCCESS   
[INFO] ------------------------------------------------------------------------   
[INFO] Total time: 36.332s   
[INFO] Finished at: Mon Oct 29 10:48:50 PDT 2012   
[INFO] Final Memory: 11M/242M   
[INFO] ------------------------------------------------------------------------
The bundle JAR file is saved in the /className/target directory; its name is derived from the Maven project artifactId and version. For this example, the filename is customState-1.0-SNAPSHOT.jar.