Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Apache Maven
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Build lifecycles === The build lifecycle is a list of named ''phases'' that can be used to give order to goal execution. One of Maven's three standard lifecycles is the ''default lifecycle'', which includes the following phases, performed in the order listed:<ref>{{cite web|url=https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference|title=Maven β Introduction to the Build Lifecycle|first=Brett|last=Porter}}</ref> * validate * generate-sources * process-sources * generate-resources * process-resources * compile * process-test-sources * process-test-resources * test-compile * test * package * install * deploy Goals provided by plugins can be associated with different phases of the lifecycle. For example, by default, the goal <code>compiler:compile</code> is associated with the <code>compile</code> phase, while the goal <code>surefire:test</code> is associated with the <code>test</code> phase. When the <code>mvn test</code> command is executed, Maven runs all goals associated with each of the phases up to and including the <code>test</code> phase. In such a case, Maven runs the <code>resources:resources</code> goal associated with the <code>process-resources</code> phase, then <code>compiler:compile</code>, and so on until it finally runs the <code>surefire:test</code> goal. Maven also has standard phases for cleaning the project and for generating a project site. If cleaning were part of the default lifecycle, the project would be cleaned every time it was built. This is clearly undesirable, so cleaning has been given its own lifecycle. Standard lifecycles enable users new to a project the ability to accurately build, test and install every Maven project by issuing the single command <code>mvn install</code>. By default, Maven packages the POM file in generated JAR and WAR files. Tools like diet4j<ref>{{cite web|url=http://diet4j.org/|title=diet4j - put Java JARs on a diet, and load maven modules as needed}}</ref> can use this information to recursively resolve and run Maven modules at run-time without requiring an "uber"-jar that contains all project code.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)