Maven: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 35: | Line 35: | ||
Generate any test source code to be included in compilation phase. | Generate any test source code to be included in compilation phase. | ||
10 process-test-sources | 10 process-test-sources | ||
Process the test source code, for example, filter any values. | |||
11 test-compile | 11 test-compile | ||
Compile the test source code into the test destination directory. | |||
12 process-test-classes | 12 process-test-classes | ||
Process the generated files from test code file compilation. | |||
13 test | 13 test | ||
Run tests using a suitable unit testing framework (Junit is one). | |||
14 prepare-package | 14 prepare-package | ||
Perform any operations necessary to prepare a package before the actual packaging. | |||
15 package | 15 package | ||
Take the compiled code and package it in its distributable format, such as a JAR, WAR, or EAR file. | |||
16 pre-integration-test | 16 pre-integration-test | ||
Perform actions required before integration tests are executed. For example, setting up the required environment. | |||
17 integration-test | 17 integration-test | ||
Process and deploy the package if necessary into an environment where integration tests can be run. | |||
18 post-integration-test | 18 post-integration-test | ||
Perform actions required after integration tests have been executed. For example, cleaning up the environment. | |||
19 verify | |||
19 | Run any check-ups to verify the package is valid and meets quality criteria. | ||
verify | 20 install | ||
Install the package into the local repository, which can be used as a dependency in other projects locally. | |||
Run any check-ups to verify the package is valid and meets quality criteria. | 21 deploy | ||
Copies the final package to the remote repository for sharing with other developers and projects. | |||
20 | |||
install | |||
Install the package into the local repository, which can be used as a dependency in other projects locally. | |||
21 | |||
Revision as of 21:12, 12 May 2020
Installation of ubuntu 20.04
Surprise nothing special
apt-get update apt-get install maven
Set Environment
In ~/.bashrc add
export M2_HOME=/usr/share/maven
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms256m -Xmx512m"
You can either log out or run the script with
. ~/.bashrc
Lifecyle
1 validate Validates whether project is correct and all necessary information is available to complete the build process. 2 initialize Initializes build state, for example set properties. 3 generate-sources Generate any source code to be included in compilation phase. 4 process-sources Process the source code, for example, filter any value. 5 generate-resources Generate resources to be included in the package. 6 process-resources Copy and process the resources into the destination directory, ready for packaging phase. 7 compile Compile the source code of the project. 8 process-classes Post-process the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes. 9 generate-test-sources Generate any test source code to be included in compilation phase. 10 process-test-sources Process the test source code, for example, filter any values. 11 test-compile Compile the test source code into the test destination directory. 12 process-test-classes Process the generated files from test code file compilation. 13 test Run tests using a suitable unit testing framework (Junit is one). 14 prepare-package Perform any operations necessary to prepare a package before the actual packaging. 15 package Take the compiled code and package it in its distributable format, such as a JAR, WAR, or EAR file. 16 pre-integration-test Perform actions required before integration tests are executed. For example, setting up the required environment. 17 integration-test Process and deploy the package if necessary into an environment where integration tests can be run. 18 post-integration-test Perform actions required after integration tests have been executed. For example, cleaning up the environment. 19 verify Run any check-ups to verify the package is valid and meets quality criteria. 20 install Install the package into the local repository, which can be used as a dependency in other projects locally. 21 deploy Copies the final package to the remote repository for sharing with other developers and projects.