Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC build Engine : Build is not being delivered to source control

I have created a simple java programme and added the build.xml file for the exploration of RTC build. though, when i give the request build is being created in the project but not being delivered in the RTC source control atomically. do we need to deliver it manually or it will deliver atomically ?  i think, i need to add some entry in build.xml.
I followed steps form the article: https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.concert.tutorial.doc/topics/tut_rtc_build.html&scope=null

Here is my build.xml

<?xml version="1.0"?>
<project name="RTCBuildTest" default="main" basedir=".">
  <!-- Sets variables which can later be used. -->
  <!-- The value of a property is accessed via ${} -->
  <property name="src.dir" location="src" />
  <property name="build.dir" location="bin" />
  <property name="dist.dir" location="dist" />
  <property name="docs.dir" location="docs" />

   
   
   
   
    <target name="default">
            <!-- Replace these with your real credentials. -->
            <property name="userId" value="naveen.tyagi"/>
            <property name="password" value="password"/>

            <artifactLinkPublisher
                    label="A download"
                    url="ftp://your-built-file.zip"
                    verbose="true"               
                    buildResultUUID="${buildResultUUID}"
                    repositoryAddress="${repositoryAddress}"
                    userId="${userId}"
                    password="${password}"/>
               
        </target>  
   
   
    <target name="default1">
            <!-- Replace these with your real credentials. -->
            <property name="userId" value="naveen.tyagi"/>
            <property name="password" value="password"/>

            <startBuildActivity
                    label="compiling..."
                    autoComplete="true"
                    verbose="true"               
                    buildResultUUID="${buildResultUUID}"
                    repositoryAddress="${repositoryAddress}"
                    userId="${userId}"
                    password="${password}"/>
               
            <sleep seconds="5"/>
               
            <startBuildActivity
                    label="testing..."
                    autoComplete="true"
                    verbose="true"               
                    buildResultUUID="${buildResultUUID}"
                    repositoryAddress="${repositoryAddress}"
                    userId="${userId}"
                    password="${password}"/>

            <sleep seconds="5"/>

            <startBuildActivity
                    label="packaging..."
                    autoComplete="true"
                    verbose="true"               
                    buildResultUUID="${buildResultUUID}"
                    repositoryAddress="${repositoryAddress}"
                    userId="${userId}"
                    password="${password}"/>

            <sleep seconds="5"/>

        </target>

   


   
  <!-- Deletes the existing build, docs and dist directory-->
  <target name="clean">
    <delete dir="${build.dir}" />
    <delete dir="${docs.dir}" />
    <delete dir="${dist.dir}" />
  </target>

  <!-- Creates the  build, docs and dist directory-->
  <target name="makedir">
    <mkdir dir="${build.dir}" />
    <mkdir dir="${docs.dir}" />
    <mkdir dir="${dist.dir}" />
  </target>

  <!-- Compiles the java code (including the usage of library for JUnit -->
  <target name="compile" depends="clean, makedir">
    <javac srcdir="${src.dir}" destdir="${build.dir}">
    </javac>

  </target>

  <!-- ocCreates Javad -->
  <target name="docs" depends="compile">
    <javadoc packagenames="src" sourcepath="${src.dir}" destdir="${docs.dir}">
      <!-- Define which files / directory should get included, we include all -->
       <fileset dir="${src.dir}">
                <include name="**" />
           </fileset>
    </javadoc>
  </target>

  <!--Creates the deployable jar file  -->
  <target name="jar" depends="compile">
    <jar destfile="${dist.dir}\com.org.rtcbuild.jar" basedir="${build.dir}">
      <manifest>
        <attribute name="Main-Class" value="test.Main" />
      </manifest>
    </jar>
  </target>

  <target name="main" depends="compile, jar, docs">
    <description>Main target</description>
  </target>

</project>


Jazz source control in Build definition :


WorkSpace : selected.
Load directory : fetched

Ant Tab:

build file: fetched/TestRTCBuild/build.xml
Jdk home: C:\Program Files\Java\jdk1.6.0_24

0 votes



One answer

Permanent link
Usually a build runs on some machine, loads a repository workspace, runs a compile etc. All the generated data is usually not delivered into the SCM system. In fact it is usually not a good idea if the build changes any information that is under SCM. The build can create a snapshot for the data that is built, so that it can be reproduced. In this case the information about the baselines is available in SCM later.

It is possible to do a post build deliver, which basically rebases a stream with the latest working build. This does not add data to SCM, just sets the components to the wanted configuration.

It is possible to publish artifacts created during the build on the build result. I personally think it is a better idea to jut publish links to these artifacts and store them on a file system or in a repository to manage binaries. See https://rsjazz.wordpress.com/2015/10/28/build-artifacts-publishing-and-automated-build-output-management-using-the-plain-java-client-libraries/ for more information.

0 votes

Comments

Thanks Ralph.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 562

Question asked: Mar 14 '16, 9:58 a.m.

Question was seen: 1,562 times

Last updated: Mar 15 '16, 1:49 a.m.

Confirmation Cancel Confirm