https://maven.apache.org/what-is-maven.html
https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
archetype:generatearchetype - plugingenerate - goalgenerate call has created a standard directory layout. Like:mvn packagepackage is a phase (not a goal as archetype:generate)maven-compiler-plugin should be properly configured, because by default it uses Java 8.validate: validate the project is correct and all necessary information is availablecompile: compile the source code of the projecttest: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployedpackage: take the compiled code and package it in its distributable format, such as a JAR.integration-test: process and deploy the package if necessary into an environment where integration tests can be runverify: run any checks to verify the package is valid and meets quality criteriainstall: install the package into the local repository, for use as a dependency in other projects locallydeploy: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.clean: cleans up artifacts created by prior buildssite: generates site documentation for this projectmvn clean dependency:copy-dependencies packagehttps://maven.apache.org/guides/getting-started/index.html
mvn archetype:generatemvn -B archetype:generate -DgroupId=my.company.app DartifactId=my-app -DarchetypeVersion=1.4 -DarchetypeArtifactId=maven-archetype-quickstartpom.xmlartifactId myapp-1.0.jarmvn compilemvn testmvn test-compilemvn packagemvn install${user.home}/.m2/repository)configuration element applies the given parameters to every goal from the plugin/src/main/resources/src/test/resourcesInputStream in = getClass().getResourceAsStream(“/test.properties”);${<property_name>}${<property_name>}${project.name}${settings.<property_name>}${settings.localRepository}dependencies section in pom.xml lists all external dependenciestest or compile${user.home}/.m2/repository)mvn installpom.xmlsettings.xml. . .
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Three built-in build lifecycles:
The full Lifecycle reference.
Default lifecycle:
validate - validate the project is correct and all necessary information is availablecompile - compile the source code of the projecttest - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployedpackage - take the compiled code and package it in its distributable format, such as a JAR.verify - run any checks on results of integration tests to ensure quality criteria are metinstall - install the package into the local repository, for use as a dependency in other projects locallydeploy - done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.