Thanks Franz and Henry,
I tried out the following
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-antlr</artifactId>
<version>1.6.5</version>
</dependency>
</dependencies>
<configuration>
<tasks><copy file="c:/temp/test.txt" todir="c:/"/></tasks>
</configuration>
<goals>
<goal>clean</goal>
<goal>run</goal>
</goals>
</plugin>
The above works for mvn antrun:run and not for mvn install. I tried mentioning
the execution phase as install but that didn't work either.
Any thoughts?
Sri
-----Original Message-----
From: franz see [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 9:23 PM
To: [email protected]
Subject: Re: Call Ant Tasks from Maven2
Good day,
...Or follow Nap's advice in [1] ( paragraph 1 ), by placing your antrun's
configuration section directly under <plugin> instead of under <excecution>
:)
In that way, all antrun executions of your maven project ( i.e mvn install,
mvn antrun:run ) will have that configuration.
Cheers,
Franz
[1]
http://www.nabble.com/maven-antrun-plugin%3A-Need-phase-indenedence-and-or-conditional-processing-tf3492506s177.html
Henry S. Isidro wrote:
>
> Hi,
>
> Looking at your configuration, you have bound the execution of the antrun
> plugin to the install phase. Issuing 'mvn install' instead of 'mvn
> antrun:run' would make it run.
>
> HTH,
> Henry
>
> On Wednesday, April 4, 2007 05:54, Nagesh, Srinivas (IS Consultant) wrote:
>> I tried the following
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-antrun-plugin</artifactId>
>> <dependencies>
>> <dependency>
>> <groupId>ant</groupId>
>> <artifactId>ant-antlr</artifactId>
>> <version>1.6.5</version>
>> </dependency>
>> </dependencies>
>> <executions>
>> <execution>
>> <phase>install</phase>
>> <configuration>
>> <tasks>
>> <echo> Hello World </echo>
>> </tasks>
>> </configuration>
>> <goals>
>> <goal>run</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>>
>> And ran the command "mvn antrun:run"
>>
>> The result in the console was
>>
>> [INFO] [antrun:run]
>> [INFO] Executing tasks
>> [INFO] Executed tasks
>>
>> Still not printing hello world
>>
>> Thanks
>>
>> Sri
>>
>> -----Original Message-----
>> From: Raphaël Piéroni [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, April 03, 2007 11:48 AM
>> To: Maven Users List
>> Subject: Re: Call Ant Tasks from Maven2
>>
>> Hi,
>>
>> Here what i have (And it works fine using maven 2.0.5)
>>
>> Raphaël
>>
>>
>> <project>
>> ...
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-antrun-plugin</artifactId>
>> <dependencies>
>> <dependency>
>> <groupId>ant</groupId>
>> <artifactId>ant-antlr</artifactId>
>> <version>1.6.5</version>
>> </dependency>
>> </dependencies>
>>
>> <executions>
>> <execution>
>> <id>archetype-test</id>
>> <phase>process-test-resources</phase>
>> <configuration>
>> <tasks>
>> <mkdir dir="${basedir}/somedir/"></mkdir>
>>
>> <jar
>> destfile="${basedir}/somedir/some.jar"
>> basedir="${basedir}/src/test/somedir/"></jar>
>> </tasks>
>> </configuration>
>> <goals>
>> <goal>run</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </build>
>> </project>
>>
>> 2007/4/3, Nagesh, Srinivas (IS Consultant) <[EMAIL PROTECTED]>:
>> > Hey,
>> >
>> > I am using Maven2 to call an ant task but somehow I don't see the task
>> > doing its job here. I am a newbie to these build tools.
>> >
>> > <artifactId>maven-antrun-plugin</artifactId>
>> > <executions>
>> > <execution>
>> > <phase>install</phase>
>> > <configuration>
>> > <tasks>
>> > <echo>Hello World</echo>
>> > </tasks>
>> > </configuration>
>> > <goals>
>> > <goal>run</goal>
>> > </goals>
>> > </execution>
>> > </executions>
>> > </plugin>
>> >
>> > I don't see "Hello World" being printed on the console when I run "mvn
>> > -e antrun:run". Secondly this plug-in doesn't get executed as part of
>> > the default goal "install" that I have specified in the POM.
>> >
>> > Any thoughts?
>> >
>> > Thanks
>> >
>> > Sri
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> !DSPAM:546,4612cd59326371804284693!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Call-Ant-Tasks-from-Maven2-tf3514647s177.html#a9829389
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]