What is the format to pass 'Ant arguments' through RTC
Hi ,
Could anyone please tell me how to pass 'Ant arguments' through RTC? I want to be able to pass a build definition name as argument to build.xml associated to that build definition.
Through command line I would use, for example, ant -DbuildDefintion = myBuildDefinition and define -DbuildDefintion in my build.xml
I want to be able to pass the argument similarly in RTC, that is through the field 'Ant Arguments' in the Ant tab of a build definition. What would I write in this field, so that I can retrieve it as a variable in the associated build.xml?
Thanks for your help!
Ananya
Could anyone please tell me how to pass 'Ant arguments' through RTC? I want to be able to pass a build definition name as argument to build.xml associated to that build definition.
Through command line I would use, for example, ant -DbuildDefintion = myBuildDefinition and define -DbuildDefintion in my build.xml
I want to be able to pass the argument similarly in RTC, that is through the field 'Ant Arguments' in the Ant tab of a build definition. What would I write in this field, so that I can retrieve it as a variable in the associated build.xml?
Thanks for your help!
Ananya
One answer
Hi Ananya,
The online help has is some documentation on ant build properties. There are a number of built-in properties listed there as well.
There is a "Properties" tab in the build definition editor for an ant build. All the properties defined here will end up on the ant command line and will be available in your build.xml as you would expect. This is best way for you to specify your properties.
You can also use the "Ant Arguments" field in the Ant tab. There the syntax would be the same as the command line: "-DmyPropertyName=myPropertyValue". Generally I would specify individual properties using the properties tab, the argument field would be used for other ant options, for example if you wanted to specify an entire properties file: "-propertyfile myFile.properties".
The online help has is some documentation on ant build properties. There are a number of built-in properties listed there as well.
There is a "Properties" tab in the build definition editor for an ant build. All the properties defined here will end up on the ant command line and will be available in your build.xml as you would expect. This is best way for you to specify your properties.
You can also use the "Ant Arguments" field in the Ant tab. There the syntax would be the same as the command line: "-DmyPropertyName=myPropertyValue". Generally I would specify individual properties using the properties tab, the argument field would be used for other ant options, for example if you wanted to specify an entire properties file: "-propertyfile myFile.properties".