Replace using Maven

mahesh_polina
mahesh_polina used Ask the Experts™
on
Hi,
Can anyone provide me an example of replace in Maven. Probably the one which will be ready to use.

Regards,
Mahesh.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi there,

what exactly do you mean?
What do you want to replace?

--TheDoctor

Author

Commented:
<plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
                  <goals>
                        <goal>run</goal>
            </goals>
            <configuration>
                        <target id="copy">
                              <replace dir="${basedir}" summary="true" includes="**/*.xml">
                                    <replacefilter token="@webservicename@" value="Mahesh"/>
                                    <replacefilter token="@webservicedelegate@" value="Mahesh" />
                                    <replacefilter token="@traceservicename@" value="Mahesh"/>
                              </replace>
                        </target>
            </configuration>
          </execution>
        </executions>
      </plugin>


Hi, as mentioned in the above code, i am trying to replace some of the text with the given text using Maven. Which is not working..i feel the piece of code is not getting executed when i run mvn package -e

Mahesh.

Author

Commented:
Finally i did the same way as mentioned in the attached link.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial