akakade
akakade

Reputation: 1

Passing property file names as Parameter value to ANT inside Eclipse

Currently in eclipse we directly execute ant script by right clicking on them RUn as> ant Build. Also we have one build properties . but as the complexity of our project has grown is there a way we can use different proper files like Buildfile_test.properties , buildfile_QA.properties and pass the name when running ant from within eclipse without having to modify the build.xml ever time?

Upvotes: 0

Views: 2868

Answers (1)

greg-449
greg-449

Reputation: 111142

You can define an argument with the property file name to the build in the 'Arguments' section of the Run > External Tools > External Tools Configuration for your Ant Build. Something like:

-Dproperties=Buildfile_test.properties

You use this in your build.xml like this:

<property file="${properties}"/>

Upvotes: 1

Related Questions