ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "broken connection" <brokenconnect...@gmail.com>
Subject Re: Editing an XML file using ant
Date Wed, 19 Sep 2007 18:42:32 GMT
Thanks for the advice..i am trying to do that but it's a deprecated task and
i am getting ClassNotFound exception for
org.apache.tools.ant.taskdefs.optional.TreXLiaison


I think,I need an optional.jar file...can you tell me where to download it
from,i cannot find it anywhere on net.

Thanks



On 9/19/07, Robert Koberg <rob@koberg.com> wrote:
>
> On Wed, 2007-09-19 at 13:45 -0400, broken connection wrote:
> > Hi Friends,
> >
> > I want to add some extra mime-mappings to an web.xml file  in the
> deployment
> > environment using my build script.I am trying using "XMLTASK" but for
> some
> > reason it's not working. Is there any other way using ANT to accomplish
> this
> > task.
>
> You could use the XSLT task with:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*"/>
>       <xsl:apply-templates/>
>     </xsl:copy>
>   </xsl:template>
>
>   <xsl:template match="mime-mapping[1]">
>     <xsl:apply-templates select="document('insert.xml')/*"/>
>     <xsl:copy-of select="."/>
>     <xsl:apply-templates/>
>   </xsl:template>
> </xsl:stylesheet>
>
>
> >
> > This is what i am trying with XMLTask:
> >
> > <xmltask source="${dest}/web.xml" dest="${dest}/web.xml" >
> >    <insert path="/web-app/mime-mapping[1]" position="before" file="
> > insert.xml">
> >    </insert>
> > </xmltask>
> >
> > It just copies the source web.xml to destination and does not appends
> > anything.
> >
> >
> > Thanks
> > Mick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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