You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Robert Maguire <ro...@autodesk.com> on 2003/12/15 16:59:54 UTC

Webxmlmerge Ant Task problem

Howdy,
	I was having some trouble with the webxmlmerge on one of my
machines and I can't figure out why.  Two other machines we have run
just fine.  Ant is complaining that the srcfile attribute of the task is
missing, but I'm pretty sure I have it right.  I've reduced my ant xml
to:

<?xml version="1.0"?>
<project name="test" default="init" basedir=".">

	<target name="init">
    <taskdef resource="cactus.tasks" />
    <webxmlmerge
srcfile="D:\sst\prd\webroots\subscription\WEB-INF\web.xml"
 
destfile="D:\sst\nonprd\output\webapps\subscription-cactus\WEB-INF\web.x
ml"
                 mergefile="D:\sst\nonprd\tools\cactus\web\web.xml"
                 force="true" indent="true"/>
	</target>
</project>

And I continue to get:

BUILD FAILED
file:D:/sst/nonprd/tools/ant/buildtest.xml:9: The [srcfile] attribute is
require
d
        at
org.apache.cactus.integration.ant.WebXmlMergeTask.execute(WebXmlMerge
Task.java:134)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 1 second
D:\sst\nonprd\tools\ant>

When, as far as I can tell, I have included the srcfile attribute.  This
only seems to be the case on one machine, two others work fine.  Has
anyone ever seen this before?  Is there some configuration I'm missing?
I tried searching the mail archives and didn't find anything on this
subject.

Any help would be appreciated.

Thank you,

Rob

Re: Webxmlmerge Ant Task problem

Posted by Christopher Lenz <cm...@gmx.de>.
Am 15.12.2003 um 16:59 schrieb Robert Maguire:
> Howdy,
> 	I was having some trouble with the webxmlmerge on one of my
> machines and I can't figure out why.  Two other machines we have run
> just fine.  Ant is complaining that the srcfile attribute of the task  
> is
> missing, but I'm pretty sure I have it right.  I've reduced my ant xml
> to:
>
> <?xml version="1.0"?>
> <project name="test" default="init" basedir=".">
>
> 	<target name="init">
>     <taskdef resource="cactus.tasks" />
>     <webxmlmerge
> srcfile="D:\sst\prd\webroots\subscription\WEB-INF\web.xml"
>
> destfile="D:\sst\nonprd\output\webapps\subscription-cactus\WEB- 
> INF\web.x
> ml"
>                  mergefile="D:\sst\nonprd\tools\cactus\web\web.xml"
>                  force="true" indent="true"/>

Hmm, the backslashes are escapes here, I think. You'll either need  
double backslashes everywhere, or simply use a forward slash.

Otherwise, try running with "ant -verbose" or "ant -debug", and check  
if there's anything weird appearing in the output.

Cheers,
   Chris
--
Christopher Lenz
/=/ cmlenz at gmx.de