I have the following project structure:
root/
comp/
env/
version/
build.xml
build.xml
build.xml
Where root/comp/env/version/build.xml is:
<project name="comp-env-version" basedir=".">
<import file="../build.xml" optional="true" />
<echo>Comp Env Version tasks</echo>
<target name="run">
<echo>Comp Env Version run task</echo>
</target>
</project>
root/comp/env/build.xml is:
<project name="comp-env" basedir=".">
<import file="../build.xml" optional="true" />
<echo>Comp Env tasks</echo>
<target name="run">
<echo>Comp Env run task</echo>
</target>
</project>
root/comp/build.xml is:
<project name="comp" basedir=".">
<echo>Comp tasks</echo>
</project>
Each build file imports the parent build file and each child inherits and overrides parent tasks/properties.
What I need is to get the generated build XML without run anything.
For example, if I run "ant" (or something like that) on root/comp/env/version/, I would like to get the following output:
<project name="comp-env-version" basedir=".">
<echo>Comp tasks</echo>
<echo>Comp Env tasks</echo>
<echo>Comp Env Version tasks</echo>
<target name="run">
<echo>Comp Env Version run task</echo>
</target>
</project>
Is there an Ant plugin to do this? With Maven? What are my options if not?
EDIT:
I need something like "mvn help:effective-pom" for Ant.