project package tools_eclipse export / ant / maven / gradle

使用Ant,Maven构建Eclipse RCP Product

http://eclipsercpforum.group.iteye.com/group/wiki/627

通常我们打包Product的时候,一般都是通过Product的export操作来进行的,但这样的做法,则限制了Continous Integration的自动化执行,那么,应该如何编写自动化构建脚本呢?

、、、

1、maven打包成可执行jar包 在pom.xml中添加

<build>

<plugins>

...

<plugin>

<artifactId>maven-assembly-plugin</artifactId>

<configuration>

<descriptorRefs>

<descriptorRef>jar-with-dependencies</descriptorRef>

</descriptorRefs>

<archive>

<manifest>

<mainClass>com.xahl.conf.App</mainClass> <!-- 含main方法的类 -->

</manifest>

</archive>

</configuration>

</plugin>

...

</plugins>

</build>

执行命令mvn assembly:assembly -Dmaven.test.skip=true(跳过测试)

则可以打包成可执行jar,并且可以把所有的依赖包都打进去

2、package -Dmaven.test.skip=true -e 打普通jar

3配置sts工具maven命令 右键 Run as -->run  Comfiguration -->  Maven build --> name : package Goals:-Dmaven.test.skip=true -e --> run

4 打client jar  call mvn install -Dmaven.test.skip=true

end

猜你喜欢

转载自lindows.iteye.com/blog/2125399