M2_HOME
with a path such as:PATH
, add:/usr/local/Cellar/maven/3.5.2/libexec
/usr/local/Cellar/maven/3.5.2/libexec/bin
Sub-command | Description |
---|---|
validate | Validate the project is correct and all necessary information is available |
initialize | initialize build state, (for example : set properties, create directories,… etc) |
generate-sources | generate any source code for inclusion in compilation |
process-sources | process the source code (for example : filter any values) |
generate-resources | generate resources for inclusion in the package. |
process-resources | copy and process the resources into the destination directory, ready for packaging. |
compile | compile the source code of the project. |
process-classes | post-process the generated files from compilation (for example : to do bytecode enhancement on Java classes) |
generate-test-sources | generate any test source code for inclusion in compilation. |
process-test-sources | process the test source code (for example : to filter any values) |
generate-test-resources | create resources for testing. |
process-test-resources | copy and process the resources into the test destination directory. |
test-compile | compile the test source code into the test destination directory. |
process-test-classes | post-process the generated files from test compilation (for example : to do bytecode enhancement on Java classes) |
test | run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed. |
prepare-package | perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package. |
package | Take the compiled code and package it in its distributable format (for example : jar, war, …etc) |
pre-integration-test | perform actions required before integration tests are executed. This may involve things such as setting up the required environment. |
integration-test | process and deploy the package if necessary into an environment where integration tests can be run. |
post-integration-test | perform actions required after integration tests have been executed. This may including cleaning up the environment. |
verify | run any checks to verify the package is valid and meets quality criteria. |
install | install the package into the local repository, for use as a dependency in other projects locally. |
deploy | done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects. |
Sub-command | Description |
---|---|
pre-clean | Executes processes needed prior to the actual project cleaning |
clean | Remove all files generated by the previous build |
post-clean | Execute processes needed to finalize the project cleaning |
Sub-command | Description |
---|---|
pre-site | Executes processes needed prior to the actual project site generation. |
site | Generates the project’s site documentation. |
post-site | Executes processes needed to finalize the site generation, and to prepare for site deployment. |
site-deploy | Deploys the generated site documentation to the specified web server. |
/usr/share/maven
mvn -version
.whereis
command :/usr/share/maven
. No configuration is needed.apache-maven-3.1.1-bin.tar.gz
. Extracts it, ~/. bash_profile
– create this file if doesn’t exist.~/.m2/repository
to /Users/mkyong//maven/repo/
.