我使用 RTC 的构建引擎和 maven 来创建在 RTC 构建结果中被识别的工件。这不是一个类似 maven 的存储库,而是使用 RTC 来跟踪构建工件(用于错误报告等)。(如果您想发布到存储库,我建议您查看http://www.sonatype.org/nexus/,它允许 maven 和 Eclipse p2 存储库。)
为了创建 RTC 识别的工件,在我的 maven pom.xml 中,我添加了一些执行任务来运行 RTC 发布任务。您的 maven 安装将需要访问 IBM 相关的 jar。(您可以将它们复制到您的 maven 库中。)这里有一个讨论:https ://jazz.net/forum/questions/4936/how-to-publishing-build-results-using-maven
例如,以下将生成的工件链接到 RTC 构建报告。
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>jazz-link-activity</id>
<phase>package</phase>
<configuration>
<tasks name="publish link" if="link">
<property name="buildtoolkitpath" value="${buildtoolkitpath}" />
<property name="buildResultUUID" value="${buildResultUUID}" />
<property name="${repositoryAddress}" value="${repositoryAddress}" />
<property name="user" value="${builderId}" />
<property name="user.password" value="${builderPassword}" />
<property name="label"
value="${project.build.finalName}.v${buildNumber}" />
<property name="url" value="http://your-url/" />
<ant antfile="../XXX.parent/antTasks.xml" inheritAll="true"
target="linkPublisher" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
我有一个单独的 ant 任务文件 (antTasks.xml),它公开了 RTC 构建函数。它看起来像这样:
<project name="JazzTasks">
<target name="setPaths" unless="jazzlib.dir">
<property name="jazzlib.dir" value="C:/Program Files/maven" />
<echo message="Jazz maven library path ${jazzlib.dir}" />
<echo message="Jazz buildtoolkit path ${buildtoolkitpath}" />
</target>
<target name="startBuildActivity" depends="init">
<echo message="Starting build activitty" />
</target>
<target name="linkPublisher" unless="publish.skip" depends="init">
<linkPublisher buildResultUUID="${buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="${user}" password="${user.password}" verbose="true" url="${url}" label="${label}" failOnError="false" />
</target>
<target name="linkPublisher" unless="publish.skip" depends="init">
<linkPublisher buildResultUUID="${buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="${user}" password="${user.password}" verbose="true" url="${url}" label="${label}" failOnError="false" />
</target>
<taskdef name="linkPublisher" classname="com.ibm.team.build.ant.task.LinkPublisherTask" >
<classpath>
<fileset dir="${buildtoolkitpath}">
<include name="*.jar" />
</fileset>
</classpath>
</taskdef>
jazz.net 上的讨论值得一看。