Created
February 25, 2018 07:49
-
-
Save jvihrial/d15a655318747303de253f01cd08e2c5 to your computer and use it in GitHub Desktop.
MAVEN commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
General help: | |
https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html | |
1. Create a project: | |
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false | |
2. Build | |
mvn package | |
or | |
mvn clean compile | |
3. Run the jar: | |
java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App | |
or call the main class with maven (App is the class name) | |
mvn exec:java -Dexec.mainClass="com.mycompany.app.App" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment