ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin HaleBoyes <>
Subject replacing text in a file during a copy
Date Thu, 21 Nov 2002 19:06:56 GMT
I have a web application deployment descriptor web.xml in a file.
I've run the JspC task with the -webinc arguement which creates a
portion of the deployment descriptor (webinc.xml) for the JSP

I need to merge the webinc.xml file into the web.xml file when
I build my project.

I've tried the <loadfile> task with a <filterchain> which didn't
work.  I've also tried the <copy> task with a <filterset> but that
also didn't work.

Specifically, I have a token in the web.xml
file marked @WEBINC@ and the following target:

<target    name="merge-descriptor-2">
 <loadfile property="webinc.xml" srcFile="webinc.xml"/>
 <copy file="web.xml" toFile="dist/web.xml">
     <filter token="WEBINC" value="${webinc.xml}/>

but this results in the following error message:
file:/home/hb/Work/cml/tmp/build.xml:43: The value of attribute
"value" must not contain the '<' character.

So I tried this target...

<target    name="merge-descriptor-3">
 <loadfile property="webinc.xml" srcFile="webinc.xml"/>
 <loadfile property="web.xml" srcFile="web.xml">
           <token key="WEBINC" value="${webinc.xml}"/>
 <echo message="${web.xml}" file="dist/web.xml">

and I get the same error.

How can I perform this merge?

Do you Yahoo!?
Yahoo! Mail Plus  Powerful. Affordable. Sign up now.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message