You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Nagesh, Srinivas (IS Consultant)" <SN...@consultantemail.com> on 2007/04/03 16:40:03 UTC
Call Ant Tasks from Maven2
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
RE: Call Ant Tasks from Maven2
Posted by franz see <fr...@gmail.com>.
Good day to you, Sri,
<plugin><goals/></plugin is depracated and unused my maven ( see [1] ).
Declare your goals within an execution section. And from there, you can
declare the <phase> where you will bind your goals. Something like this...
<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>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
..Btw, there's no "clean" goal for the antrun plugin ( see [2] ).
Cheers,
Franz
[1] http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_plugin
[2] http://maven.apache.org/plugins/maven-antrun-plugin
Nagesh, Srinivas (IS Consultant) wrote:
>
> 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:franz.see@gmail.com]
> Sent: Tuesday, April 03, 2007 9:23 PM
> To: users@maven.apache.org
> 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:raphaelpieroni@gmail.com]
>>> 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)
>>> <SN...@consultantemail.com>:
>>> > 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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>> !DSPAM:546,4612cd59326371804284693!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Call-Ant-Tasks-from-Maven2-tf3514647s177.html#a9839104
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Call Ant Tasks from Maven2
Posted by "Nagesh, Srinivas (IS Consultant)" <SN...@consultantemail.com>.
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:franz.see@gmail.com]
Sent: Tuesday, April 03, 2007 9:23 PM
To: users@maven.apache.org
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:raphaelpieroni@gmail.com]
>> 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) <SN...@consultantemail.com>:
>> > 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>> !DSPAM:546,4612cd59326371804284693!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Call Ant Tasks from Maven2
Posted by franz see <fr...@gmail.com>.
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:raphaelpieroni@gmail.com]
>> 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) <SN...@consultantemail.com>:
>> > 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>> !DSPAM:546,4612cd59326371804284693!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Call Ant Tasks from Maven2
Posted by "Henry S. Isidro" <hi...@exist.com>.
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:raphaelpieroni@gmail.com]
> 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) <SN...@consultantemail.com>:
> > 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> !DSPAM:546,4612cd59326371804284693!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Call Ant Tasks from Maven2
Posted by "Nagesh, Srinivas (IS Consultant)" <SN...@consultantemail.com>.
This is the debug information. The tasks= is shown as empty. Would that be the reason why its not able to find any tasks to execute? If so why?
-----Original Message-----
From: Nagesh, Srinivas (IS Consultant)
Sent: Tuesday, April 03, 2007 5:55 PM
To: Maven Users List
Subject: RE: Call Ant Tasks from Maven2
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:raphaelpieroni@gmail.com]
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) <SN...@consultantemail.com>:
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Call Ant Tasks from Maven2
Posted by "Nagesh, Srinivas (IS Consultant)" <SN...@consultantemail.com>.
Sorry, here is the debug info
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.1:run'
-->
[DEBUG] (f) artifacts = [ant:ant-antlr:jar:1.6.5:compile, ant:ant:jar:1.6.5:ru
ntime, ant:ant-launcher:jar:1.6.5:runtime, org.apache.maven:maven-project:jar:2.
0.1:runtime, org.apache.maven:maven-plugin-api:jar:2.0.1:runtime]
[DEBUG] (f) project = org.apache.maven.project.MavenProject@f7afcac6
[DEBUG] (f) tasks =
[DEBUG] -- end configuration --
[INFO] [antrun:run]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO]
-----Original Message-----
From: Nagesh, Srinivas (IS Consultant)
Sent: Tuesday, April 03, 2007 5:55 PM
To: Maven Users List
Subject: RE: Call Ant Tasks from Maven2
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:raphaelpieroni@gmail.com]
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) <SN...@consultantemail.com>:
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Call Ant Tasks from Maven2
Posted by "Nagesh, Srinivas (IS Consultant)" <SN...@consultantemail.com>.
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:raphaelpieroni@gmail.com]
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) <SN...@consultantemail.com>:
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Call Ant Tasks from Maven2
Posted by Raphaël Piéroni <ra...@gmail.com>.
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) <SN...@consultantemail.com>:
> 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
>