maven commonly used commands
1, create a maven web project:
Enter the file you want to create a project folder, enter the command:
mvn archetype:generate -DgroupId=com.cmos -DartifactId=zhyyt -Dversion=0.01-SNAPSHOT -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeCatalog=internal
This requires following a few commands into the project directory, and execute the same path pom.xml file level.
2, clear the target folder within the generated class and jar files
mvn clean
3, java source code compiled into class files
mvn compile
4, packing
mvn package
package performed automatically compile command
5, the project labeled jar package into the local repository of maven
mvn install
6, the source code package
mvn source:jar
7, skip the test
When executing the command maven added:
-Dmaven.test.skip=true
8, explicit activation profile
When executing the command maven added:
-P test
Where the test is id profile, enabling environment sub-profiles package, configuration profiles can be achieved in sub-jenkins environmental release.
9, execute mvn install, then upload jar file to PW (not tried)
mvn deploy