According to the documentation [1] you can use property replacement in the ant script by providing properties to the antrun-plugin.
[1] http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html Hth, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Wed, Apr 29, 2009 at 8:54 PM, huser <[email protected]> wrote: > > Hi, > > I have a maven-antrun-plugin in sub-project\pom.xml which does this: > > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <id>extract-xsds</id> > <phase>initialize</phase> > <configuration> > > <tasks> > <ant antfile="${basedir}/xsd-extract.xml"> > <target name="retrieve-xsds"/> > </ant> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > > In the file xsd-extract.xml there is a target. I need to replace the version > infor with ${project.parent.version}. How can I do this ? I am fairly new to > ANT/Maven. > > TIA, > > > <target name="retrieve-xsds" depends="check-current" > unless="source.files.are.current"> > <delete dir="target/jaxws/resources"/> > <mkdir dir="target/jaxws/resources"/> > <unjar > src="${env.M2_REPO}/com/abc/t3/abc-websvc-api/1.5-SNAPSHOT/abc-websvc-api-1.5-SNAPSHOT.jar" > dest="target/jaxws/resources"> > <patternset> > <include name="**/*.xsd"/> > </patternset> > </unjar> > -- > View this message in context: > http://www.nabble.com/Maven-variable-in-antrun-plugin-tp23299675p23299675.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
