You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de.INVALID> on 2025/03/17 20:12:59 UTC

New Life Cycles Maven 4.0.0-rc3

Hi,

I'm trying to build a project with a number of subprojects..

I'm binding a plugin (just echoing) like this to new life cylce phases:

like this:


       <plugin>
         <groupId>com.soebes.maven.plugins</groupId>
         <artifactId>echo-maven-plugin</artifactId>
         <executions>
           <execution>
             <id>before-ready</id>
             <phase>before:ready</phase>
             <goals>
               <goal>echo</goal>
             </goals>
             <configuration>
               <echos>
                 <echo>Hallo 'before:ready' phase.</echo>
               </echos>
             </configuration>
           </execution>
           <execution>
             <id>before-all</id>
             <phase>before:all</phase>
             <goals>
               <goal>echo</goal>
             </goals>
             <configuration>
               <echos>
                 <echo>Hallo 'before:all' phase.</echo>
               </echos>
             </configuration>
           </execution>
           <execution>
             <id>all</id>
             <phase>all</phase>
             <goals>
               <goal>echo</goal>
             </goals>
             <configuration>
               <echos>
                 <echo>Hallo 'all' phase.</echo>
               </echos>
             </configuration>
           </execution>
           <execution>
             <id>after-all</id>
             <phase>after:all</phase>
             <goals>
               <goal>echo</goal>
             </goals>
             <configuration>
               <echos>
                 <echo>Hallo 'after:all' phase.</echo>
               </echos>
             </configuration>
           </execution>


What I can observe while calling maven like this:

mvn -B -b concurrent verify

What I can observe that for each module the phase:


[INFO] --- echo:0.5.0:echo (before-all) @ appasm ---
[INFO] Hallo 'before:all' phase.
[INFO]
[INFO] --- echo:0.5.0:echo (before-all) @ assembly ---
[INFO] Hallo 'before:all' phase.
[INFO]
[INFO] --- echo:0.5.0:echo (before-all) @ shade ---
[INFO] Hallo 'before:all' phase.
[INFO]
[INFO] --- echo:0.5.0:echo (before-all) @ app ---
[INFO] Hallo 'before:all' phase.
[INFO]
[INFO] --- echo:0.5.0:echo (before-all) @ service ---
[INFO] Hallo 'before:all' phase.
[INFO]
[INFO] --- echo:0.5.0:echo (before-all) @ webgui ---
[INFO] Hallo 'before:all' phase.
[INFO]
[INFO] --- echo:0.5.0:echo (before-all) @ service-client ---
[INFO] Hallo 'before:all' phase.
....
is being called..also
"after:all" the same way..

Based on my assumption (coming from the name) would be called exactly
once "before:all" ... "after:all" also......
Because that would not solve the problem to bind a plugin like JaCoCo
(for coverage for an aggregate) or JavaDoc for an aggregate for a whole
project in it...

Or do we have a solution for that which I'm not yet aware of?



Kind regards
Karl Heinz Marbaise

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


Re: New Life Cycles Maven 4.0.0-rc3

Posted by Guillaume Nodet <gn...@apache.org>.
Could you raise issues for the `all` phase not containing children
subprojects, and eventually for a new `each` phase ?

Le lun. 17 mars 2025 à 21:13, Karl Heinz Marbaise <kh...@gmx.de.invalid>
a écrit :

> Hi,
>
> I'm trying to build a project with a number of subprojects..
>
> I'm binding a plugin (just echoing) like this to new life cylce phases:
>
> like this:
>
>
>        <plugin>
>          <groupId>com.soebes.maven.plugins</groupId>
>          <artifactId>echo-maven-plugin</artifactId>
>          <executions>
>            <execution>
>              <id>before-ready</id>
>              <phase>before:ready</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'before:ready' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>            <execution>
>              <id>before-all</id>
>              <phase>before:all</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'before:all' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>            <execution>
>              <id>all</id>
>              <phase>all</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'all' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>            <execution>
>              <id>after-all</id>
>              <phase>after:all</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'after:all' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>
>
> What I can observe while calling maven like this:
>
> mvn -B -b concurrent verify
>
> What I can observe that for each module the phase:
>
>
> [INFO] --- echo:0.5.0:echo (before-all) @ appasm ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ assembly ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ shade ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ app ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ service ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ webgui ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ service-client ---
> [INFO] Hallo 'before:all' phase.
> ....
> is being called..also
> "after:all" the same way..
>
> Based on my assumption (coming from the name) would be called exactly
> once "before:all" ... "after:all" also......
> Because that would not solve the problem to bind a plugin like JaCoCo
> (for coverage for an aggregate) or JavaDoc for an aggregate for a whole
> project in it...
>
> Or do we have a solution for that which I'm not yet aware of?
>
>
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

-- 
------------------------
Guillaume Nodet

Re: New Life Cycles Maven 4.0.0-rc3

Posted by Matthias bünger <ru...@web.de.INVALID>.
I think thats agood idea and easy understandable by users. As already said by Maarten they know this by JUnit and others

Von meinem iPhone gesendet

> Am 18.03.2025 um 18:34 schrieb Guillaume Nodet <gn...@apache.org>:
> 
> Yeha, we could add *each* in addition to the *all* phase.
> 
>> Le mar. 18 mars 2025 à 15:18, Maarten Mulders <mt...@apache.org> a
>> écrit :
>> 
>> Thinking out loud... would it make more sense to name those phases
>> "before:each" and "after:each" - following the vocabulary that e.g.
>> JUnit uses?
>> 
>> 
>> - Maarten
>> 
>>> On 18/03/2025 12:24, Guillaume Nodet wrote:
>>> The `all` phase is executed for each project.  But you can avoid the
>> plugin
>>> execution to be inherited by setting inherited="false" on the execution.
>>> I've spotted a bug I think, as the definition of this phase does not
>>> reference child projects, so they may not be executed at the correct
>> time.
>>> Could you raise a JIRA and provide a reproducer ?
>>> 
>>> Le lun. 17 mars 2025 à 21:13, Karl Heinz Marbaise
>> <kh...@gmx.de.invalid>
>>> a écrit :
>>> 
>>>> Hi,
>>>> 
>>>> I'm trying to build a project with a number of subprojects..
>>>> 
>>>> I'm binding a plugin (just echoing) like this to new life cylce phases:
>>>> 
>>>> like this:
>>>> 
>>>> 
>>>>        <plugin>
>>>>          <groupId>com.soebes.maven.plugins</groupId>
>>>>          <artifactId>echo-maven-plugin</artifactId>
>>>>          <executions>
>>>>            <execution>
>>>>              <id>before-ready</id>
>>>>              <phase>before:ready</phase>
>>>>              <goals>
>>>>                <goal>echo</goal>
>>>>              </goals>
>>>>              <configuration>
>>>>                <echos>
>>>>                  <echo>Hallo 'before:ready' phase.</echo>
>>>>                </echos>
>>>>              </configuration>
>>>>            </execution>
>>>>            <execution>
>>>>              <id>before-all</id>
>>>>              <phase>before:all</phase>
>>>>              <goals>
>>>>                <goal>echo</goal>
>>>>              </goals>
>>>>              <configuration>
>>>>                <echos>
>>>>                  <echo>Hallo 'before:all' phase.</echo>
>>>>                </echos>
>>>>              </configuration>
>>>>            </execution>
>>>>            <execution>
>>>>              <id>all</id>
>>>>              <phase>all</phase>
>>>>              <goals>
>>>>                <goal>echo</goal>
>>>>              </goals>
>>>>              <configuration>
>>>>                <echos>
>>>>                  <echo>Hallo 'all' phase.</echo>
>>>>                </echos>
>>>>              </configuration>
>>>>            </execution>
>>>>            <execution>
>>>>              <id>after-all</id>
>>>>              <phase>after:all</phase>
>>>>              <goals>
>>>>                <goal>echo</goal>
>>>>              </goals>
>>>>              <configuration>
>>>>                <echos>
>>>>                  <echo>Hallo 'after:all' phase.</echo>
>>>>                </echos>
>>>>              </configuration>
>>>>            </execution>
>>>> 
>>>> 
>>>> What I can observe while calling maven like this:
>>>> 
>>>> mvn -B -b concurrent verify
>>>> 
>>>> What I can observe that for each module the phase:
>>>> 
>>>> 
>>>> [INFO] --- echo:0.5.0:echo (before-all) @ appasm ---
>>>> [INFO] Hallo 'before:all' phase.
>>>> [INFO]
>>>> [INFO] --- echo:0.5.0:echo (before-all) @ assembly ---
>>>> [INFO] Hallo 'before:all' phase.
>>>> [INFO]
>>>> [INFO] --- echo:0.5.0:echo (before-all) @ shade ---
>>>> [INFO] Hallo 'before:all' phase.
>>>> [INFO]
>>>> [INFO] --- echo:0.5.0:echo (before-all) @ app ---
>>>> [INFO] Hallo 'before:all' phase.
>>>> [INFO]
>>>> [INFO] --- echo:0.5.0:echo (before-all) @ service ---
>>>> [INFO] Hallo 'before:all' phase.
>>>> [INFO]
>>>> [INFO] --- echo:0.5.0:echo (before-all) @ webgui ---
>>>> [INFO] Hallo 'before:all' phase.
>>>> [INFO]
>>>> [INFO] --- echo:0.5.0:echo (before-all) @ service-client ---
>>>> [INFO] Hallo 'before:all' phase.
>>>> ....
>>>> is being called..also
>>>> "after:all" the same way..
>>>> 
>>>> Based on my assumption (coming from the name) would be called exactly
>>>> once "before:all" ... "after:all" also......
>>>> Because that would not solve the problem to bind a plugin like JaCoCo
>>>> (for coverage for an aggregate) or JavaDoc for an aggregate for a whole
>>>> project in it...
>>>> 
>>>> Or do we have a solution for that which I'm not yet aware of?
>>>> 
>>>> 
>>>> 
>>>> Kind regards
>>>> Karl Heinz Marbaise
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>> 
>>>> 
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>> 
>> 
> 
> --
> ------------------------
> Guillaume Nodet


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


Re: New Life Cycles Maven 4.0.0-rc3

Posted by Guillaume Nodet <gn...@apache.org>.
Yeha, we could add *each* in addition to the *all* phase.

Le mar. 18 mars 2025 à 15:18, Maarten Mulders <mt...@apache.org> a
écrit :

> Thinking out loud... would it make more sense to name those phases
> "before:each" and "after:each" - following the vocabulary that e.g.
> JUnit uses?
>
>
> - Maarten
>
> On 18/03/2025 12:24, Guillaume Nodet wrote:
> > The `all` phase is executed for each project.  But you can avoid the
> plugin
> > execution to be inherited by setting inherited="false" on the execution.
> > I've spotted a bug I think, as the definition of this phase does not
> > reference child projects, so they may not be executed at the correct
> time.
> > Could you raise a JIRA and provide a reproducer ?
> >
> > Le lun. 17 mars 2025 à 21:13, Karl Heinz Marbaise
> <kh...@gmx.de.invalid>
> > a écrit :
> >
> >> Hi,
> >>
> >> I'm trying to build a project with a number of subprojects..
> >>
> >> I'm binding a plugin (just echoing) like this to new life cylce phases:
> >>
> >> like this:
> >>
> >>
> >>         <plugin>
> >>           <groupId>com.soebes.maven.plugins</groupId>
> >>           <artifactId>echo-maven-plugin</artifactId>
> >>           <executions>
> >>             <execution>
> >>               <id>before-ready</id>
> >>               <phase>before:ready</phase>
> >>               <goals>
> >>                 <goal>echo</goal>
> >>               </goals>
> >>               <configuration>
> >>                 <echos>
> >>                   <echo>Hallo 'before:ready' phase.</echo>
> >>                 </echos>
> >>               </configuration>
> >>             </execution>
> >>             <execution>
> >>               <id>before-all</id>
> >>               <phase>before:all</phase>
> >>               <goals>
> >>                 <goal>echo</goal>
> >>               </goals>
> >>               <configuration>
> >>                 <echos>
> >>                   <echo>Hallo 'before:all' phase.</echo>
> >>                 </echos>
> >>               </configuration>
> >>             </execution>
> >>             <execution>
> >>               <id>all</id>
> >>               <phase>all</phase>
> >>               <goals>
> >>                 <goal>echo</goal>
> >>               </goals>
> >>               <configuration>
> >>                 <echos>
> >>                   <echo>Hallo 'all' phase.</echo>
> >>                 </echos>
> >>               </configuration>
> >>             </execution>
> >>             <execution>
> >>               <id>after-all</id>
> >>               <phase>after:all</phase>
> >>               <goals>
> >>                 <goal>echo</goal>
> >>               </goals>
> >>               <configuration>
> >>                 <echos>
> >>                   <echo>Hallo 'after:all' phase.</echo>
> >>                 </echos>
> >>               </configuration>
> >>             </execution>
> >>
> >>
> >> What I can observe while calling maven like this:
> >>
> >> mvn -B -b concurrent verify
> >>
> >> What I can observe that for each module the phase:
> >>
> >>
> >> [INFO] --- echo:0.5.0:echo (before-all) @ appasm ---
> >> [INFO] Hallo 'before:all' phase.
> >> [INFO]
> >> [INFO] --- echo:0.5.0:echo (before-all) @ assembly ---
> >> [INFO] Hallo 'before:all' phase.
> >> [INFO]
> >> [INFO] --- echo:0.5.0:echo (before-all) @ shade ---
> >> [INFO] Hallo 'before:all' phase.
> >> [INFO]
> >> [INFO] --- echo:0.5.0:echo (before-all) @ app ---
> >> [INFO] Hallo 'before:all' phase.
> >> [INFO]
> >> [INFO] --- echo:0.5.0:echo (before-all) @ service ---
> >> [INFO] Hallo 'before:all' phase.
> >> [INFO]
> >> [INFO] --- echo:0.5.0:echo (before-all) @ webgui ---
> >> [INFO] Hallo 'before:all' phase.
> >> [INFO]
> >> [INFO] --- echo:0.5.0:echo (before-all) @ service-client ---
> >> [INFO] Hallo 'before:all' phase.
> >> ....
> >> is being called..also
> >> "after:all" the same way..
> >>
> >> Based on my assumption (coming from the name) would be called exactly
> >> once "before:all" ... "after:all" also......
> >> Because that would not solve the problem to bind a plugin like JaCoCo
> >> (for coverage for an aggregate) or JavaDoc for an aggregate for a whole
> >> project in it...
> >>
> >> Or do we have a solution for that which I'm not yet aware of?
> >>
> >>
> >>
> >> Kind regards
> >> Karl Heinz Marbaise
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

-- 
------------------------
Guillaume Nodet

Re: New Life Cycles Maven 4.0.0-rc3

Posted by Karl Heinz Marbaise <kh...@gmx.de.INVALID>.
Hi,

On 18.03.25 15:17, Maarten Mulders wrote:
> Thinking out loud... would it make more sense to name those phases
> "before:each" and "after:each" - following the vocabulary that e.g.
> JUnit uses?

I already wrote something about that...

Kind regards
Karl Heinz Marbaise
>
>
> - Maarten
>
> On 18/03/2025 12:24, Guillaume Nodet wrote:
>> The `all` phase is executed for each project.  But you can avoid
>> the plugin execution to be inherited by setting inherited="false"
>> on the execution. I've spotted a bug I think, as the definition of
>> this phase does not reference child projects, so they may not be
>> executed at the correct time. Could you raise a JIRA and provide a
>> reproducer ?
>>
>> Le lun. 17 mars 2025 à 21:13, Karl Heinz Marbaise
>> <kh...@gmx.de.invalid> a écrit :
>>
>>> Hi,
>>>
>>> I'm trying to build a project with a number of subprojects..
>>>
>>> I'm binding a plugin (just echoing) like this to new life cylce
>>> phases:
>>>
>>> like this:
>>>
>>>
>>> <plugin> <groupId>com.soebes.maven.plugins</groupId>
>>> <artifactId>echo-maven-plugin</artifactId> <executions>
>>> <execution> <id>before-ready</id> <phase>before:ready</phase>
>>> <goals> <goal>echo</goal> </goals> <configuration> <echos>
>>> <echo>Hallo 'before:ready' phase.</echo> </echos>
>>> </configuration> </execution> <execution> <id>before-all</id>
>>> <phase>before:all</phase> <goals> <goal>echo</goal> </goals>
>>> <configuration> <echos> <echo>Hallo 'before:all' phase.</echo>
>>> </echos> </configuration> </execution> <execution> <id>all</id>
>>> <phase>all</phase> <goals> <goal>echo</goal> </goals>
>>> <configuration> <echos> <echo>Hallo 'all' phase.</echo> </echos>
>>> </configuration> </execution> <execution> <id>after-all</id>
>>> <phase>after:all</phase> <goals> <goal>echo</goal> </goals>
>>> <configuration> <echos> <echo>Hallo 'after:all' phase.</echo>
>>> </echos> </configuration> </execution>
>>>
>>>
>>> What I can observe while calling maven like this:
>>>
>>> mvn -B -b concurrent verify
>>>
>>> What I can observe that for each module the phase:
>>>
>>>
>>> [INFO] --- echo:0.5.0:echo (before-all) @ appasm --- [INFO] Hallo
>>> 'before:all' phase. [INFO] [INFO] --- echo:0.5.0:echo
>>> (before-all) @ assembly --- [INFO] Hallo 'before:all' phase.
>>> [INFO] [INFO] --- echo:0.5.0:echo (before-all) @ shade --- [INFO]
>>> Hallo 'before:all' phase. [INFO] [INFO] --- echo:0.5.0:echo
>>> (before-all) @ app --- [INFO] Hallo 'before:all' phase. [INFO]
>>> [INFO] --- echo:0.5.0:echo (before-all) @ service --- [INFO]
>>> Hallo 'before:all' phase. [INFO] [INFO] --- echo:0.5.0:echo
>>> (before-all) @ webgui --- [INFO] Hallo 'before:all' phase.
>>> [INFO] [INFO] --- echo:0.5.0:echo (before-all) @ service-client
>>> --- [INFO] Hallo 'before:all' phase. .... is being called..also
>>> "after:all" the same way..
>>>
>>> Based on my assumption (coming from the name) would be called
>>> exactly once "before:all" ... "after:all" also...... Because that
>>> would not solve the problem to bind a plugin like JaCoCo (for
>>> coverage for an aggregate) or JavaDoc for an aggregate for a
>>> whole project in it...
>>>
>>> Or do we have a solution for that which I'm not yet aware of?
>>>
>>>
>>>
>>> Kind regards Karl Heinz Marbaise
>>>
>>> ---------------------------------------------------------------------
>>>
>>>
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
>
>
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: New Life Cycles Maven 4.0.0-rc3

Posted by Maarten Mulders <mt...@apache.org>.
Thinking out loud... would it make more sense to name those phases 
"before:each" and "after:each" - following the vocabulary that e.g. 
JUnit uses?


- Maarten

On 18/03/2025 12:24, Guillaume Nodet wrote:
> The `all` phase is executed for each project.  But you can avoid the plugin
> execution to be inherited by setting inherited="false" on the execution.
> I've spotted a bug I think, as the definition of this phase does not
> reference child projects, so they may not be executed at the correct time.
> Could you raise a JIRA and provide a reproducer ?
> 
> Le lun. 17 mars 2025 à 21:13, Karl Heinz Marbaise <kh...@gmx.de.invalid>
> a écrit :
> 
>> Hi,
>>
>> I'm trying to build a project with a number of subprojects..
>>
>> I'm binding a plugin (just echoing) like this to new life cylce phases:
>>
>> like this:
>>
>>
>>         <plugin>
>>           <groupId>com.soebes.maven.plugins</groupId>
>>           <artifactId>echo-maven-plugin</artifactId>
>>           <executions>
>>             <execution>
>>               <id>before-ready</id>
>>               <phase>before:ready</phase>
>>               <goals>
>>                 <goal>echo</goal>
>>               </goals>
>>               <configuration>
>>                 <echos>
>>                   <echo>Hallo 'before:ready' phase.</echo>
>>                 </echos>
>>               </configuration>
>>             </execution>
>>             <execution>
>>               <id>before-all</id>
>>               <phase>before:all</phase>
>>               <goals>
>>                 <goal>echo</goal>
>>               </goals>
>>               <configuration>
>>                 <echos>
>>                   <echo>Hallo 'before:all' phase.</echo>
>>                 </echos>
>>               </configuration>
>>             </execution>
>>             <execution>
>>               <id>all</id>
>>               <phase>all</phase>
>>               <goals>
>>                 <goal>echo</goal>
>>               </goals>
>>               <configuration>
>>                 <echos>
>>                   <echo>Hallo 'all' phase.</echo>
>>                 </echos>
>>               </configuration>
>>             </execution>
>>             <execution>
>>               <id>after-all</id>
>>               <phase>after:all</phase>
>>               <goals>
>>                 <goal>echo</goal>
>>               </goals>
>>               <configuration>
>>                 <echos>
>>                   <echo>Hallo 'after:all' phase.</echo>
>>                 </echos>
>>               </configuration>
>>             </execution>
>>
>>
>> What I can observe while calling maven like this:
>>
>> mvn -B -b concurrent verify
>>
>> What I can observe that for each module the phase:
>>
>>
>> [INFO] --- echo:0.5.0:echo (before-all) @ appasm ---
>> [INFO] Hallo 'before:all' phase.
>> [INFO]
>> [INFO] --- echo:0.5.0:echo (before-all) @ assembly ---
>> [INFO] Hallo 'before:all' phase.
>> [INFO]
>> [INFO] --- echo:0.5.0:echo (before-all) @ shade ---
>> [INFO] Hallo 'before:all' phase.
>> [INFO]
>> [INFO] --- echo:0.5.0:echo (before-all) @ app ---
>> [INFO] Hallo 'before:all' phase.
>> [INFO]
>> [INFO] --- echo:0.5.0:echo (before-all) @ service ---
>> [INFO] Hallo 'before:all' phase.
>> [INFO]
>> [INFO] --- echo:0.5.0:echo (before-all) @ webgui ---
>> [INFO] Hallo 'before:all' phase.
>> [INFO]
>> [INFO] --- echo:0.5.0:echo (before-all) @ service-client ---
>> [INFO] Hallo 'before:all' phase.
>> ....
>> is being called..also
>> "after:all" the same way..
>>
>> Based on my assumption (coming from the name) would be called exactly
>> once "before:all" ... "after:all" also......
>> Because that would not solve the problem to bind a plugin like JaCoCo
>> (for coverage for an aggregate) or JavaDoc for an aggregate for a whole
>> project in it...
>>
>> Or do we have a solution for that which I'm not yet aware of?
>>
>>
>>
>> Kind regards
>> Karl Heinz Marbaise
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
> 


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


Re: New Life Cycles Maven 4.0.0-rc3

Posted by Guillaume Nodet <gn...@apache.org>.
The `all` phase is executed for each project.  But you can avoid the plugin
execution to be inherited by setting inherited="false" on the execution.
I've spotted a bug I think, as the definition of this phase does not
reference child projects, so they may not be executed at the correct time.
Could you raise a JIRA and provide a reproducer ?

Le lun. 17 mars 2025 à 21:13, Karl Heinz Marbaise <kh...@gmx.de.invalid>
a écrit :

> Hi,
>
> I'm trying to build a project with a number of subprojects..
>
> I'm binding a plugin (just echoing) like this to new life cylce phases:
>
> like this:
>
>
>        <plugin>
>          <groupId>com.soebes.maven.plugins</groupId>
>          <artifactId>echo-maven-plugin</artifactId>
>          <executions>
>            <execution>
>              <id>before-ready</id>
>              <phase>before:ready</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'before:ready' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>            <execution>
>              <id>before-all</id>
>              <phase>before:all</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'before:all' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>            <execution>
>              <id>all</id>
>              <phase>all</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'all' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>            <execution>
>              <id>after-all</id>
>              <phase>after:all</phase>
>              <goals>
>                <goal>echo</goal>
>              </goals>
>              <configuration>
>                <echos>
>                  <echo>Hallo 'after:all' phase.</echo>
>                </echos>
>              </configuration>
>            </execution>
>
>
> What I can observe while calling maven like this:
>
> mvn -B -b concurrent verify
>
> What I can observe that for each module the phase:
>
>
> [INFO] --- echo:0.5.0:echo (before-all) @ appasm ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ assembly ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ shade ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ app ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ service ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ webgui ---
> [INFO] Hallo 'before:all' phase.
> [INFO]
> [INFO] --- echo:0.5.0:echo (before-all) @ service-client ---
> [INFO] Hallo 'before:all' phase.
> ....
> is being called..also
> "after:all" the same way..
>
> Based on my assumption (coming from the name) would be called exactly
> once "before:all" ... "after:all" also......
> Because that would not solve the problem to bind a plugin like JaCoCo
> (for coverage for an aggregate) or JavaDoc for an aggregate for a whole
> project in it...
>
> Or do we have a solution for that which I'm not yet aware of?
>
>
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

-- 
------------------------
Guillaume Nodet