zoukankan      html  css  js  c++  java
  • maven相关说明,以及使用Testng相关

    配置Apache Maven

    Apache Maven使用本身的配置和建立的项目位于许多地方:

    MAVEN_OPTS环境变量:

      该变量包含用于启动运行Maven的JVM的参数,可用于向Maven提供其他选项。可以使用值-Xms256m -Xmx512m定义JVM内存设置。

    settings.xml文件:

      位于USER_HOME / .m2中的设置文件旨在包含项目中Maven使用的任何配置。

    .mvn文件夹:

      位于项目顶级文件夹中,文件maven.config和extensions.xml包含运行Maven的项目特定配置。

    运行Apache Maven

    运行Maven的语法如下:

    1. mvn [ options ] [< goal (s )>] [< phase (s )>] 

    所有可用的选项都记录在您可以访问的内置帮助中

    1. mvn - h

    构建Maven项目的典型调用使用Maven生命周期阶段。例如

    1. mvn package

    内置的生命周期及其阶段是:

    • 清洁 - 预清洁,清洁,后清洁 === clean - pre-clean, clean, post-clean
    • 默认 - 验证,初始化,生成源,进程源,生成资源,进程资源,编译,进程类,生成测试源,进程测试源,生成测试资源,进程测试 - 资源,测试编译,过程测试类,测试,准备包,包,预集成测试,集成测试,后整合测试,验证,安装,部署
    • 站点 - 站点前,站点,站点后,站点部署 site - pre-site, site, post-site, site-deploy

    生成所有打包输出和文档站点并将其部署到存储库管理器的新项目可以完成

      mvn clean deploy site-deploy  只需创建软件包并将其安装在本地存储库中,以便从其他项目重新使用即可

      mvn clean install        这是Maven项目最常见的构建调用

    当不使用项目时,在某些其他用例中,您可能需要调用由Maven的一部分实现的特定任务 - 这被称为插件的目标。例如:

    mvn archetype:generate 要么 mvn checkstyle :check  有许多不同的插件可用,它们都实现不同的目标。

    default - validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile,

    process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources,

    test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy

    Eclipse IDE - M2Eclipse

    M2Eclipse是用于Eclipse IDE的Maven集成的官方Eclipse项目。

    功能包括:

    • 从Eclipse中启动Maven构建
    • 基于Maven的pom.xml的Eclipse构建路径的依赖关系管理
    • 从Eclipse工作区解析Maven依赖关系,而无需安装到本地Maven仓库
    • 从远程Maven存储库自动下载所需的依赖项和源
    • 用于创建新的Maven项目,pom.xml和启用对现有项目的Maven支持的向导
    • 快速搜索远程Maven存储库中的依赖关系
    • 在Java编辑器中快速修复以通过类或包名称查找所需的依赖项/ jar
    • 与其他Eclipse工具集成,如WTP,AJDT,Mylyn,Subclipse等。

    当在IDE中进行更改时,M2E会使用Eclipse与您的Maven项目动态集成。在更改POM M2E中的依赖关系或Maven插件的配置时,将使Eclipse工作区与这些更改同步。

    Maven的目标

    Maven的主要目标是允许开发人员在最短的时间内了解开发工作的完整状态。为了实现这一目标,Maven试图处理以下几个方面的问题:

    • 使构建过程容易
    • 提供统一的构建系统
    • 提供优质的项目信息
    • 提供最佳做法发展指南
    • 允许透明迁移到新功能

    maven现在可以用于构建和管理任何基于Java的项目的工具.

    提供统一的构建系统

    Maven允许项目使用其项目对象模型(POM)和一组使用Maven的所有项目共享的插件来构建,从而提供统一的构建系统。

    提供优质的项目信息

    Maven提供了大量有用的项目信息,部分来自您的POM,部分来自项目来源。例如,Maven可以提供:

    • 更改直接从源代码控制创建的日志文档
    • 交叉引用来源
    • 邮寄名单
    • 依赖列表
    • 单位测试报告,包括覆盖

    可用插件

    Maven是其核心 - 插件执行框架; 所有的工作都是通过插件完成的。寻找一个具体的执行目标?此页面列出了核心插件和其他内容。有build和报告插件:

    构建插件:将在构建期间执行,并且应在POM 的<build />元素中进行配置。

    报告插件:将在站点生成期间执行,并且应在POM 的<reporting />元素中进行配置。因为Reporting插件的结果是生成的站点的一部分,所以Reporting插件应该被国际化和本地化。

    由Maven项目支持

    要查看最新的列表,请浏览Maven存储库,特别是org / apache / maven / plugins子文件夹。(插件根据类似于标准Java包命名约定的目录结构进行组织)

    Plugin    Description

    核心插件 ----- Core plugins

    clean   

    构建后清理

    Clean up after the build.

    compiler     

    编译Java源码

    Compiles Java sources.

    Deploy

    将构建的工件部署到远程存储库

    Deploy the built artifact to the remote repository.

    failsafe故障安全

    在隔离的类加载器中运行JUnit集成测试。

    Run the JUnit integration tests in an isolated classloader.

    install  

    将构建的工件安装到本地存储库中

    Install the built artifact into the local repository.

    resources  

    将资源复制到输出目录以包含在JAR

    Copy the resources to the output directory for including in the JAR.

    site

    生成当前项目的站点

    Generate a site for the current project.

    surefire

    在隔离的类加载器中运行JUnit单元测试

    Run the JUnit unit tests in an isolated classloader.

    verifier  验证

    用于集成测试 - 验证某些条件的存在

    Useful for integration tests - verifies the existence of certain conditions.

    Packaging types/tools   包装类型/工具

    这些插件涉及打包各种工件类型

    These plugins relate to packaging respective artifact types.

    ear

    从当前项目生成EAR

    Generate an EAR from the current project.

    ejb 

    从当前项目构建EJB(和可选客户端)

    Build an EJB (and optional client) from the current project.

    jar  

    从当前项目构建JAR

    Build a JAR from the current project.

    rar 

    从当前项目构建RAR

    Build a RAR from the current project.

    war

    从当前项目构建WAR

    Build a WAR from the current project.

    app-client/acr    应用程序的客户机/ ACR

    从当前项目构建JavaEE应用程序客户端

    Build a JavaEE application client from the current project.

    shade  

    从当前项目构建Uber-JAR,包括依赖关系

    Build an Uber-JAR from the current project, including dependencies.source

    source

    从当前项目构建源JAR

    Build a source-JAR from the current project.

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Reporting plugins   报告插件

    生成报告的插件被配置为POM中的报告,并在站点生成周期中运行

    Plugins which generate reports, are configured as reports in the POM and run under the site generation lifecycle.

    changelog  更新日志

    从您的SCM生成最近更改的列表

    Generate a list of recent changes from your SCM.

    changes     变化

    从问题跟踪器或更改文档生成报告

    Generate a report from an issue tracker or a change document.

    checkstyle  检查样式

    生成Checkstyle报告(代码规范情况报告)

    Generate a Checkstyle report.

    doap    

    POM生成项目描述(DOAP)文件

    Generate a Description of a Project (DOAP) file from a POM.

    docck   

    文档检查插件

    Documentation checker plugin.

    javadoc

    为项目生成Javadoc

    Generate Javadoc for the project.

    jdeps    

    在项目中运行JDKJDeps工具

    Run JDK's JDeps tool on the project.

    jxr  

    生成源交叉引用

    Generate a source cross reference.

    linkcheck   

    生成项目文档的Linkcheck报告

    Generate a Linkcheck report of your project's documentation.

    PMD

    生成PMD报告

    pmd Generate a PMD report.

    project-info-reports  项目信息的报告

    生成标准项目报告

    Generate standard project reports.

    surefire-report  

    根据单元测试的结果生成报告

    Generate a report based on the results of unit tests.

    /////////////////////////////////////////////////////////////////////////////////////////////////////////

    Tools    

    默认情况下,这些是通过Maven可用的各种工具

    These are miscellaneous tools available through Maven by default.

    ant

    为项目生成Ant构建文件

    Generate an Ant build file for the project.

    antrun 

    从构建阶段运行一组ant任务

    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 (distribution) of sources and/or binaries.

    dependency      依赖

    依赖操纵(复制,解压缩)和分析

    Dependency manipulation (copy, unpack) and analysis.

    enforcer      实施者

    环境约束检查(Maven VersionJDK等),用户自定义规则执行

    Environmental constraint checking (Maven Version, JDK etc), User Custom Rule

    Execution.

    GPG

    为工件和pom创建签名

    Create signatures for the artifacts and poms.

    help     

    获取有关项目工作环境的信息

    Get information about the working environment for the project.

    invoker 调用

    运行一组Maven项目并验证输出

    Run a set of Maven projects and verify the output.

    Jarsigner

    标识或验证项目工件

    Signs or verifies project artifacts.

    patch    补丁

    使用gnu补丁工具将补丁文件应用到源代码

    Use the gnu patch tool to apply patch files to source code.

    pdf

    生成项目文档的PDF版本

    Generate a PDF version of your project's documentation.

    plugin   插件

    为源树中找到的任何moj创建Maven插件描述符,以包含在JAR中。

    Create a Maven plugin descriptor for any mojos found in the source tree, to include in the

    JAR.

    release发布

    释放当前项目 - SCM中更新POM和标记

    Release the current project - updating the POM and tagging in the SCM.

    remote-resources      远程资源

    将远程资源复制到输出目录以包含在工件中

    Copy remote resources to the output directory for inclusion in the artifact.

    repository    资源库

    帮助基于存储库的任务的插件

    Plugin to help with repository-based tasks.

    scm      

    对当前项目执行SCM命令

    Execute SCM commands for the current project.

    scm-publish     

    将您的Maven网站发布到scm位置

    Publish your Maven website to a scm location.

    stage   

    协助发布分期和推广

    Assists with release staging and promotion.

    toolchains 

    允许跨插件共享配置

     

    Allows to share configuration across plugins.

    使用TestNG

    不支持的TestNG版本

    - TestNG 5.14.3:格式不正确的pom.xml 

    - TestNG 5.14.45.14.5TestNG使用缺少的依赖项(org.testngguice2.0)。排除它可能会破坏一些功能。

    配置TestNG

    要开始使用TestNG,请在项目中包含以下依赖项(将版本替换为您要使用的版本)

    <dependencies>
        <dependency>
          <groupId>org.testng</groupId>
          <artifactId>testng</artifactId>
          <version>6.9.8</version>
          <scope>test</scope>
        </dependency>
    </dependencies>

    如果您使用的是较旧版本的TestNG<= 5.11),依赖关系会改为:

    <dependencies>
      [...]
        <dependency>
          <groupId>org.testng</groupId>
          <artifactId>testng</artifactId>
          <version>5.11</version>
          <scope>test</scope>
          <classifier>jdk15</classifier>
        </dependency>
      [...]
    </dependencies>

    注:如果您使用的是JDK 1.4Javadoc注释为你的TestNG的测试,更换分类jdk15JDK14以上。

    这是启动所需的唯一步骤 - 您现在可以在测试源目录(eg。,src / test / java)中创建测试。只要它们根据默认值(如* IT.java命名,它们将作为TestNG测试由Failsafe运行。

    如果要使用不同的命名方案,可以更改include参数,如“ 包含和排除测试示例中所述

    使用套件XML文件

     

    另一个选择是使用TestNG套件的XML文件。这允许灵活配置测试运行。这些文件以正常方式创建,然后添加到Failsafe Plugin配置中:

    <plugins> 
        [...] 
          <plugin> 
            <groupId> org.apache.maven.plugins </ groupId> 
            <artifactId> maven-failuresafe-plugin </ artifactId> 
            <version> 2.20 </ version> 
            <configuration> 
              <suiteXmlFiles > 
                <suiteXmlFile> testng.xml </ suiteXmlFile> 
              </ suiteXmlFiles> 
            </ configuration> 
          </ plugin> 
        [...] 
    </ plugins>

    此配置将覆盖包含并排除模式并运行套件文件中的所有测试。

    指定测试参数

     

    您的TestNG测试可以使用@Parameters注释接受参数。您还可以将参数从Maven传递到TestNG测试中,方法是将其指定为系统属性,如下所示:

    <plugins> 
        [...] 
          <plugin> 
            <groupId> org.apache.maven.plugins </ groupId> 
            <artifactId> maven-failuresafe-plugin </ artifactId> 
            <version> 2.20 </ version> 
            <configuration> 
              <systemPropertyVariables > 
                <propertyName> firefox </ propertyName> 
              </ systemPropertyVariables> 
            </ configuration> 
          </ plugin> 
        [...] 
    </ plugins>

    有关在故障安全测试中设置系统属性的更多信息,请参阅系统属性

    使用组

    TestNG允许您对测试进行分组。然后,您可以执行一个或多个特定组。要使用Failsafe执行此操作,请使用groups参数,例如:

    <plugins> 
        [...] 
          <plugin> 
            <groupId> org.apache.maven.plugins </ groupId> 
            <artifactId> maven-failuresafe-plugin </ artifactId> 
            <version> 2.20 </ version> 
            <configuration> 
              <groups > functest,perftest </ groups> 
            </ configuration> 
          </ plugin> 
        [...] 
    </ plugins>

    同样,excludedGroups参数可以用于运行除一组特定组之外的所有其他参数。

    并行运行测试

    TestNG允许您并行运行测试,包括JUnit测试。为此,您必须设置并行参数,如果默认值为5,则可能会更改threadCount参数。例如:

    </plugins>
        [...]
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
              <parallel>methods</parallel>
              <threadCount>10</threadCount>
            </configuration>
          </plugin>
        [...]
    </plugins>

    这对于可以具有高并发性的缓慢测试或者快速和粗略地评估测试和代码的独立性和线程安全性特别有用。

    TestNG 5.10和插件版本2.19或更高版本允许您使用数据提供程序并行测试运行方法。

    </plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
              <properties>
                <property>
                  <name>parallel</name>
                  <value>methods</value>
                </property>
                <property>
                  <name>dataproviderthreadcount</name>
                  <value>30</value>
                </property>
              </properties>
            </configuration>
          </plugin>
    </plugins>

    TestNG 6.9.8JRE 1.7)和插件2.19或更高版本允许您并行运行套件。

    </plugins>
        [...]
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
              <suiteXmlFiles>
                <file>src/test/resources/testng1.xml</file>
                <file>src/test/resources/testng2.xml</file>
              </suiteXmlFiles>
              <properties>
                <property>
                  <name>suitethreadpoolsize</name>
                  <value>2</value>
                </property>
              </properties>
            </configuration>
          </plugin>
        [...]
    </plugins>

    另请参阅叉选项和并行测试执行

    Using Custom Listeners and Reporters

    使用自定义的监听器和报告

    X- 20045 X- 200 X- 200 200 X- 200 200 X- 200 200 X- 200 200 X- 200 200:默认情况下,TestNG附加一些基本的监听器来生成HTMLXML报告。

    不支持的版本: - TestNG 5.14.15.14.2:由于内部的TestNG问题,侦听器和记者不能与TestNG一起工作。请将TestNG升级到5.14.9或更高版本。注意:它可能会在将来的安全版本中修复。

    您可以配置多个自定义监听器,如下所示:

    <dependencies>
      <dependency>
        <groupId>your-testng-listener-artifact-groupid</groupId>
        <artifactId>your-testng-listener-artifact-artifactid</artifactId>
        <version>your-testng-listener-artifact-version</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
    </plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
              <properties>
                <property>
                  <name>usedefaultlisteners</name>
                  <value>false</value> <!-- disabling default listeners is optional -->
                </property>
                <property>
                  <name>listener</name>
                  <value>com.mycompany.MyResultListener,com.mycompany.MyAnnotationTransformer,com.mycompany.MyMethodInterceptor</value>
                </property>
                <property>
                  <name>reporter</name>
                  <value>listenReport.Reporter</value>
                </property>
              </properties>
            </configuration>
          </plugin>
    </plugins>

    有关TestNG的更多信息,请参阅TestNG网站

    您可以实现TestNG的侦听器接口org.testng.ITestListener在一个单独的测试工件-TestNG的侦听器神器带范围=测试,或在项目测试源代码src / test / java。您可以通过参数dependenciesToScan过滤测试工件,以将其类加载到surefire-testng提供程序的当前ClassLoader中。TestNG记者类应该实现org.testng.IReporter

    详细程度

     

    由于插件版本2.19或更高版本,可以在提供程序属性surefire.testng.verbose配置详细程度级别。详细程度在010之间,其中10是最详细的。您可以指定-1,这将使TestNG处于调试模式(不再切断堆栈跟踪和全部)。默认级别为0

    </plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
              <properties>
                <property>
                  <name>surefire.testng.verbose</name>
                  <value>10</value>
                </property>
              </properties>
            </configuration>
          </plugin>
    </plugins>

    自定义TestNG对象工厂

    由于插件版本2.19TestNG 5.7或更高版本,您可以通过实现org.testng.IObjectFactory自定义TestNG对象工厂,并将类名称绑定到提供者属性中的关键对象中:

    </plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
              <properties>
                <property>
                  <name>objectfactory</name>
                  <value>testng.objectfactory.TestNGCustomObjectFactory</value>
                </property>
              </properties>
            </configuration>
          </plugin>
    </plugins>

    定制TestNG测试工厂

    由于插件版本2.19TestNG 5.9或更高版本,您可以通过实现org.testng.ITestRunnerFactory自定义TestNG工厂,并将类名称绑定到提供程序属性中的关键testrunfactory

    </plugins>
           <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
                   <properties>
                <property>
                  <name>testrunfactory</name>
                  <value>testng.testrunnerfactory.TestNGCustomTestRunnerFactory</value>
                </property>
              </properties>
               </configuration>
          </plugin>
    </plugins>

    在测试标签中运行'testnames'

    只有匹配其中一个名称的test标签中定义的测试才会运行。在这个例子中,两个测试用完了7InstallTestATest。测试a-t3suite.xml中的任何测试不匹配。

     

    </plugins>
           <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
                   <suiteXmlFiles>
                <file>src/test/resources/suite.xml</file>
              </suiteXmlFiles>
              <properties>
                <property>
                  <name>testnames</name>
                  <value>a-t1,a-t3</value>
                </property>
              </properties>
                </configuration>
          </plugin>
     </plugins>

    测试套件'suite.xml'

    <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
    <suite name="Component Tests" verbose="2" annotations="JDK">
      <test name="a-t1" preserve-order="true" >
        <classes>
          <class name="server.InstallTest" />
          <class name="server.ATest" />
        </classes>
      </test>
      <test name="a-t2" preserve-order="true" >
        <classes>
          <class name="server.SCHTest" />
          <class name="server.PRGTest" />
          <class name="server.SIBBTest" />
          <class name="server.EDNTest" />
          <class name="server.PPVTest" />
        </classes>
      </test>
    </suite>

    运行TestNGJUnit测试

    TestNG 6.5.1及更高版本提供了在当前Maven项目中运行TestNGJUnit 4.x的支持。所有你需要的是在POM中引入TestNGJUnit依赖。

    <依赖关系> 
    <dependencies>
      [...]
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.9.4</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
        <scope>test</scope>
      </dependency>
      [...]
    </dependencies>

    您可能希望运行两个提供程序,例如surefire-junit47surefire -testng,并通过设置属性junit = false避免在surefire-testng提供程序中运行JUnit测试。

    <plugins>
        [...]
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
              [...]
              <properties>
                <property>
                  <name>junit</name>
                  <value>false</value>
                </property>
              </properties>
              <threadCount>1</threadCount>
              [...]
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.surefire</groupId>
                <artifactId>surefire-junit47</artifactId>
                <version>2.20</version>
              </dependency>
              <dependency>
                <groupId>org.apache.maven.surefire</groupId>
                <artifactId>surefire-testng</artifactId>
                <version>2.20</version>
              </dependency>
            </dependencies>
          </plugin>
        [...]
    </plugins>

     

    clean   

    构建后清理

    Clean up after the build.

     

    compiler     

    编译Java源码

    Compiles Java sources.

     

    Deploy

    将构建的工件部署到远程存储库

    Deploy the built artifact to the remote repository.

     

    failsafe故障安全

    在隔离的类加载器中运行JUnit集成测试。

    Run the JUnit integration tests in an isolated classloader.

     

    install  

    将构建的工件安装到本地存储库中

    Install the built artifact into the local repository.

     

    resources  

    将资源复制到输出目录以包含在JAR

    Copy the resources to the output directory for including in the JAR.

     

    site

    生成当前项目的站点

    Generate a site for the current project.

     

     

    surefire

    在隔离的类加载器中运行JUnit单元测试

    Run the JUnit unit tests in an isolated classloader.

     

    verifier  验证

    用于集成测试 - 验证某些条件的存在

    Useful for integration tests - verifies the existence of certain conditions.

     

    Packaging types/tools   包装类型/工具

    这些插件涉及打包各种工件类型

    These plugins relate to packaging respective artifact types.

     

    ear

    从当前项目生成EAR

    Generate an EAR from the current project.

     

    ejb 

    从当前项目构建EJB(和可选客户端)

    Build an EJB (and optional client) from the current project.

     

    jar  

    从当前项目构建JAR

    Build a JAR from the current project.

     

    rar 

    从当前项目构建RAR

    Build a RAR from the current project.

     

    war

    从当前项目构建WAR

    Build a WAR from the current project.

     

     

    app-client/acr    应用程序的客户机/ ACR

    从当前项目构建JavaEE应用程序客户端

    Build a JavaEE application client from the current project.

     

    shade  

    从当前项目构建Uber-JAR,包括依赖关系

    Build an Uber-JAR from the current project, including dependencies.source

     

    source

    从当前项目构建源JAR

    Build a source-JAR from the current project.

     

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Reporting plugins   报告插件

    生成报告的插件被配置为POM中的报告,并在站点生成周期中运行

    Plugins which generate reports, are configured as reports in the POM and run under the site generation lifecycle.

     

     

    changelog  更新日志

    从您的SCM生成最近更改的列表

    Generate a list of recent changes from your SCM.

     

    changes     变化

    从问题跟踪器或更改文档生成报告

    Generate a report from an issue tracker or a change document.

     

    checkstyle  检查样式

    生成Checkstyle报告(代码规范情况报告)

    Generate a Checkstyle report.

     

    doap    

    POM生成项目描述(DOAP)文件

    Generate a Description of a Project (DOAP) file from a POM.

     

     

    docck   

    文档检查插件

    Documentation checker plugin.

     

    javadoc

    为项目生成Javadoc

    Generate Javadoc for the project.

     

    jdeps    

    在项目中运行JDKJDeps工具

    Run JDK's JDeps tool on the project.

    jxr  

    生成源交叉引用

    Generate a source cross reference.

     

    linkcheck   

    生成项目文档的Linkcheck报告

    Generate a Linkcheck report of your project's documentation.

     

    PMD

    生成PMD报告

    pmd Generate a PMD report.

     

    project-info-reports  项目信息的报告

    生成标准项目报告

    Generate standard project reports.

     

    surefire-report  

    根据单元测试的结果生成报告

    Generate a report based on the results of unit tests.

    /////////////////////////////////////////////////////////////////////////////////////////////////////////

    Tools    

    默认情况下,这些是通过Maven可用的各种工具

    These are miscellaneous tools available through Maven by default.

     

    ant

    为项目生成Ant构建文件

    Generate an Ant build file for the project.

     

    antrun 

    从构建阶段运行一组ant任务

    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 (distribution) of sources and/or binaries.

     

    dependency      依赖

    依赖操纵(复制,解压缩)和分析

    Dependency manipulation (copy, unpack) and analysis.

     

    enforcer      实施者

    环境约束检查(Maven VersionJDK等),用户自定义规则执行

    Environmental constraint checking (Maven Version, JDK etc), User Custom Rule

    Execution.

     

    GPG

    为工件和pom创建签名

    Create signatures for the artifacts and poms.

     

    help     

    获取有关项目工作环境的信息

    Get information about the working environment for the project.

     

    invoker 调用

    运行一组Maven项目并验证输出

    Run a set of Maven projects and verify the output.

     

    Jarsigner

    标识或验证项目工件

    Signs or verifies project artifacts.

     

    patch    补丁

    使用gnu补丁工具将补丁文件应用到源代码

    Use the gnu patch tool to apply patch files to source code.

     

    pdf

    生成项目文档的PDF版本

    Generate a PDF version of your project's documentation.

     

    plugin   插件

    为源树中找到的任何moj创建Maven插件描述符,以包含在JAR中。

    Create a Maven plugin descriptor for any mojos found in the source tree, to include in the

    JAR.

     

    release发布

    释放当前项目 - SCM中更新POM和标记

    Release the current project - updating the POM and tagging in the SCM.

     

    remote-resources      远程资源

    将远程资源复制到输出目录以包含在工件中

    Copy remote resources to the output directory for inclusion in the artifact.

     

    repository    资源库

    帮助基于存储库的任务的插件

    Plugin to help with repository-based tasks.

     

    scm      

    对当前项目执行SCM命令

    Execute SCM commands for the current project.

     

    scm-publish     

    将您的Maven网站发布到scm位置

    Publish your Maven website to a scm location.

     

    stage   

    协助发布分期和推广

    Assists with release staging and promotion.

     

    toolchains  

  • 相关阅读:
    设计模式——迭代器模式
    FTP服务:FileZilla的配置和使用
    FTP服务:使用FileZilla搭建FTP服务
    FTP服务:ISS搭建服务
    javaweb项目使用RSA算法
    我在博客园的第一篇博客
    杰表打印跟乱码修改
    jsp页面角色判断
    test : 摘自 https://www.cnblogs.com/yyman001/p/3366764.html
    mybatis中sql查询不到数据单独运行sql可以获取数据
  • 原文地址:https://www.cnblogs.com/xiaofeifei-wang/p/8027380.html
Copyright © 2011-2022 走看看