[
https://issues.apache.org/jira/browse/MNG-8246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889465#comment-17889465
]
Guillaume Nodet commented on MNG-8246:
--------------------------------------
This is a side effect of the introduction of the new lifecycle with dynamic
phases. Only the real phases can now be targeted, the {{before:}} and
{{after:}} steps being automatically executed.
I don't think {{pre-clean}} or {{post-clean}} are so much of a problem, but
{{pre-integration-tests}} could be. At least a workaround would be nice.
> Calling pre-clean results in calling before:clean/clean/after:clean
> -------------------------------------------------------------------
>
> Key: MNG-8246
> URL: https://issues.apache.org/jira/browse/MNG-8246
> Project: Maven
> Issue Type: Bug
> Components: Command Line, Core
> Affects Versions: 4.0.0-beta-4
> Reporter: Karl Heinz Marbaise
> Priority: Major
> Fix For: 4.0.0
>
>
> If I call Maven 4.0.0-beta-4 like this:
> {code}
> mvn pre-clean
> {code}
> That will result in execution of the life cycle phases:
> * before:clean
> * clean
> * after:clean
> I can use also {{post-clean}} which results in exactly the same executions
> (which is expected). Also things like {{pre-integration-test}} results in
> execution of many phases in contradiction to Maven 3.X.
> If I do the same with Maven 3.X only the {{pre-clean}} is being executed (as
> expected).
> The question here is:
> * The user expected to execute only the {{pre-clean}} phase which is
> deprecated in Maven 4.0.0-beta-4+
> ** Should we produce a WARNING about the wrong usage of the phase? And
> continue as shown above.
> ** Should we fail and do not accept {{pre-clean}} anymore? But that would
> mean in consequence to prevent calling with anything like
> {{pre-integration-test}} etc.
> You can reproduce this with the example:
> https://github.com/khmarbaise/maven-bugs/tree/master/MNG-8244
--
This message was sent by Atlassian Jira
(v8.20.10#820010)