1. 指定环境进行编译

  • 在pom.xml 中定义各种 profile
  • 在编译的时候指定 -Pprofile_id 即可

    1
    2
    3
    4
    5
    6
    <profiles>
    <profile>
    <id>dd</id>
    ...
    </profile>
    </profiles>
  • 可用于编译开发,测试,发布不同的版本

2. 去除测试

  • -Dmaven.test.skip = true 即可

3. 指定特定的测试模块进行测试

  • -Dtest=test_unit_name 即可

留言

Oct 21 2015