Maven Java Plug-in Goals dIon Gillard Kurt Schrader
GoalDescription
java:prepare-filesystem Creates the directories necessary for compilation
java:compile

Compiles the Java source code for the project

The source code directory is specified in the build element of your project.xml file.

java:jar-resources

Copies any resources that must be present in the deployed JAR file, from the directory specified by maven.jarResources.basedir to the build directory, where class files are stored.

The maven.jar.resources.set property is used to determine which files from the base directory are included

java:jar Creates a jar file in the Maven build directory with the form ${project.id}-${project.currentVersion}.jar where the id and currentVersion are taken from the project.xml of the project being built.
jar:snapshot Creates a jar file in the Maven build directory with the form ${project.id}-YYYYMMDD.hhmmss.jar where
  • id - taken from the project.xml of the project being built
  • YYYYMMDD - The current year in 8 digit format
  • hhmmss - the current time in 6 digit format
jar:deploy-snapshot Deploy a snapshot jar to the remote repository
jar:deploy Deploy a jar to the remote repository. The jar is built using the java:jar goal
jar:install Install a jar into the local repository. The jar is built using the java:jar goal
jar:install-snapshot Install a jar into the local repository. The jar is built using the jar:snapshot goal and copied into the local repository as the -SNAPSHOT version.
clean This goal is a shortcut to the clean:clean goal
clean:clean Removes the maven.build.dir and maven.test.reportsDirectory directories