2

I am experimenting the use of Rational Team concert to store our binaries and/or build artifacts. I am running a mvn deploy command to deploy my build artifacts to RTC. Although it recognizes the connection its throwing me a Http status code: 500 error.

I have also checked RTC logs for more information but i don't see any specific exception. All the examples or documents out on internet says we have to configure RTC build engine to run the builds.

I just want to know if anyone have tried publishing to RTC from command line using Mvn deploy ( without using RTC cleint ) ? is this do-able?

If you have successfully published artifacts to RTC using maven, can you please elaborate on how you did it?

P̲̳x͓L̳
  • 3,615
  • 3
  • 29
  • 37
neophyte
  • 53
  • 5

2 Answers2

2

I just want to know if anyone have tried publishing to RTC from command line using Mvn deploy ( without using RTC cleint ) ?

No, RTC is not an artifact repository (like a maven repo is).
It is a ticket system coupled with a source repo and a build engine front-end.

It can store sources and uses those to trigger a job which would produce a delivery (like a binary).
But that deliverable would have to be stored elsewhere. Not in RTC.

  • RTC has its own database to store everything (ticket, sources, build definition and build records)
  • A true artifact repo (like maven) is a simple collection of shared directories in which deliverable are published.

You can easily delete an artifact from an artifact repo: cd + rm.
You cannot easily delete the same deliverable from a source repo (which, by nature, is there to retain the history you record in it)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the quick response Von. I have a different question. I am using Rational Asset manager (RAM) to store the binaries i build. have any one succeeded using using mvn deploy command ( without using RTC?) ? I apologize for the confusion.. – neophyte Mar 26 '14 at 17:50
1

I have used RTC’s build engine with maven to create artifacts that are recognized in RTC build results. This is not a maven-like repository, but instead uses RTC to track build artifacts (for bug reports, etc.). (If you want to publish to a repository, I recommend that you look at http://www.sonatype.org/nexus/, which allows for both maven and Eclipse p2 repositories.)

To create artifacts recognized by RTC, in my maven pom.xml, I added some execution tasks to run the RTC publish tasks. Your maven install will need access to the IBM related jars. (You can copy them into your maven library.) There’s a discussion about this here: https://jazz.net/forum/questions/4936/how-to-publishing-build-results-using-maven

For example, the following will link the generated artifact to the RTC build report.

<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>

I have a separate file for the ant tasks (antTasks.xml), which exposes the RTC build functions. It looks like this:

<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>

The discussion on jazz.net is worth looking at.

B. Robinson
  • 106
  • 1
  • 6