To call the build.xml file and run it from an object in another build.xml file

I have a Build.xml file. Using this file, I want to run another build.xml file, which is located elsewhere using ant. How can I achieve this ...?

+3
source share
2 answers

In short, you have two options.

You can include / import another ant file so that you can depend on the targets or call its macros. This method merges another assembly file. This is more efficient if you call many targets, since the file is downloaded only once. this answer for more information on the difference between importand includeand more detailed information refer to the official documentation ( import , include ).

Another way is to execute another ant file in a new process using ant. This way you can achieve greater isolation between the two build files, but another file will be downloaded once for each call.

antcall / . , , , ant . depends antcall .

+2
+1

All Articles