• maven3


    app:

    mvn archetype:generate -DgroupId=net.srirangan.packt.maven -DartifactId=MySampleApp

    webapp:

    mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp

    -------------------------------------------

    mvn validate

    mvn compile

    mvn package

    mvn test

    子项目/子模块

    需要先建立父项目:<packaging>pom</packaging>

    然后在父项目中再创建子项目/模块

    mvn site:run 

    ------------------------------------------------

    test report:

    <reporting>
    <plugins>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>cobertura-maven-plugin</artifactId>
    <version>2.4</version>
    </plugin>
    </plugins>
    <build>
    <plugins>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>cobertura-maven-plugin</artifactId>
    <configuration>
    <instrumentation>
    <ignores>
    <ignore>com.test.somepackage.*</ignore>
    </ignores>
    <excludes>
    <exclude>com/test/somepackage/**/*.class</exclude>
    <exclude>com/test/**/*Test.class</exclude>
    </excludes>
    </instrumentation>
    </configuration>
    </plugin>
    </plugins>
    </build>
    mvn cobertura:cobertura   测试覆盖
    mvn checkstyle:checkstyle 代码检查
    mvn dashboard:dashboard 生成dashboard
    mvn site:run
    
    




  • 相关阅读:
    servlet(二)
    servlet(一)
    static、final、static final的区别
    java基础知识(一)
    IntelliJ IDEA中Debug的使用技巧
    IDEA从SVN中导入多模块项目
    Java实现MD5加密
    冒泡排序
    ulimit: core file size: cannot modify limit: Operation not permitted
    Linux 禁用摄像头
  • 原文地址:https://www.cnblogs.com/lavieenrose/p/2355532.html
Copyright © 2020-2023  润新知