[ 
https://jira.codehaus.org/browse/MNG-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=347738#comment-347738
 ] 

Paul Benedict edited comment on MNG-3522 at 6/9/14 1:39 PM:
------------------------------------------------------------

A discussion occurred on the developer's mailing list about this feature 
request:
http://mail-archives.apache.org/mod_mbox/maven-dev/201406.mbox/%3ccablgb9ysrnzdjz5cwbkcwjercnd4nkjbdca+1n7pp7wqgww...@mail.gmail.com%3E

The general agreement was that a numbered ordering was too brittle of a 
feature, but rather Maven should be informed which plugins depend on others. 
Maven will then determine the execution order based on that information. Here 
is a sample configuration. The {{dependsOn}} attribute is what's new. Order of 
the plugins do not matter.

{code}
<plugins>
  <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution dependsOn="copy-dependencies">
        <id>do-something</id>
        <phase>package</phase>
        ...
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
      <execution>
        <id>copy-dependencies</id>
        <phase>package</phase>
        ...
      </execution>
    </executions>
  </plugin>
</plugins>
{code}


was (Author: paul4christ79):
A discussion occurred on the developer's mailing list about this feature 
request:
http://mail-archives.apache.org/mod_mbox/maven-dev/201406.mbox/%3ccablgb9ysrnzdjz5cwbkcwjercnd4nkjbdca+1n7pp7wqgww...@mail.gmail.com%3E

The general agreement was that a numbered ordering was too brittle of a 
feature, but rather Maven should be informed which plugins depend on others. 
Maven will then determine the execution order based on that information. Here 
is a sample configuration. The {{dependsOn}} attribute is what's new. Order of 
the plugins do not matter.

{code}
<plugins>
  <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution dependsOn="copy-dependencies">
        <phase>package</phase>
        ...
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
      <execution>
        <id>copy-dependencies</id>
        <phase>package</phase>
        ...
      </execution>
    </executions>
  </plugin>
</plugins>
{code}

> Cannot define execution order explicitly
> ----------------------------------------
>
>                 Key: MNG-3522
>                 URL: https://jira.codehaus.org/browse/MNG-3522
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.0.9
>            Reporter: Thomas Diesler
>             Fix For: Issues to be reviewed for 3.x
>
>
> In this example antrun:run is excuted after dependency:copy-dependencies by 
> virtue of plugin order. Preferable would be an explicit order definition. For 
> example, a plugin could export a 'phase-id' that another uses in its 'phase' 
> element.
> {code:xml}
> <plugins>
>   <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-dependency-plugin</artifactId>
>     <executions>
>       <execution>
>         <id>copy-dependencies</id>
>         <phase>package</phase>
>         <goals>
>           <goal>copy-dependencies</goal>
>         </goals>
>         <configuration>
>           
> <outputDirectory>${project.build.directory}/thirdparty</outputDirectory>
>           <stripVersion>true</stripVersion>
>         </configuration>
>       </execution>
>     </executions>
>   </plugin>
>   <plugin>
>     <artifactId>maven-antrun-plugin</artifactId>
>     <executions>
>       <execution>
>         <phase>package</phase>
>         <goals>
>           <goal>run</goal>
>         </goals>
>         <configuration>
>           <tasks>
>             <ant antfile="ant/build-concat.xml"/>
>           </tasks>
>         </configuration>
>       </execution>
>     </executions>
>   </plugin>
> </plugins>
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to