You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Vihan Pandey <vi...@gmail.com> on 2007/08/17 13:28:46 UTC
creating a build file via another build file
Hello,
I have an a build file which generates another build file and then
executes it. I am creating the 2nd build file via an echo task to the file.
Something like this :
this is deploy.xml :
<?xml version="1.0" encoding="UTF-8"?>
<project name="xmlgen" default="init" basedir=".">
<!-- Generate Deployment Script -->
<target name="init">
<echo file="build.xml.static-assets">
<?xml version="1.0" encoding="UTF-8"?>
<project name="deploy" default="start" basedir=".">
<target name="first">
<exec executable="svn">
<arg value="co"/>
<arg value="
http://foo.com/svn/repos/" />
</exec>
</target>
</project>
</echo>
</target>
<target name="execute">
<exec executable="ant">
<arg value="-f"/>
<arg value="build.xml.static-assets"/>
<arg value="start"/>
</exec>
</target>
</project>
and doing :
# anf -f deploy.xml init
should generate build.xml.static-assets and execute it via :
# ant -f build.xml.static-assets start
Currently executing the same gives me an error:
``The content of elements must consist of well-formed character data or
markup."
the build.xml.static-assets works stand alone but I want that file to be
generated through another ant script. Any suggestions?
Regards,
-vihan