Maven (Apache)

Apache Maven is a plugin-based build automation tool, similar in purpose to GNU Make or Apache Ant. It is most commonly used with Java projects, but also supports other languages such as .NET and C/C++.

Availability & Compatibility


Version Oakley
3.0.4 X*
* Current default version

You can use module spider maven to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.


There are no restrictions for this software; any OSC user may make use of the Apache Maven.

Publisher/Vendor/Repository and License Type

Apache software foundation, Open source



To use Maven, load the the "maven" module with the following command.

module load maven

To test that the install worked correctly, run "mvn --version". You should see output similar to that shown below:

$ mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: /usr/local/maven/3.0.4
Java version: 1.6.0_29, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-1.6.0-sun-
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-131.17.1.el6.x86_64", arch: "amd64", family: "unix"

Basic Usage

Once the module is loaded, you can use Maven just as you would on your local machine. For example, the session below illustrates initializing a new project call "my-app":

$ mvn archetype:generate -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value:
[INFO] Parameter: packageName, Value:
[INFO] Parameter: package, Value:
[INFO] Parameter: artifactId, Value: my-app
[INFO] Parameter: basedir, Value: /nfs/12/jmccance
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: /nfs/12/jmccance/my-app
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.429s
[INFO] Finished at: Fri Jun 08 14:30:57 EDT 2012
[INFO] Final Memory: 9M/361M
[INFO] ------------------------------------------------------------------------

Further Reading

See Also