maven配置

1. 指定JDK版本

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

2.指定打包变量

mvn install -rf :gds-connector-env -Ddeploy.name=prod

3.指定生成类型,config还是jar包

mvn -Dmaven.test.skip=true install -PbuildConfig -fr :galileo-connector

4.mvn 指定setting.xml配置文件

mvn -s /some/other/dir/settings.xml

5. 构建命令:

mvn clean eclipse:clean eclipse:eclipse -Dwtpversion=2.0 -DdownloadSources=true

mvn clean install -Ddeploy.name=flightadmin-dev -Dtemplate.set=template-admin -P buildConfig

 flight-admin对maven版本有要求,必须为apache-maven-2.2.1

6.打包config && war

mvn package -Ddeploy.name=alpha -P buildConfig

7.转成eclipse项目,并下载源码,用2.0

mvn eclipse:eclipse -Dwtpversion=2.0 -DdownloadSources=true

8.指定版本,指定全局配置文件,指定执行任务

mvn package -Ddeploy.name=alpha -P buildConfig -Dwtpversion=2.0 -s C:\Users\pen.jiang\.m2\settings-travelzen.xml

9.转换成eclilpse项目

mvn package -Ddeploy.name=alpha -P buildConfig -Dwtpversion=2.0 -s C:\Users\pen.jiang\.m2\settings-travelzen.xml

mvn -Dmaven.test.skip=true install -s C:\Users\pen.jiang\.m2\settings-travelzen.xml -Ddeploy.name=alpha -P buildConfig

mvn eclipse:eclipse -s C:\Users\pen.jiang\.m2\settings-travelzen.xml -X

9.生成config和binary

mvn package -Ddeploy.name=alpha -P buildConfig -s C:\Users\pen.jiang\.m2\settings-travelzen.xml

mvn package -Ddeploy.name=alpha -s C:\Users\pen.jiang\.m2\settings-travelzen.xml

mvn eclipse:eclipse -s C:\Users\pen.jiang\.m2\settings-travelzen.xml

转载于:https://my.oschina.net/coolfire368/blog/108749

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值