You are embedding xml statements in <echo> and this is not allowed, you could
use <echoxml> instead.
But you have also a xml declaration in your echo
<?xml version="1.0" encoding="UTF-8"?>
You could leave that or you have to use <echo> and encode the xml-charachter
(<>&...).
I have a little perl script for masking - for my own need:
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
use Win32::Clipboard;
$CLIP = Win32::Clipboard();
$clip = $CLIP->Get();
$clip =~ s/</</g;
$clip =~ s/>/>/g;
$clip =~ s/"/"/g;
$CLIP->Set($clip);
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
So you would write something like
<echo file...>
<?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>
Jan
-----Ursprüngliche Nachricht-----
Von: Vihan Pandey [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 17. August 2007 13:29
An: [email protected]
Betreff: 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]