------ Configuring Describe Goal ------ John Casey Maria Odea Ching Vincent Siveton ------ 2008-08-30 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Configuring Describe Goal Below are other configuration examples for the <<<{{{../describe-mojo.html}help:describe}}>>> goal. * The <<>> Parameter The <<>> parameter is meant to provide two things: convenience and prefix-based access. The convenience comes when specifying a plugin by <<>>, or by <<>>. Where the more traditional specification of separate fields would mean specifying this: +---+ # mvn help:describe -DgroupId=org.somewhere -DartifactId=some-plugin -Dversion=0.0.0 +---+ the use of the plugin parameter allows this: +---+ # mvn help:describe -Dplugin=org.somewhere:some-plugin:0.0.0 +---+ Here is an example to describe the Help plugin: +-----+ # mvn help:describe -Dplugin=org.apache.maven.plugins:maven-help-plugin +-----+ <>: <<>> is always optional here. On the other hand, the plugin parameter also offers the option to specify a plugin by its prefix, like this: +---+ # mvn help:describe -Dplugin=help +---+ * The <<>> Parameter You can use the <<>> parameter of the <<>> goal to show or display relative informations about a particular goal of the plugin you specified. For example, when you execute the following command: +-----+ # mvn help:describe -Dmojo=describe -DgroupId=org.apache.maven.plugins -DartifactId=maven-help-plugin +-----+ This would display brief information about the <<>> goal only. * The <<>> Parameter You could also ask for a single Maven command, i.e. a goal or a phase or a lifecycle. It is the command when you call Maven, i.e.: +-----+ # mvn -help usage: mvn [options] [] [] ... +-----+ The following are some examples: +-----+ # mvn help:describe -Dcmd=clean ... [INFO] [help:describe] [INFO] 'clean' is a lifecycle with the following phases: * pre-clean: NOT DEFINED * clean: org.apache.maven.plugins:maven-clean-plugin:clean * post-clean: NOT DEFINED ... +-----+ +-----+ # mvn help:describe -Dcmd=compile ... [INFO] [help:describe] [INFO] 'compile' is a phase corresponding to this plugin: org.apache.maven.plugins:maven-compiler-plugin:compile It is a part of the lifecycle for the POM packaging 'jar'. This lifecycle includes the following phases: * validate: NOT DEFINED * initialize: NOT DEFINED * generate-sources: NOT DEFINED * process-sources: NOT DEFINED * generate-resources: NOT DEFINED * process-resources: org.apache.maven.plugins:maven-resources-plugin:resources * compile: org.apache.maven.plugins:maven-compiler-plugin:compile * process-classes: NOT DEFINED * generate-test-sources: NOT DEFINED * process-test-sources: NOT DEFINED * generate-test-resources: NOT DEFINED * process-test-resources: org.apache.maven.plugins:maven-resources-plugin:testResources * test-compile: org.apache.maven.plugins:maven-compiler-plugin:testCompile * process-test-classes: NOT DEFINED * test: org.apache.maven.plugins:maven-surefire-plugin:test * package: org.apache.maven.plugins:maven-jar-plugin:jar * pre-integration-test: NOT DEFINED * integration-test: NOT DEFINED * post-integration-test: NOT DEFINED * verify: NOT DEFINED * install: org.apache.maven.plugins:maven-install-plugin:install * deploy: org.apache.maven.plugins:maven-deploy-plugin:deploy ... +-----+ +-----+ # mvn help:describe -Dcmd=compiler:compile ... [INFO] 'compiler:compile' is a plugin goal (aka mojo). Mojo: 'compiler:compile' compiler:compile Description: Compiles application sources Deprecated. No reason given For more information, run 'mvn help:describe [...] -Ddetail' ... +-----+ * The <<>>, <<>> and <<>> Parameters If you want to display less or more detailed informations, you can use the <<>>, <<>> or <<>> parameters. The <<>> parameter adds a minimal list of informations: +-----+ # mvn help:describe -Dplugin=help -Dminimal=true ... [INFO] [help:describe] [INFO] org.apache.maven.plugins:maven-help-plugin:2.1-SNAPSHOT Group Id: org.apache.maven.plugins Artifact Id: maven-help-plugin Version: 2.1-SNAPSHOT Goal Prefix: help Description: The Maven Help plugin provides goals aimed at helping to make sense out of the build environment. It includes the ability to view the effective POM and settings files, after inheritance and active profiles have been applied, as well as a describe a particular plugin goal to give usage information. For more information, run 'mvn help:describe [...] -Ddetail' ... +-----+ The <<>> parameter is the default since 2.1 and adds a list with the mojos of the plugin and their descriptions: +-----+ # mvn help:describe -Dplugin=help ... [INFO] org.apache.maven.plugins:maven-help-plugin:2.1-SNAPSHOT Group Id: org.apache.maven.plugins Artifact Id: maven-help-plugin Version: 2.1-SNAPSHOT Goal Prefix: help Description: The Maven Help plugin provides goals aimed at helping to make sense out of the build environment. It includes the ability to view the effective POM and settings files, after inheritance and active profiles have been applied, as well as a describe a particular plugin goal to give usage information. This plugin has 9 goals: help:active-profiles Description: Displays a list of the profiles which are currently active for this build. Deprecated. No reason given help:all-profiles Description: Displays a list of available profiles under the current project. Note: it will list all profiles for a project. If a profile comes up with a status inactive then there might be a need to set profile activation switches/property. Deprecated. No reason given help:describe Description: Displays a list of the attributes for a Maven Plugin and/or Mojo (Maven plain Old Java Object). Deprecated. No reason given help:effective-pom Description: Displays the effective POM as an XML for this build, with the active profiles factored in. Deprecated. No reason given help:effective-settings Description: Displays the calculated settings as XML for this project, given any profile enhancement and the inheritance of the global settings into the user-level settings. Deprecated. No reason given help:evaluate Description: Evaluates Maven expressions given by the user in an interactive mode. Deprecated. No reason given help:expressions Description: Displays the supported Plugin expressions used by Maven. Deprecated. No reason given help:help Description: Display help information on maven-help-plugin. Call mvn help:help -Ddetail=true -Dgoal= to display parameter details. Deprecated. No reason given help:system Description: Displays a list of the platform details like system properties and environment variables. Deprecated. No reason given For more information, run 'mvn help:describe [...] -Ddetail' ... +-----+ The <<>> parameter also displays information about the mojos's implementation, their parameters and component requirements, among others. +-----+ # mvn help:describe -Dplugin=help -Dfull=true +-----+ <>: The <<>> parameter was added in version 2.0.2 and the <<>> parameter was added in version 2.1 of this Help plugin. * The <<>> Parameter This <<>> goal can use the optional <<>> parameter to redirect the output to a file. Here is an example of that: +-----+ # mvn help:describe -Dplugin=help -Ddetail=true -Doutput=/path/to/file +-----+