Is only binding plugins to lifecycles a regression?
---------------------------------------------------
Key: MNG-2415
URL: http://jira.codehaus.org/browse/MNG-2415
Project: Maven 2
Type: Improvement
Components: Profiles, Plugins and Lifecycle
Reporter: Al Robertson
Firstly, m2 - fantastic effort b.t.w.
I have written a profile for the WAR plugin in m2 to replicate some maven 1
jelly defined in a post:Goal.
Its purpose is to alter the webapp (delete a file in the example) for certain
situations, e.g. a production war compared with a development war.
I'm doing this with the antrun plugin.
My issue is that I can't bind it to a lifecycle phase - "package" in this case.
I want to execute the ant tasks on the exploded war before it is archived -
that's in-between phases!
Any thoughts on how I can achieve this?
With m1, we could use pre & post goal. Binding functionality to a lifecycle
seems to be a regression when a lifecycle phase consists of a number of goals.
I can't find any docs on binding to anything but the lifecycle. Should
'package' should be split into package-explode and package-archive?
<profile>
<id>prod</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<echo>Delete default.xml</echo>
<delete
file="${project.build.directory}/${project.build.finalName}/WEB-INF/xml/models/default.xml"
/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<activation>
<property>
<name>prod</name>
</property>
</activation>
</profile>
Thanks,
Al
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira