You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Chris Hagmann (JIRA)" <ji...@codehaus.org> on 2006/01/10 17:25:02 UTC

[jira] Created: (MNG-1950) Ability to introduce new lifecycles phases

Ability to introduce new lifecycles phases
------------------------------------------

         Key: MNG-1950
         URL: http://jira.codehaus.org/browse/MNG-1950
     Project: Maven 2
        Type: Improvement

  Components: Plugins and Lifecycle  
    Versions: 2.0.1    
    Reporter: Chris Hagmann
    Priority: Blocker


I have simple use case which I cannot resolve with Maven 2 as it is right now. I have a project (actually many), where I need to do the following:

- Create an JAR artifact (standard stuff, easily possible)
- Create a source code artifact (standard stuff, easily possible)
- Create Javadoc and a JAR archive of it (not possible, I explain why).
- Create a distribution package with release notes, customized reports, Javadoc, JAR, dependencies, documentation, filtered files, etc. (not possible, I explain why and will file another JIRA issue for this)

The constraint is that I need to create all 4 artifacts and have them installed them in the repository when using "mvn install".

As there are no other appropriate lifecycle phases in the default lifecycle, I attach the generation of all 4 artifacts to the phase "package". That is very messy, and won't provide me with what I need. It should be possible to define a new lifecycle and have new phases attached to it. E.g.:

- ... (standard lifecycle phases)
- test
- jar
- javadoc
- source-archive
- javadoc-archive
- package
- ... (standard lifecycle phases)

The reason why it is mandatory at this point to have new lifecycle phases, is that there is a constraint that a plugin can have only one unique configuration per lifecycle phase. So if I need to use the same plugin, but e.g. using different goals which require different plugin configurations, then that's not possible. The only way this can be achieved is by using new lifecycle phases, which is also not possible at this point. Meaning, I cannot create a solution for my simple use case in Maven 2 and hence it blocks me for moving to Maven 2 (I really hate to file blockers, but I'm at a dead-end).



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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Reopened: (MNG-1950) Ability to introduce new lifecycles phases

Posted by "Chris Hagmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1950?page=all ]
     
Chris Hagmann reopened MNG-1950:
--------------------------------


Brett,

I reopened this issue, because:

As long as I cannot use a plugin with one configuration per goal,  I still have the need to have custom lifecycle phases. Nobody has ever mentioned how to do that. All I know how to do is to have one configuration per lifecycle phase, using the "execution" tag. So, it's either that which is described in (MJAVADOC-44) or additional lifecycle phase, otherwise I'm dead in the water and cannot move my projects to Maven 2. Solutions mentioned on the mailing lists don't resolve my issues, they just work for very simple use cases. 

On a different note, I think you should really think about making the lifecycle more flexible. In Maven 1 this was so much more flexibile, and I would have introduced so many people to Maven, if it wasn't for lack of performance. I simply don't think that a build tool is supposed to impose a build lifecycle on a project. At least, converting it to a "New Feature" request would be appreciated.

Chris

> Ability to introduce new lifecycles phases
> ------------------------------------------
>
>          Key: MNG-1950
>          URL: http://jira.codehaus.org/browse/MNG-1950
>      Project: Maven 2
>         Type: Improvement

>   Components: Plugins and Lifecycle
>     Versions: 2.0.1
>     Reporter: Chris Hagmann
>     Assignee: Brett Porter
>     Priority: Blocker

>
>
> I have simple use case which I cannot resolve with Maven 2 as it is right now. I have a project (actually many), where I need to do the following:
> - Create an JAR artifact (standard stuff, easily possible)
> - Create a source code artifact (standard stuff, easily possible)
> - Create Javadoc and a JAR archive of it (not possible, I explain why).
> - Create a distribution package with release notes, customized reports, Javadoc, JAR, dependencies, documentation, filtered files, etc. (not possible, I explain why and will file another JIRA issue for this)
> The constraint is that I need to create all 4 artifacts and have them installed them in the repository when using "mvn install".
> As there are no other appropriate lifecycle phases in the default lifecycle, I attach the generation of all 4 artifacts to the phase "package". That is very messy, and won't provide me with what I need. It should be possible to define a new lifecycle and have new phases attached to it. E.g.:
> - ... (standard lifecycle phases)
> - test
> - jar
> - javadoc
> - source-archive
> - javadoc-archive
> - package
> - ... (standard lifecycle phases)
> The reason why it is mandatory at this point to have new lifecycle phases, is that there is a constraint that a plugin can have only one unique configuration per lifecycle phase. So if I need to use the same plugin, but e.g. using different goals which require different plugin configurations, then that's not possible. The only way this can be achieved is by using new lifecycle phases, which is also not possible at this point. Meaning, I cannot create a solution for my simple use case in Maven 2 and hence it blocks me for moving to Maven 2 (I really hate to file blockers, but I'm at a dead-end).

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNG-1950) Ability to introduce new lifecycles phases

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1950?page=all ]
     
Brett Porter closed MNG-1950:
-----------------------------

     Assign To: Brett Porter
    Resolution: Won't Fix

I believe this was explained on the user list.

a) you can probably define your own lifecycle, but it is very much discouraged. It really hasn't even been tested.
b) you can create the distribution archives using assembly:attached. Multiple assemblies can be made in the latest version of the plugin
c) you can bind several instances of a plugin to a phase with executions and id's.

> Ability to introduce new lifecycles phases
> ------------------------------------------
>
>          Key: MNG-1950
>          URL: http://jira.codehaus.org/browse/MNG-1950
>      Project: Maven 2
>         Type: Improvement

>   Components: Plugins and Lifecycle
>     Versions: 2.0.1
>     Reporter: Chris Hagmann
>     Assignee: Brett Porter
>     Priority: Blocker

>
>
> I have simple use case which I cannot resolve with Maven 2 as it is right now. I have a project (actually many), where I need to do the following:
> - Create an JAR artifact (standard stuff, easily possible)
> - Create a source code artifact (standard stuff, easily possible)
> - Create Javadoc and a JAR archive of it (not possible, I explain why).
> - Create a distribution package with release notes, customized reports, Javadoc, JAR, dependencies, documentation, filtered files, etc. (not possible, I explain why and will file another JIRA issue for this)
> The constraint is that I need to create all 4 artifacts and have them installed them in the repository when using "mvn install".
> As there are no other appropriate lifecycle phases in the default lifecycle, I attach the generation of all 4 artifacts to the phase "package". That is very messy, and won't provide me with what I need. It should be possible to define a new lifecycle and have new phases attached to it. E.g.:
> - ... (standard lifecycle phases)
> - test
> - jar
> - javadoc
> - source-archive
> - javadoc-archive
> - package
> - ... (standard lifecycle phases)
> The reason why it is mandatory at this point to have new lifecycle phases, is that there is a constraint that a plugin can have only one unique configuration per lifecycle phase. So if I need to use the same plugin, but e.g. using different goals which require different plugin configurations, then that's not possible. The only way this can be achieved is by using new lifecycle phases, which is also not possible at this point. Meaning, I cannot create a solution for my simple use case in Maven 2 and hence it blocks me for moving to Maven 2 (I really hate to file blockers, but I'm at a dead-end).

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-1950) Ability to introduce new lifecycles phases

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1950?page=all ]

Brett Porter updated MNG-1950:
------------------------------

       Priority: Major  (was: Blocker)
    Fix Version: 2.1
      Component: Design, Patterns & Best Practices
           type: Wish  (was: Improvement)

Converting to a wish. I don't really like using JIRA for discussion, especially when it is unclear - please point me at a discussion on the users list and I'll try and pick it up. Unfortunately I don't read them all day to day.

Here is how you have multiple goal executions:

<plugin>
  <executions>
  <execution>
    <id>first-run</id>
    <configuration>
    </configuration>
    <goals>
      <goal>...</goal>
    </goals>
  </execution>
  <execution>
    <id>second-run</id>
    <configuration>
    </configuration>
    <goals>
      <goal>...</goal>
    </goals>
  </execution>
</executions>
</plugin>

We are planning more flexible *bindings* in a later version of Maven (you can participate in the dev discussions if that helps - there is some info on the wiki being formed). However, the lifecycle itself is not intended to be modified.

It's worth noting that one of the largest weaknesses in Maven 1.x was the flexibility of the lifecycle that made it very brittle to plugin changes. If you start changing the order, then plugins will break as they are supposed to be able to expect the given order - so it is fixed. If it is just the insertion of more phases then other than above, it just means we've missed something and should insert the phase into the default.

(if we already have a design issue open for the 2.1 lifecycle, this one should be closed as a duplicate).

> Ability to introduce new lifecycles phases
> ------------------------------------------
>
>          Key: MNG-1950
>          URL: http://jira.codehaus.org/browse/MNG-1950
>      Project: Maven 2
>         Type: Wish

>   Components: Design, Patterns & Best Practices, Plugins and Lifecycle
>     Versions: 2.0.1
>     Reporter: Chris Hagmann
>     Assignee: Brett Porter
>      Fix For: 2.1

>
>
> I have simple use case which I cannot resolve with Maven 2 as it is right now. I have a project (actually many), where I need to do the following:
> - Create an JAR artifact (standard stuff, easily possible)
> - Create a source code artifact (standard stuff, easily possible)
> - Create Javadoc and a JAR archive of it (not possible, I explain why).
> - Create a distribution package with release notes, customized reports, Javadoc, JAR, dependencies, documentation, filtered files, etc. (not possible, I explain why and will file another JIRA issue for this)
> The constraint is that I need to create all 4 artifacts and have them installed them in the repository when using "mvn install".
> As there are no other appropriate lifecycle phases in the default lifecycle, I attach the generation of all 4 artifacts to the phase "package". That is very messy, and won't provide me with what I need. It should be possible to define a new lifecycle and have new phases attached to it. E.g.:
> - ... (standard lifecycle phases)
> - test
> - jar
> - javadoc
> - source-archive
> - javadoc-archive
> - package
> - ... (standard lifecycle phases)
> The reason why it is mandatory at this point to have new lifecycle phases, is that there is a constraint that a plugin can have only one unique configuration per lifecycle phase. So if I need to use the same plugin, but e.g. using different goals which require different plugin configurations, then that's not possible. The only way this can be achieved is by using new lifecycle phases, which is also not possible at this point. Meaning, I cannot create a solution for my simple use case in Maven 2 and hence it blocks me for moving to Maven 2 (I really hate to file blockers, but I'm at a dead-end).

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org