[ http://jira.codehaus.org/browse/MNG-2097?page=comments#action_68909 ] 

Al Robertson commented on MNG-2097:
-----------------------------------

Oliver,
I made the change you suggested - and now have a new phase in my environment.
Using a profile, my ant tasks get fired correctly on the pre-package phase.

My issue now is that I need to bind the WAR plugin exploded goal to the 
'pre-package' phase - not the 'package' phase.
It is not getting fired in the new pre-package phase as I expect.
I have locally installed a snapshot version of the WAR plugin with the 
annotation phase changed and I can see the change in the plugin.xml.

<mojo>
      <goal>exploded</goal>
      <description>Generate the exploded webapp</description>
      ......
      <phase>pre-package</phase>
      
<implementation>org.apache.maven.plugin.war.WarExplodedMojo</implementation>
      <language>java</language>
      .....

I've configured the WAR plugin in my project pom to use the local snapshot and 
I have the debug line
[DEBUG] maven-war-plugin: using locally installed snapshot
produced when I execute >mvn pre-package
but it's not running the war:exploded goal!

Any ideas. Is there a configuration cache I need to reset? Do the plugin phase 
bindings get evaluated at runtime every time?
Any help appreciated.

> adding a phase called prepare-package
> -------------------------------------
>
>          Key: MNG-2097
>          URL: http://jira.codehaus.org/browse/MNG-2097
>      Project: Maven 2
>         Type: New Feature

>   Components: Plugins and Lifecycle
>     Versions: 2.0.2
>  Environment: all
>     Reporter: Olivier Lamy
>      Fix For: 2.1
>  Attachments: MNG-2097.diff
>
>
> Hi,
> I have an artifact (packaging war).
> I have some jobs to do (xdoclet-maven-plugin others internal plugin) which 
> are only needed for included materials in the war :
> - web.xml
> - automatic generated pages (about page etc..)
> Actually I attached it tho the phase process-classes or test.
> But when I just want to try a simple the simple : mvn -Dtest=something clean 
> test.
> All of my .java are parsed by the plugin and all other jobs made whereas this 
> should be done in a phase just before packaging.
> I really need a phase just before package to place all this jobs.
> Probably this can be extends to phase deploy.
> Olivier

-- 
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

Reply via email to