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">

H T H.

R Vashi

Leave a Reply

Please log in using one of these methods to post your comment: Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.