overriding ant property from property file i.e. build.properties to property passing externally

ساخت وبلاگ

آخرین مطالب

امکانات وب

Vote count: 0

I am running junits tests from Jenkins CI server where we run ant target with buildDirectory property set as an argument

I am having 3 ant files e.g. A,B and C in different folders and each file has it's own build.properties file and A is calling other two files.

From Jenkins, I am calling ant A as below :

ant -file file.xml target -DbuildDirectory=$buildDirectory

all 3 build.properties files has property buildDirectory and it's value if different in each. when we pass property to the target as shown above, this property(buildDirectory) will be read from above mentioned and not from the build.properties file. So this is what I expected and working fine!

The Problem here is, this buildDirectory property is also getting updated in all the ant files i.e. B and C, which I don't want!

so this externally passed property is overriding the property value in other two ant files also but I want other 2 files should take value from there respective build.properties files.
So, is there any way to achieve this, Any suggestions are really appreciated

please come back for any clarification needed

Thanks, Ganesh

asked 49 secs ago

نویسنده : استخدام کار بازدید : 34 تاريخ : چهارشنبه 23 خرداد 1397 ساعت: 17:41

تبلیغات در اینترنت