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

Can I determine repository workspace from ANT script?

Is it possible to determine the repository workspace currently loaded into my eclipse workspace from an ANT script launched from the Eclipse workspace external tools menu?

Thanks
John Weber

0 votes



One answer

Permanent link
John,

what do you want to achieve?

You can output the properties you get passed. The repository workspace UUID is in team.scm.workspaceUUID.

#Mon Aug 22 15:34:56 CEST 2016
team.scm.includeComponents=false
repositoryAddress=https\://clm.example.com\:9443/ccm/
team.scm.fetchDestination=JKEBuild\\I20160822-1534
buildDefinitionId=jke.dev
buildLabelPrefix=I
buildEngineHostName=IBM307-R909ZLFG
team.scm.loadComponents=
com.ibm.team.build.internal.template.id=com.ibm.team.build.ant
team.scm.buildOnlyIfChanges=true
outputRootDirectory=JKEBuild
team.scm.createFoldersForComponents=false
team.scm.workspaceUUID=_FdI4gLLtEeWDIeAzTW_Bmg
buildEngineId=jke.dev.engine
buildLabel=I20160822-1534
requestUUID=_MMEwcGhtEeaD9OIN0qZrCg
buildRequesterUserId=ralph
buildResultUUID=_MMEwcWhtEeaD9OIN0qZrCg
team.scm.acceptBeforeFetch=true
team.scm.deleteDestinationBeforeFetch=true
team.scm.componentLoadRules=
com.ibm.team.build.internal.engine.monitoring.threshold=3
team.scm.snapshotUUID=_MbXwsGhtEeaD9OIN0qZrCg

0 votes

Comments

I created the following ant script in my Eclipse workspace in a project which is under Jazz source control loaded from a repository workspace.

<?xml version="1.0" encoding="UTF-8"?>
<project name="Test" basedir="." default="echoWorkspace">
 <target name="echoWorkspace">
  <echo message="team.scm.workspaceUUID = ${team.scm.workspaceUUID}" />  
 </target>
</project>

I run this ANT script from eclipse by right clicking on it and choosing Run As->Ant Build. The output is:

Buildfile: C:\Sandbox\OCS\GenesysBuildResources\NewBuildTools\Test.xml
echoWorkspace:
     [echo] team.scm.workspaceUUID = ${team.scm.workspaceUUID}
BUILD SUCCESSFUL
Total time: 189 milliseconds

What I would like to achieve is that the output from the ANT script return the UUID of the remote workspace that the project was loaded from.

team.scm.workspaceUUID should give you that, I think. e.g.

<echo message="Workspace=${team.scm.workspaceUUID}" />

But for a normal build it would be the repository workspace that is default, only for personal builds it would be different, I think.

What is the benefit of showing the team.scm.workspaceUUID ?

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
× 12,065

Question asked: Aug 19 '16, 5:50 p.m.

Question was seen: 2,329 times

Last updated: Aug 23 '16, 9:19 a.m.

Confirmation Cancel Confirm