Can I determine repository workspace from ANT script?

One answer

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