maven help 插件详解 - 点滴记忆*记忆点滴
收藏本站

maven help 插件详解

   要学习一个新东西,最可靠的往往就是它本身的 help
  • help:active-profiles lists the profiles which are currently active for the build.
  • help:all-profiles lists the available profiles under the current project.
  • help:describe describes the attributes of a Plugin and/or a Mojo (Maven plain Old Java Object). //描述一个插件
  • help:effective-pom displays the effective POM as an XML for the current build, with the active profiles factored in.         //显示当前POM,包括 active-profiles
  • help:effective-settings displays the calculated settings as an XML for the project, given any profile enhancement and the inheritance of the global settings into the user-level settings.
  • help:evaluate evaluates Maven expressions given by the user in an interactive mode.
  • help:expressions displays the supported Plugin expressions used by Maven.
  • help:system displays a list of the platform details like system properties and environment variables.
  • help:expressions  Displays the supported Plugin expressions used by Maven.


详细解释如下:

Maven Help Plugin
  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
  Displays a list of the profiles which are currently active for this build.

  Available parameters:

    output
      Optional parameter to write the output of this help in a given file,
      instead of writing to the console.
      Note: Could be a relative path.

help:all-profiles
  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.

  Available parameters:

    output
      Optional parameter to write the output of this help in a given file,
      instead of writing to the console.
      Note: Could be a relative path.

help:describe
  Displays a list of the attributes for a Maven Plugin and/or goals (aka Mojo -
  Maven plain Old Java Object).

  Available parameters:

    artifactId
      The Maven Plugin artifactId to describe.
      Note: Should be used with groupId parameter.

    cmd
      A Maven command like a single goal or a single phase following the Maven
      command line:
      mvn [options] [<goal(s)>] [<phase(s)>]

    detail (Default: false)
      This flag specifies that a detailed (verbose) list of goal (Mojo)
      information should be given.

    goal
      The goal name of a Mojo to describe within the specified Maven Plugin. If
      this parameter is specified, only the corresponding goal (Mojo) will be
      described, rather than the whole Plugin.

    groupId
      The Maven Plugin groupId to describe.
      Note: Should be used with artifactId parameter.

    medium (Default: true)
      This flag specifies that a medium list of goal (Mojo) information should
      be given.

    minimal (Default: false)
      This flag specifies that a minimal list of goal (Mojo) information should
      be given.

    output
      Optional parameter to write the output of this help in a given file,
      instead of writing to the console.
      Note: Could be a relative path.

    plugin
      The Maven Plugin to describe. This must be specified in one of three ways:


      1.  plugin-prefix, i.e. 'help'
      2.  groupId:artifactId, i.e. 'org.apache.maven.plugins:maven-help-plugin'
      3.  groupId:artifactId:version, i.e.
        'org.apache.maven.plugins:maven-help-plugin:2.0'

    version
      The Maven Plugin version to describe.
      Note: Should be used with groupId/artifactId parameters.

help:effective-pom
  Displays the effective POM as an XML for this build, with the active profiles
  factored in.

  Available parameters:

    output
      Optional parameter to write the output of this help in a given file,
      instead of writing to the console.
      Note: Could be a relative path.

help:effective-settings
  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.

  Available parameters:

    output
      Optional parameter to write the output of this help in a given file,
      instead of writing to the console.
      Note: Could be a relative path.

    showPasswords (Default: false)
      For security reasons, all passwords are hidden by default. Set this to
      true to show all passwords.

help:evaluate
  Evaluates Maven expressions given by the user in an interactive mode.

  Available parameters:

    artifact
      An artifact for evaluating Maven expressions.
      Note: Should respect the Maven format, i.e.
      groupId:artifactId[:version][:classifier].

    expression
      An expression to evaluate instead of prompting. Note that this must not
      include the surrounding ${...}.

help:expressions
  Displays the supported Plugin expressions used by Maven.

  Available parameters:

    output
      Optional parameter to write the output of this help in a given file,
      instead of writing to the console.
      Note: Could be a relative path.

help:help
  Display help information on maven-help-plugin.
  Call
    mvn help:help -Ddetail=true -Dgoal=<goal-name>
  to display parameter details.

  Available parameters:

    detail (Default: false)
      If true, display all settable properties for each goal.

    goal
      The name of the goal for which to show help. If unspecified, all goals
      will be displayed.

    indentSize (Default: 2)
      The number of spaces per indentation level, should be positive.

    lineLength (Default: 80)
      The maximum length of a display line, should be positive.

help:system
  Displays a list of the platform details like system properties and environment

  variables.

  Available parameters:

    output
      Optional parameter to write the output of this help in a given file,
      instead of writing to the console.
      Note: Could be a relative path.


    留下足迹