Magazine
 
Maven 2 Plug-in
Plugins are used to interact with a host application to provide a specific task on demand. Maven provides a plugin execution framework and rest of the work is done by the plugins i.e. real action is performed by the plugins like
compiling code, creating jar files, creating war files, testing the code, creating project documentation etc. For Instance… Clean is one of the simplest maven 2.0 plugins available. When we run “mvn clean”, the “clean” goal is
executed and the target directory is removed.

Here, we are providing a list of core and other plugins below:

Plugin                     Description
Core plugins          Corresponding to default core phases
clean                     Clean up after the build.
compiler                Compiles Java sources.
deploy                   Deploy the built artifact to the remote
                              repository.
install                     Install the built artifact into the local
                               repository.
resources             Copy the resources to the output
                              directory for including in  the JAR.
site                        Generate a site for the current project.
surefire                 Run the Junit tests in an isolated classloader.
verifier                  Verifies the existence of certain conditions.

Packaging         types Related to packaging /tools respective artifact
                            types.

ear                       Generate an EAR from the current
                             project.
ejb                        Build an EJB from the current project.
jar                         Build a JAR from the current project.
rar                        Build a RAR from the current project.
war                      Build a WAR from the current project.

  Reporting               Related to generating reports
changelog             Generate a list of recent changes
                              from your SCM.
changes                Generate a report from issue tracking
                              or a change document.
checkstyle             Generate a checkstyle report.
clover                     Generate a Clover report.
doap                       Generate a DOAP file from a POM.
docck                      Documentation checker plugin.
javadoc                   Generate Javadoc for the project.
jxr                            Generate a source cross reference.
pmd                          Generate a PMD report.
project-info-             Generate a standard project reports reports.
surefire-report         Generate a report based on the
                                  results of unit tests.

Tools                        Tools available through Maven by
                                 default
ant                           Generate an Ant build file for the
                                project.
antrun                      Run a set of ant tasks from a phase
                                 of the build.
archetype                Generate a skeleton project
                                structure from an archetype.
                                 assembly Build an assembly of
                                  sourcesand/or binaries.
dependency              Dependency manipulation and
                                  analysis.
enforcer                    Environmental constraint checking,
                                  User Custom Rule Execution.
gpg                            Create signatures for the artifacts
                                  and poms.
help                           Get information about the working
                                  environment for the project.
invoker                      Run a set of Maven projects and
                                  verify the output 

one                           A plugin for  interacting with legacy
                                  Maven 1.x repositories

Nov 2007 | Java Jazz Up | 21
 
previous
index
next
 
View All Topics
All Pages of this Issue
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69   Download PDF