You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by paladine <ya...@yahoo.com> on 2010/10/26 07:35:55 UTC
maven-antrun-plugin
hi
i want to run a script after building war and to do it i used
'maven-antrun-plugin' but the script i wrote runs in wrong order.
even though i placed this plugin tags at the bottom of <build>, it runs
firstly.
my purpose is sending war file to a remote server but because this script
run before building war, i need another ways to solve my problem.
Any ideas ?
thanks in advance
--
View this message in context: http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3236582.html
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: maven-antrun-plugin
Posted by Anders Hammar <an...@hammar.net>.
And if you want to learn more about Maven's lifecycle, read here:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
/Anders
On Sun, Oct 31, 2010 at 20:35, Anders Hammar <an...@hammar.net> wrote:
> http://maven.apache.org/plugins/maven-antrun-plugin/usage.html
> shows this pretty good I think. Put "deploy" as the phase.
>
> /Anders
>
>
> On Sun, Oct 31, 2010 at 03:45, paladine <ya...@yahoo.com> wrote:
>
>>
>> i agree with you Andres, probably it is bound to wrong phase but i
>> couldn't
>> find any document about <phase> tag.
>> Do you know which value is available for my situation ?
>>
>> thanks in advance
>> --
>> View this message in context:
>> http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3243790.html
>> 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: maven-antrun-plugin
Posted by Anders Hammar <an...@hammar.net>.
http://maven.apache.org/plugins/maven-antrun-plugin/usage.html
shows this pretty good I think. Put "deploy" as the phase.
/Anders
On Sun, Oct 31, 2010 at 03:45, paladine <ya...@yahoo.com> wrote:
>
> i agree with you Andres, probably it is bound to wrong phase but i couldn't
> find any document about <phase> tag.
> Do you know which value is available for my situation ?
>
> thanks in advance
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3243790.html
> 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: maven-antrun-plugin
Posted by paladine <ya...@yahoo.com>.
i agree with you Andres, probably it is bound to wrong phase but i couldn't
find any document about <phase> tag.
Do you know which value is available for my situation ?
thanks in advance
--
View this message in context: http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3243790.html
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: maven-antrun-plugin
Posted by Jörg Schaible <jo...@gmx.de>.
paladine wrote:
>
> yes i can see it in build log but i can't intervene
> after checking dependencies, ant script runs before creating war file.
> any suggestions ?
Can you hava look at help:effective-pom? Maybe you inherit another
executionfrom your parent.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-antrun-plugin
Posted by Anders Hammar <an...@hammar.net>.
The antrun-plugin execution must be bound to the wrong phase then.
/Anders
On Wed, Oct 27, 2010 at 09:01, paladine <ya...@yahoo.com> wrote:
>
> yes i can see it in build log but i can't intervene
> after checking dependencies, ant script runs before creating war file.
> any suggestions ?
>
> thanks in advance
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3238246.html
> 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: maven-antrun-plugin
Posted by paladine <ya...@yahoo.com>.
yes i can see it in build log but i can't intervene
after checking dependencies, ant script runs before creating war file.
any suggestions ?
thanks in advance
--
View this message in context: http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3238246.html
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: maven-antrun-plugin
Posted by Anders Hammar <an...@hammar.net>.
Hmm, the war is created in the package phase, so your ant stuff executing in
the deploy phase should happen after the war is created.
You should be able to see this in the log output of the build.
/Anders
On Tue, Oct 26, 2010 at 10:28, paladine <ya...@yahoo.com> wrote:
>
> it is already on the last phase.
> i am adding my <build> tag of pom.xml
>
> thanks in advance
>
>
> <build>
> <finalName>asd</finalName>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.0</version>
> <configuration>
> <source>1.6</source>
> <target>1.6</target>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.0</version>
> <configuration>
> <warName>asd</warName>
> <webResources>
> <resource>
> <!-- this is relative to the pom.xml directory -->
>
> <directory>src/main/webapp</directory>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <version>1.6</version>
> <executions>
> <execution>
> <!--phase>generate-sources</phase-->
> <phase>deploy</phase>
> <configuration>
> <tasks>
> <exec
> executable="src/main/files/script"
> failonerror="true">
> </exec>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3236700.html
> 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: maven-antrun-plugin
Posted by paladine <ya...@yahoo.com>.
it is already on the last phase.
i am adding my <build> tag of pom.xml
thanks in advance
<build>
<finalName>asd</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<warName>asd</warName>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>src/main/webapp</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<!--phase>generate-sources</phase-->
<phase>deploy</phase>
<configuration>
<tasks>
<exec
executable="src/main/files/script"
failonerror="true">
</exec>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
--
View this message in context: http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3236700.html
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: maven-antrun-plugin
Posted by Anders Hammar <an...@hammar.net>.
Bind it to a later phase? Or have it in a separate module?
/Anders
On Tue, Oct 26, 2010 at 07:35, paladine <ya...@yahoo.com> wrote:
>
> hi
> i want to run a script after building war and to do it i used
> 'maven-antrun-plugin' but the script i wrote runs in wrong order.
> even though i placed this plugin tags at the bottom of <build>, it runs
> firstly.
> my purpose is sending war file to a remote server but because this script
> run before building war, i need another ways to solve my problem.
> Any ideas ?
>
> thanks in advance
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-antrun-plugin-tp3236582p3236582.html
> 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
>
>