Once the build.xml file is executed, I want to check some properties in the build.xml to handle some errors in my Java code.
For infos, my Ant file (build.xml) is executed this way (not all the code is present):
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null,
ITaskLauncherConstants.LAUNCHER_NAME);
/* Configure the ILaunchConfiguration (not all setAttribute calls are presents) :*/
workingCopy.setAttribute(IExternalToolConstants.ATTR_LOCATION, "build.xml");
/* Launch the task, where monitor is a IProgressMonitor */
ILaunch lc = workingCopy.launch(ILaunchManager.RUN_MODE, monitor);
And in my build.xml file I have some properties :
<!-- In Ant File -->
<property name="fail.message" value="true" />
Is it possible to check the content of the property in Java code ? Something like :
/* In Java code */
lc.getProperty("fail.message");
Of course, this would mean that the class would "record" the build.xml properties.
Same question has been asked 6 months ago, but the answer is not working (I tried):
How to set a property in java code using build.xml
Thanks for any suggestion.