Use main ant build file call sub build file

Hi All,

In this article I will explain how to call the sub build.xml files. Whenever we have bigger project code base then it is always very much required to have small build script files. For example for Code review reports we can go for separate build script files, and we can invoke this script file from the main build script file. This will give ease in maintaining the build scripts and ease to read.

To invoke a sub build script file simply make the below call.

<target name="startBuild" description="Build the project" depends="someOtherRequiredStepTask">
<!-- Here we will call the sub build script file -->
<!-- If you want to pass on the same environment(properties) to the sub file set inheritall="true" -->

<antfile="/module1/build.xml" inheritall="false">
</target>

H T H.


Thanks
R Vashi

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s