Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven Ant xml task not working

 
Anu Devarla
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am using maevn ant xml task for manipulating xml i.e replacing the attribute value. following is the pom.xml entries, not able to copy the file to destination folder and manipulate it .But build is successful

My xml entires are :
<deployment>
<sources>
<repository url="http://mvnrepo.9090/nexus/content/repositories/releases">

pom.xml : I downloaded xmltask.jar and added to my local m2 repository.

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>com.oopsconsultancy</groupId>
<artifactId>xmltask</artifactId>
<version>1.14</version>
<classifier>local</classifier>
</dependency>
</dependencies>
<executions>
<execution>
<phase>prepare-package</phase>
<configuration>
<tasks>
<echo message="Using testing configuration" />
<taskdef name="xmltask"
classname="com.oopsconsultancy.xmltask.ant.XmlTask"
classpath="xmltask-1.14-local.jar"/>
<target name="default">
<xmltask
source="C:\Maven\artifact_config.xml"
dest="C:\Maven]\artifact_config_new.xml"
preserveType="true">
<replace path="/deployment/sources/@url" withText="http;//suguna.com" />
</xmltask>
</target>
</tasks>
</configuration>
</execution>
</executions>
</plugin>


Let me now wts wrong. Any help is appreciated.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you saying there are no errors or warnings; it just doesn't copy?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic