It's all about the answers!

Ask a question

build definition properties in ant build script, help..


sam detweiler (12.5k6195201) | asked Mar 08 '14, 12:01 p.m.
I see this set of word defining the behavior of build definition properties

"The Jazz Build Engine substitutes the property variables just before the build is started, and their substituted form is given to the build script."

I see in my build output the substitution.

but then the substituted value is NOT defined in my ant build script
(Jenkins)
Substituted the following build property variables:
	sandbox.load = /tmp/${project}/${component}   -->   sandbox.load = /tmp/tools/Personal MigrateProjects
	team.scm.fetchDestination = /tmp/${project}   -->   team.scm.fetchDestination = /tmp/tools

RTC Checkout : Source control setup
RTC Checkout : Fetching files to fetch destination "/tmp/tools" ...
RTC Checkout : Fetching Completed
[Personal MigrateProjects] $ ant -file build.xml -DbuildResultUUID= -v
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
Buildfile: /tmp/tools/Personal MigrateProjects/build.xml
Detected Java version: 1.6 in: /usr/lib/jvm/java-6-openjdk-amd64/jre
Detected OS: Linux
parsing buildfile /tmp/tools/Personal MigrateProjects/build.xml with URI = file:/tmp/tools/Personal%20MigrateProjects/build.xml
Project base dir set to: /tmp/tools/Personal MigrateProjects
Build sequence for target(s) `build' is [build]
Complete build sequence is [build, ]

build:
parsing buildfile jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Property "deplibs" has not been set
Property "sandbox.load" has not been set
my target is pretty simple
         <target name="build">
            <path id="build.classpath">
                    <fileset dir="${deplibs}" includes="**/*.jar"/>
            </path>               
            <javac classpathref="build.classpath" srcdir="${sandbox.load}" includeantruntime="true"/>
         </target>

One answer



permanent link
Donald Nong (14.5k414) | answered Mar 13 '14, 7:03 a.m.
I can use your build file with the built-in ant and the Apache Ant, without any complaints. I know that the properties get substituted because errors will come out if the properties are in defined in the build definition. That's in a pure RTC environment though.
Are you using Jenkins? If so, the properties may get lost in the process of JBE -> Jenkins -> Ant.

Your answer


Register or 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.