ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vihan Pandey" <vihanpan...@gmail.com>
Subject creating a build file via another build file
Date Fri, 17 Aug 2007 11:28:46 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message