`
java_true
  • 浏览: 112713 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Maven学习笔记(2) ---- 安装与运行Maven

    博客分类:
  • java
阅读更多
1. 确认JDK的安装

  Maven支持JDK1.4及以上版本,但建议使用Java 5.0或6.0。



  2. 下载Maven分发包

  Maven的下载地址为:http://maven.apache.org/download.html,请下载最新的分发包,目前Maven最新版本为2.1.0

  3. 安装Maven

  将下载的Maven分发包解压到本地目录,并且设置环境变量M2_HOME及PATH.

 

  4. 验证Maven安装

  在Windows命令窗口中输入 mvn -version,如果显示如下图所示,则表明Maven已经安装成功。



如果你看不到,而且你的操作系统找不到 mvn 命令,那么确认一下PATH和M2_HOME环境变量是否已经正确设置了。

  5. Maven安装目录及文件介绍



bin/目录包含了运行Maven的mvn脚本。
boot/ 目录包含了一个负责创建Maven运行所需要的类装载器的JAR文件(classwords-1.1.jar)。
conf/ 目录包含了一个全局的settings.xml文件,该文件用来自定义你机器上Maven的一些行为。如果你需要自定义Maven,更通常的做法是覆写 .m2目录下的settings.xml文件,每个用户都有对应的这个目录。
lib/ 目录有了一个包含Maven核心的JAR文件(maven-2.1.0-uber.jar)
LICENSE.txt 包含了Apache Maven的软件许可证。
NOTICE.txt 包含了一些Maven依赖的类库所需要的通告及权限。
README.txt包含了一些安装指令。
  6. Maven本地仓库

  从Apache下载的Maven是所谓的Maven核心包,不包含任何的插件,在上次介绍过,当第一次使用Maven时,它会从中央Maven仓库下载一些核心的Maven插件,而这些下载的插件将被安装到本地仓库,在Microsoft Windows XP系统中,Maven本地仓库被默认安装在C:\Documents and Settings\YU Zhipeng\.m2下;而Microsoft Windows Vista系统中,本地仓库位于C:\Users\YU Zhipeng\.m2,其中YU Zhipeng为当前用户名。

  在.m2路径下,可以包含名为settings.xml的配置文件,该文件包含了用户相关的认证,仓库和其它信息的配置,用来自定义Maven的行为。

  repository目录是你本地的仓库。当你从远程Maven仓库下载依赖的时候,Maven在你本地仓库存储了这个依赖的一个副本。如下图:



 



  7. 使用Maven Help插件

  Maven Help插件能让你列出活动的Maven Profile,显示一个实际POM(effective POM),打印实际settings(effective settings),或者列出Maven插件的属性。

  Maven Help 插件有四个目标。前三个目标描述一个特定的项目,它们必须在项目的目录下运行。最后一个目标describe比较复杂,用于展示某个插件或者插件目标的相关信息。


help:active-profiles
列出当前构建中活动的Profile(项目的,用户的,全局的)。

help:effective-pom
显示当前构建的实际POM,包含活动的Profile。

help:effective-settings
打印出项目的实际settings, 包括从全局的settings和用户级别settings继承的配置。

help:describe
 
描述插件的属性。它不需要在项目目录下运行。但是你必须提供你想要描述插件的 groupId 和 artifactId.
  通常使用help:describe目标来获取Maven插件如何工作?配置参数是什么?目标是什么? 等这些信息。它通过plugin参数指定你想要研究哪个插件,你可以传入插件的前缀,或者可以是坐标值groupId:artifactId:[version],这里 version 是可选的。

  例如,下面的命令使用 help 插件的describe目标来输出 Maven Help 插件的信息:

view plaincopy to clipboardprint?
C:\>mvn help:describe -Dplugin=help 
[INFO] Scanning for projects...  
[INFO] Searching repository for plugin with prefix: 'help'.  
[INFO] ------------------------------------------------------------------------  
[INFO] Building Maven Default Project  
[INFO]    task-segment: [help:describe] (aggregator-style)  
[INFO] ------------------------------------------------------------------------  
[INFO] [help:describe]  
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1  
 
Name: Maven Help Plugin  
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.  
Group Id: org.apache.maven.plugins  
Artifact Id: maven-help-plugin  
Version: 2.1  
Goal Prefix: help  
 
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  
    goals (aka 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=<goal-name> 
    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'  
 
[INFO] ------------------------------------------------------------------------  
[INFO] BUILD SUCCESSFUL  
[INFO] ------------------------------------------------------------------------  
[INFO] Total time: 2 seconds  
[INFO] Finished at: Mon Apr 20 14:02:21 CST 2009  
[INFO] Final Memory: 5M/10M  
[INFO] ------------------------------------------------------------------------ 
C:\>mvn help:describe -Dplugin=help
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [help:describe] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1

Name: Maven Help Plugin
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.
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 2.1
Goal Prefix: help

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
    goals (aka 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=<goal-name>
    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'

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Apr 20 14:02:21 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------

如果还想得到更详细的信息,可以使用full参数,即:

view plaincopy to clipboardprint?
C:\>mvn help:describe -Dplugin=help -Dfull  
[INFO] Scanning for projects...  
[INFO] Searching repository for plugin with prefix: 'help'.  
[INFO] ------------------------------------------------------------------------  
[INFO] Building Maven Default Project  
[INFO]    task-segment: [help:describe] (aggregator-style)  
[INFO] ------------------------------------------------------------------------  
[INFO] [help:describe]  
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1  
 
Name: Maven Help Plugin  
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.  
Group Id: org.apache.maven.plugins  
Artifact Id: maven-help-plugin  
Version: 2.1  
Goal Prefix: help  
 
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  
  Implementation: org.apache.maven.plugins.help.ActiveProfilesMojo  
  Language: java  
 
  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.  
      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  
  Implementation: org.apache.maven.plugins.help.AllProfilesMojo  
  Language: java  
 
  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.  
      Deprecated. No reason given  
 
help:describe  
  Description: Displays a list of the attributes for a Maven Plugin and/or  
    goals (aka Mojo - Maven plain Old Java Object).  
  Deprecated. No reason given  
  Implementation: org.apache.maven.plugins.help.DescribeMojo  
  Language: java  
 
  Available parameters:  
 
    artifactId  
      The Maven Plugin artifactId to describe.  
      Note: Should be used with groupId parameter.  
      Deprecated. No reason given  
 
    cmd  
      A Maven command like a single goal or a single phase following the Maven  
      command line:  
      mvn [options] [<goal(s)>] [<phase(s)>]  
      Deprecated. No reason given  
 
    detail (Default: false)  
      This flag specifies that a detailed (verbose) list of goal (Mojo)  
      information should be given.  
      Deprecated. No reason 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.  
      Deprecated. No reason given  
 
    groupId  
      The Maven Plugin groupId to describe.  
      Note: Should be used with artifactId parameter.  
      Deprecated. No reason given  
 
    medium (Default: true)  
      This flag specifies that a medium list of goal (Mojo) information should  
      be given.  
      Deprecated. No reason given  
 
    minimal (Default: false)  
      This flag specifies that a minimal list of goal (Mojo) information should  
      be given.  
      Deprecated. No reason 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.  
      Deprecated. No reason given  
 
    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'  
      Deprecated. No reason given  
 
    version  
      The Maven Plugin version to describe.  
      Note: Should be used with groupId/artifactId parameters.  
      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  
  Implementation: org.apache.maven.plugins.help.EffectivePomMojo  
  Language: java  
 
  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.  
      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  
  Implementation: org.apache.maven.plugins.help.EffectiveSettingsMojo  
  Language: java  
 
  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.  
      Deprecated. No reason given  
 
    showPasswords (Default: false)  
      For security reasons, all passwords are hidden by default. Set this to  
      true to show all passwords.  
      Deprecated. No reason given  
 
help:evaluate  
  Description: Evaluates Maven expressions given by the user in an  
    interactive mode.  
  Deprecated. No reason given  
  Implementation: org.apache.maven.plugins.help.EvaluateMojo  
  Language: java  
 
  Available parameters:  
 
    artifact  
      An artifact for evaluating Maven expressions.  
      Note: Should respect the Maven format, i.e.  
      groupId:artifactId[:version][:classifier].  
      Deprecated. No reason given  
 
help:expressions  
  Description: Displays the supported Plugin expressions used by Maven.  
  Deprecated. No reason given  
  Implementation: org.apache.maven.plugins.help.ExpressionsMojo  
  Language: java  
 
  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.  
      Deprecated. No reason given  
 
help:help  
  Description: Display help information on maven-help-plugin.  
    Call  
     mvn help:help -Ddetail=true -Dgoal=<goal-name> 
    to display parameter details.  
  Deprecated. No reason given  
  Implementation: org.apache.maven.plugins.help.HelpMojo  
  Language: java  
 
  Available parameters:  
 
    detail (Default: false)  
      If true, display all settable properties for each goal.  
      Deprecated. No reason given  
 
    goal  
      The name of the goal for which to show help. If unspecified, all goals  
      will be displayed.  
      Deprecated. No reason given  
 
    indentSize (Default: 2)  
      The number of spaces per indentation level, should be positive.  
      Deprecated. No reason given  
 
    lineLength (Default: 80)  
      The maximum length of a display line, should be positive.  
      Deprecated. No reason given  
 
help:system  
  Description: Displays a list of the platform details like system properties  
    and environment variables.  
  Deprecated. No reason given  
  Implementation: org.apache.maven.plugins.help.SystemMojo  
  Language: java  
 
  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.  
      Deprecated. No reason given  
 
 
[INFO] ------------------------------------------------------------------------  
[INFO] BUILD SUCCESSFUL  
[INFO] ------------------------------------------------------------------------  
[INFO] Total time: 2 seconds  
[INFO] Finished at: Mon Apr 20 14:04:13 CST 2009  
[INFO] Final Memory: 5M/10M  
[INFO] ------------------------------------------------------------------------ 
C:\>mvn help:describe -Dplugin=help -Dfull
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [help:describe] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [help:describe]
[INFO] org.apache.maven.plugins:maven-help-plugin:2.1

Name: Maven Help Plugin
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.
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 2.1
Goal Prefix: help

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
  Implementation: org.apache.maven.plugins.help.ActiveProfilesMojo
  Language: java

  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.
      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
  Implementation: org.apache.maven.plugins.help.AllProfilesMojo
  Language: java

  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.
      Deprecated. No reason given

help:describe
  Description: Displays a list of the attributes for a Maven Plugin and/or
    goals (aka Mojo - Maven plain Old Java Object).
  Deprecated. No reason given
  Implementation: org.apache.maven.plugins.help.DescribeMojo
  Language: java

  Available parameters:

    artifactId
      The Maven Plugin artifactId to describe.
      Note: Should be used with groupId parameter.
      Deprecated. No reason given

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

    detail (Default: false)
      This flag specifies that a detailed (verbose) list of goal (Mojo)
      information should be given.
      Deprecated. No reason 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.
      Deprecated. No reason given

    groupId
      The Maven Plugin groupId to describe.
      Note: Should be used with artifactId parameter.
      Deprecated. No reason given

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

    minimal (Default: false)
      This flag specifies that a minimal list of goal (Mojo) information should
      be given.
      Deprecated. No reason 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.
      Deprecated. No reason given

    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'
      Deprecated. No reason given

    version
      The Maven Plugin version to describe.
      Note: Should be used with groupId/artifactId parameters.
      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
  Implementation: org.apache.maven.plugins.help.EffectivePomMojo
  Language: java

  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.
      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
  Implementation: org.apache.maven.plugins.help.EffectiveSettingsMojo
  Language: java

  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.
      Deprecated. No reason given

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

help:evaluate
  Description: Evaluates Maven expressions given by the user in an
    interactive mode.
  Deprecated. No reason given
  Implementation: org.apache.maven.plugins.help.EvaluateMojo
  Language: java

  Available parameters:

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

help:expressions
  Description: Displays the supported Plugin expressions used by Maven.
  Deprecated. No reason given
  Implementation: org.apache.maven.plugins.help.ExpressionsMojo
  Language: java

  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.
      Deprecated. No reason given

help:help
  Description: Display help information on maven-help-plugin.
    Call
     mvn help:help -Ddetail=true -Dgoal=<goal-name>
    to display parameter details.
  Deprecated. No reason given
  Implementation: org.apache.maven.plugins.help.HelpMojo
  Language: java

  Available parameters:

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

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

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

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

help:system
  Description: Displays a list of the platform details like system properties
    and environment variables.
  Deprecated. No reason given
  Implementation: org.apache.maven.plugins.help.SystemMojo
  Language: java

  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.
      Deprecated. No reason given


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Apr 20 14:04:13 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------

  

该选项能让你查看插件所有的目标及相关参数。但是有时候这些信息显得太多了。这时候你可以获取单个目标的信息,设置mojo参数和plugin参数。下面的命令列出了Compiler 插件的testCompile目标的所有信息:

mvn help:describe -Dplugin=compiler -Dmojo=testCompile -Dfull

view plaincopy to clipboardprint?
C:\>mvn help:describe -Dplugin=compiler -Dmojo=testCompile -Dfull  
[INFO] Scanning for projects...  
[INFO] Searching repository for plugin with prefix: 'help'.  
[INFO] ------------------------------------------------------------------------  
[INFO] Building Maven Default Project  
[INFO]    task-segment: [help:describe] (aggregator-style)  
[INFO] ------------------------------------------------------------------------  
[INFO] [help:describe]  
[INFO] Mojo: 'compiler:testCompile'  
compiler:testCompile  
  Description: Compiles application test sources  
  Deprecated. No reason given  
  Implementation: org.apache.maven.plugin.TestCompilerMojo  
  Language: java  
  Bound to phase: test-compile  
 
  Available parameters:  
 
    compilerArgument  
      Sets the unformatted argument string to be passed to the compiler if fork  
      is set to true.  
 
      This is because the list of valid arguments passed to a Java compiler  
      varies based on the compiler version.  
      Deprecated. No reason given  
 
    compilerArguments  
      Sets the arguments to be passed to the compiler (prepending a dash) if  
      fork is set to true.  
 
      This is because the list of valid arguments passed to a Java compiler  
      varies based on the compiler version.  
      Deprecated. No reason given  
 
    compilerId (Default: javac)  
      The compiler id of the compiler to use. See this guide for more  
      information.  
      Deprecated. No reason given  
 
    compilerVersion  
      Version of the compiler to use, ex. '1.3', '1.5', if fork is set to true.  
      Deprecated. No reason given  
 
    debug (Default: true)  
      Set to true to include debugging information in the compiled class files.  
      Deprecated. No reason given  
 
    encoding  
      The -encoding argument for the Java compiler.  
      Deprecated. No reason given  
 
    executable  
      Sets the executable of the compiler to use when fork is true.  
      Deprecated. No reason given  
 
    failOnError (Default: true)  
      Indicates whether the build will continue even if there are compilation  
      errors; defaults to true.  
      Deprecated. No reason given  
 
    fork (Default: false)  
      Allows running the compiler in a separate process. If 'false' it uses the  
      built in compiler, while if 'true' it will use an executable.  
      Deprecated. No reason given  
 
    maxmem  
      Sets the maximum size, in megabytes, of the memory allocation pool, ex.  
      '128', '128m' if fork is set to true.  
      Deprecated. No reason given  
 
    meminitial  
      Initial size, in megabytes, of the memory allocation pool, ex. '64',  
      '64m' if fork is set to true.  
      Deprecated. No reason given  
 
    optimize (Default: false)  
      Set to true to optimize the compiled code using the compiler's  
      optimization methods.  
      Deprecated. No reason given  
 
    outputFileName  
      Sets the name of the output file when compiling a set of sources to a  
      single file.  
      Deprecated. No reason given  
 
    showDeprecation (Default: false)  
      Sets whether to show source locations where deprecated APIs are used.  
      Deprecated. No reason given  
 
    showWarnings (Default: false)  
      Set to true to show compilation warnings.  
      Deprecated. No reason given  
 
    skip  
      Set this to 'true' to bypass unit tests entirely. Its use is NOT  
      RECOMMENDED, but quite convenient on occasion.  
      Deprecated. No reason given  
 
    source  
      The -source argument for the Java compiler.  
      Deprecated. No reason given  
 
    staleMillis (Default: 0)  
      Sets the granularity in milliseconds of the last modification date for  
      testing whether a source needs recompilation.  
      Deprecated. No reason given  
 
    target  
      The -target argument for the Java compiler.  
      Deprecated. No reason given  
 
    testExcludes  
      A list of exclusion filters for the compiler.  
      Deprecated. No reason given  
 
    testIncludes  
      A list of inclusion filters for the compiler.  
      Deprecated. No reason given  
 
    verbose (Default: false)  
      Set to true to show messages about what the compiler is doing.  
      Deprecated. No reason given  
 
 
[INFO] ------------------------------------------------------------------------  
[INFO] BUILD SUCCESSFUL  
[INFO] ------------------------------------------------------------------------  
[INFO] Total time: 2 seconds  
[INFO] Finished at: Mon Apr 20 14:10:06 CST 2009  
[INFO] Final Memory: 5M/10M  
[INFO] ------------------------------------------------------------------------ 



本文来自CSDN博客:http://blog.csdn.net/dangdanglili/archive/2009/04/20/4094228.aspx
分享到:
评论

相关推荐

    maven学习笔记1--myeclipse10中的配置

    【标题】"maven学习笔记1--myeclipse10中的配置" 在IT行业中,Maven和MyEclipse是两个非常重要的工具,它们在软件开发过程中扮演着关键角色。Maven是一个项目管理工具,主要用于Java项目的构建、依赖管理和项目信息...

    云的学习笔记-云的学习笔记系统-云的学习笔记系统源码-云的学习笔记管理系统-基于ssm的云的学习笔记系统-ssm-java代码

    云的学习笔记-云的学习笔记系统-云的学习笔记系统源码-云的学习笔记管理系统-云的学习笔记管理系统java代码-云的学习笔记系统设计与实现-基于ssm的云的学习笔记系统-基于Web的云的学习笔记系统设计与实现-云的学习...

    maven学习笔记maven学习笔记

    maven学习笔记maven学习笔记maven学习笔记

    云的学习笔记-云的学习笔记系统-云的学习笔记系统源码-云的学习笔记管理系统-基于Web的云的学习笔记系统设计与实现-java代码

    云的学习笔记-云的学习笔记系统-云的学习笔记系统源码-云的学习笔记管理系统-云的学习笔记管理系统java代码-云的学习笔记系统设计与实现-基于ssm的云的学习笔记系统-基于Web的云的学习笔记系统设计与实现-云的学习...

    Maven学习笔记.zip

    **Maven学习笔记** 在Java开发领域,Maven是一个不可或缺的构建工具,它极大地简化了项目的构建、管理和依赖管理过程。Maven通过使用一个项目对象模型(Project Object Model,POM),XML格式的配置文件,定义了...

    Maven 教程:基础篇-尚硅谷学习笔记 2022年

    **Maven教程:基础篇——尚硅谷学习笔记 2022年** Maven是一个强大的Java项目管理和构建工具,由Apache软件基金会开发。它通过提供一个标准的项目对象模型(Project Object Model,POM)来简化项目的构建过程,并...

    maven学习笔记01(基础入门)

    例如,`maven-compiler-plugin` 负责编译Java源代码,`maven-surefire-plugin` 运行单元测试。通过在POM中配置插件,可以自定义构建流程。 ### 5. Maven的命令行接口 Maven提供了丰富的命令行接口,如`mvn clean`...

    maven笔记t-JavaWeb

    例如,`maven-compiler-plugin`用于编译Java源码,`maven-surefire-plugin`负责运行测试。 7. **聚合与继承**:在多模块项目中,使用`aggregation`可以将多个模块聚合到一个父POM中,而`inheritance`则可以让子模块...

    maven-聚合项目-springMVC

    在"maven学习笔记"中,我们可以深入学习如何配置POM.xml文件,理解Maven的生命周期和构建过程。 **Spring MVC**是Spring框架的一个模块,专门用于处理Web应用的请求-响应模型。它采用模型-视图-控制器(MVC)设计...

    Maven笔记(2)-- 构建Java Project 及 Maven命令使用

    Maven通过插件扩展其功能,如`maven-compiler-plugin`用于编译Java代码,`maven-surefire-plugin`用于运行测试。插件配置在`&lt;build&gt;&lt;plugins&gt;`或`&lt;reporting&gt;&lt;plugins&gt;`元素中。 ### 总结 Maven简化了Java项目的...

    maven聚合web工程--struts2+spring

    在描述中提到的"学习maven笔记"部分,我们可以理解这是一个关于Maven学习的过程记录,可能涵盖了Maven的基本概念、配置、生命周期以及如何使用它来构建和管理项目。"尚不能实现自动发布"暗示了作者可能还没有掌握...

    mybatis_maven学习笔记

    【mybatis_maven学习笔记】 在Java开发领域,MyBatis和Maven是两个不可或缺的工具,它们分别在数据访问层和项目构建方面扮演着重要角色。MyBatis是一个优秀的持久层框架,它支持定制化SQL、存储过程以及高级映射,...

    maven学习笔记.rar

    ** Maven学习笔记详解 ** Maven,作为Java项目管理和构建工具,是开发人员不可或缺的利器。它通过使用一种标准化的项目对象模型(Project Object Model,POM)来管理项目的依赖关系,构建过程以及配置信息。Maven...

Global site tag (gtag.js) - Google Analytics