maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Baumgardner (JIRA)" <>
Subject [jira] (MNG-5490) Add support for "lifecycle" activation for profiles
Date Mon, 01 Jul 2013 20:49:05 GMT
Gregory Baumgardner created MNG-5490:

             Summary: Add support for "lifecycle" activation for profiles
                 Key: MNG-5490
             Project: Maven 2 & 3
          Issue Type: Improvement
          Components: Profiles
    Affects Versions: 2.2.1
         Environment: Windows 7
            Reporter: Gregory Baumgardner
            Priority: Minor

I have the following scenario: Initialization step is done in the default lifecycle "initialize"
phase which sets properties that are used in later build phases.  Unfortunately, the same
properties need set in the "clean" lifecycle in order to use them in the clean phase.  There
is no way to easily run the same execution of plugins without duplication.  However, it turns
out very easy to manipulate the phase attribute in the following way:



      <name>java.version</name> <!-- Always on -->
   ... <!-- Whatever plugin -->
             <id>initialize properties</id>
             <goals><goal><!--The goal --></goal></goals>
               <!-- The plugin config to use -->

This will run the initialize step under initialize phase for default lifecycle and under pre-clean
phase for clean lifecycle provided that the config information falls after the property set
in a profile.  However, the one issue I have with this is that it requires you to run Maven
with -Dclean-all property on the command line.  It would be even better if there was an activation
for <lifecycle> that could be set to "default", "clean", "site", etc.  Then, the activation
can occur when that specific lifecycle is invoked during the build.  As far as I can tell,
there is no other way to determine this information.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message