Command Line build - failing to inject properties
![]()
Ralph Schoon (63.3k●3●36●46)
| asked Nov 17 '08, 12:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,
I am setting up a build for C++ refering to https://jazz.net/wiki/bin/view/Main/CppBuild https://jazz.net/wiki/bin/view/Main/SCMCLIWithJazzBuild I created make files etc. After struggeling for some time and failing builds I found an issue. I need to pass build properties / build dependant environment variables to the make file. Apparently the normal environment variables are passed to the make command but the properties set in the build definition are not. Is this to be expected or an issue with my machine or RTC 1.0.1? See errors and other data below. Thanks, Ralph Here the errors: Makefile:9: warning: undefined variable `JAZZ_TOOLKIT' Makefile:9: warning: undefined variable `repositoryAddress' Makefile:9: warning: undefined variable `buildResultUUID' Makefile:9: warning: undefined variable `JAZZ_TOOLKIT' Makefile:9: warning: undefined variable `repositoryAddress' Makefile:9: warning: undefined variable `buildResultUUID' Makefile:9: warning: undefined variable `JAZZ_TOOLKIT' Makefile:9: warning: undefined variable `repositoryAddress' Makefile:9: warning: undefined variable `buildResultUUID' And here the content of the build properties passed to a file: #Fri Nov 14 17:38:05 CET 2008 personalBuild=true team.scm.acceptBeforeFetch=true team.scm.fetchDestination=C\:/JazzDemo/build/work/fib/build.input team.scm.componentLoadRules= team.scm.deleteDestinationBeforeFetch=false team.scm.workspaceUUID=_MReSsLJMEd2-TIBlZp-GWQ buildDefinitionId=Squawk Team C++ build requestUUID=_mh6lAbJqEd2-TIBlZp-GWQ com.ibm.team.build.internal.template.id=com.ibm.team.build.cmdline buildResultUUID=_mh6lArJqEd2-TIBlZp-GWQ JAZZ_TOOLKIT=C\:/JazzDemo/build/buildsystem/buildtoolkit;C\:\\JazzDemo\\build\\jdk1.6.0_05\\lib ANT_CLASSPATH=C\:/JazzDemo/build/ant/org.apache.ant_1.7.0/lib/ant-launcher.jar buildLabel=20081114-1738 BUILDROOT=C\:/JazzDemo/build/work/fib team.scm.buildOnlyIfChanges=true repositoryAddress=https\://localhost\:9443/jazz/ Example build file: ANT_LAUNCHER = org.apache.tools.ant.launch.Launcher JAZZ_TASK = java $(ANT_LAUNCHER) -f jazzbuild.xml -lib $(JAZZ_TOOLKIT) -DrepositoryAddress=$(repositoryAddress) -DbuildResultUUID=$(buildResultUUID) all: compile compile: $(JAZZ_TASK) -DactivityLabel="Compiling" startActivity make -C ../Fibonacci all $(JAZZ_TASK) -DactivityLabel="Publishing results" startActivity $(JAZZ_TASK) -Dlabel="Executable" -DfilePath=../Fibonacci/Fibo attachArtifact |
One answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Nov 17 '08, 12:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Sorry for posting into the wrong forum the first try. The question was answered:
Hi Don, thanks - I assumed that the said ID's are passed to the commandline by default. My bad! FYI: In addition to passing the said variables in the arguments I had to set the repository Address and the build UUID manually in the makefile. Otherwise the parameters where not passed to the ant-task.xml CLASSPATH = C:/JazzDemo/build/ant/org.apache.ant_1.7.0/lib/ant-launcher.jar;C:/JazzDemo/build/jdk1.6.0_05/lib/tools.jar ANT_LAUNCHER = org.apache.tools.ant.launch.Launcher JAZZ_TOOLKIT = C:/JazzDemo/build/buildsystem/buildtoolkit JAZZ_TASK = java -cp $(CLASSPATH) $(ANT_LAUNCHER) -f jazzbuild.xml -lib $(JAZZ_TOOLKIT) REPOSITORY_ADDRESS=${repositoryAddress} BUILD_UUID=${buildResultUUID} all: compile compile: $(JAZZ_TASK) -DrepositoryAddress=${REPOSITORY_ADDRESS} -DbuildResultUUID=${BUILD_UUID} -DactivityLabel="Compiling" startActivity make -C ../Fibonacci all $(JAZZ_TASK) -DrepositoryAddress=${REPOSITORY_ADDRESS} -DbuildResultUUID=${BUILD_UUID} -DactivityLabel="Publishing results" startActivity $(JAZZ_TASK) -DrepositoryAddress=${REPOSITORY_ADDRESS} -DbuildResultUUID=${BUILD_UUID} -Dlabel="Executable" -DfilePath=../Fibonacci/Fibo.exe attachArtifact Thanks, Ralph On the command line page are you passing in the properties as Hello rschoon, Hi, |
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.