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!
=== Plug-ins === Most of Maven's functionality is in [[plug-in (computing)|plug-in]]s. A plugin provides a set of goals that can be executed using the command <code>mvn [plugin-name]:[goal-name]</code>. For example, a Java project can be compiled with the compiler-plugin's compile-goal<ref>{{cite web|url=https://maven.apache.org/plugins/maven-compiler-plugin/|title=Apache Maven Compiler Plugin β Introduction|first=Edwin|last=Punzalan}}</ref> by running <code>mvn compiler:compile</code>. There are Maven plugins for building, testing, source control management, running a web server, generating [[Eclipse (software)|Eclipse]] project files, and much more.<ref>{{cite web|url=https://maven.apache.org/plugins/index.html|title=Maven β Available Plugins|first=Brett Porter Jason van Zyl Dennis Lundberg Olivier Lamy Benson Margulies Karl-Heinz|last=Marbaise}}</ref> Plugins are introduced and configured in a <plugins>-section of a <code>pom.xml</code> file. Some basic plugins are included in every project by default, and they have sensible default settings. However, it would be cumbersome if the archetypal build sequence of building, testing and packaging a software project required running each respective goal manually: * <code>mvn compiler:compile</code> * <code>mvn surefire:test</code> * <code>mvn jar:jar</code> Maven's lifecycle concept handles this issue. Plugins are the primary way to extend Maven. Developing a Maven plugin can be done by extending the org.apache.maven.plugin.AbstractMojo class. Example code and explanation for a Maven plugin to create a cloud-based virtual machine running an application server is given in the article ''Automate development and management of cloud virtual machines''.<ref>{{Cite journal| last=Amies| first=Alex|author2=Zou P X |author3=Wang Yi S | title=Automate development and management of cloud virtual machines|journal=IBM DeveloperWorks|publisher=IBM|date=29 Oct 2011| url=http://www.ibm.com/developerworks/cloud/library/cl-automatecloud/index.html}}</ref>
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)