我正在尝试使用Jenkins进行持续构建并尝试使用Jenkins部署这些构建 .
我已经配置了Jenkins自由样式作业来检查来自SVN的代码和使用 pre-integration-test -P<environment>
调用顶级maven目标 .
这项工作是成功构建并将我的SOA组合部署到weblogic上 . 但我不想部署我的每一个版本 . 我想将我的部署限制在服务器上 .
如果我配置Jenkins作业以使用 mvn clean package
目标构建我的SOA . 如何触发我的其他Jenkins作业来部署先前生成的工件 . 我们的基础设施中没有任何关联/神器 . 我们将构建存储在Jenkins工作区中 .
我已经配置了两个Jenkins作业,一个使用 mvn clean package
构建应用程序,这将使用 mvn pre-integration-test
触发其他Jenkins作业 . 但是在我的第二份工作中,预集成测试再次从验证阶段再次开始我的sar开始 . 是否有任何插件可以部署我的sar而无需重新编译/重新构建它 .
请帮我解决这个问题 .
这是我的POM:
http://maven.apache.org/maven-v4_0_0.xsd“xmlns =”http://maven.apache.org/POM/4.0.0“xmlns:xsi =”http://www.w3.org/ 2001 / XMLSchema的实例“>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.oracle.servicebus</groupId>
<artifactId>sbar-project-common</artifactId>
<version>12.2.1-1-0</version>
<relativePath></relativePath>
</parent>
<groupId>ServiceBusApplication1</groupId>
<artifactId>SBProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>sbar</packaging>
<description/>
<build>
<plugins>
<plugin>
<groupId>com.oracle.servicebus-plugin</groupId>
<artifactId>oracle-servicebus-plugin</artifactId>
<version>12.2.1-1-0</version>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>Dev</id>
<properties>
<oracleServerUrl>http://serverDev.com:7001</oracleServerUrl>
<oracleUsername>username</oracleUsername>
<oraclePassword>password</oraclePassword>
<oracleHome>path to oracle home</oracleHome>
<customization>path to configuration file</customization>
</properties>
</profile>
</profiles>
1 回答
你的第二个作业再次构建整个jar的原因是因为你正在执行一个目标
pre-integration-test
,其中包含maven lifecycle phases如果您想在不构建jar的情况下执行集成测试,可以将它们配置为在
test
阶段执行 .这可以使用
executions
来实现,并覆盖集成测试执行的阶段 . How do I get my Maven Integration tests to run