All notes
Mav

Quick Start

maven.apache.org: maven in 5 minutes.



mvn --version

# Create a project.
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

# Build
cd my-app
mvn package -Dmaven.test.skip=true # or -DskipTests
# Test the newly compiled and packaged JAR with the following command:
java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App

# Install third-party jars
mvn install:install-file -Dfile=jodconverter-core-3.0-SNAPSHOT.jar -DgroupId=org.artofsolving.jodconverter -DartifactId=jodconverter-core -Dversion=3.0-SNAPSHOT -Dpackaging=jar

# Run WAR in command line
# You first need to download jetty-runner from http://repo2.maven.org/maven2/org/mortbay/jetty/jetty-runner/
java -jar jetty-runner.jar my.war

# Generates site documentation for this project
mvn site

JAVA_HOME, M2 and M2_HOME