[ 
https://issues.apache.org/jira/browse/MNG-7618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17643421#comment-17643421
 ] 

ASF GitHub Bot commented on MNG-7618:
-------------------------------------

gnodet merged PR #898:
URL: https://github.com/apache/maven/pull/898




> Use goalPrefix instead of artifactId to display mojos being executed 
> ---------------------------------------------------------------------
>
>                 Key: MNG-7618
>                 URL: https://issues.apache.org/jira/browse/MNG-7618
>             Project: Maven
>          Issue Type: Task
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.0.0-alpha-3
>
>
> The main problem is that the information displayed when starting a mojo looks 
> like:
> {code:java}
> [INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-maven-version) @ 
> camel ---
> [INFO] 
> [INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-java-version) @ camel 
> ---
> [INFO] 
>  {code}
> However, if you try to execute {{{}maven-enforcer-plugin:3.0.0:enforce{}}}, 
> you end up with the following:
> {code:java}
> [INFO] BuildTimeEventSpy is registered.
> [INFO] Scanning for projects...
> Downloading from apache.snapshots: 
> https://repository.apache.org/snapshots/maven-enforcer-plugin/3.0.0/maven-metadata.xml
> Downloading from central: 
> https://repo.maven.apache.org/maven2/maven-enforcer-plugin/3.0.0/maven-metadata.xml
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  0.879 s
> [INFO] Finished at: 2022-12-03T12:12:40+01:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Error resolving version for plugin 'maven-enforcer-plugin:3.0.0' from 
> the repositories [local (/Users/gnodet/.m2/repository), apache.snapshots 
> (https://repository.apache.org/snapshots/), central 
> (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin 
> repository -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException
>  {code}
>  
> I suggest to change the display to the {{pluginPrefix}} which gives
> {code}
> [INFO] -----------------------< org.apache.camel:camel 
> >-----------------------
> [INFO] Building Camel 4.0.0-SNAPSHOT
> [INFO]   from pom.xml
> [INFO] --------------------------------[ pom 
> ]---------------------------------
> [WARN] Parameter 'reportPlugins' is unknown for plugin 
> 'maven-site-plugin:3.11.0:attach-descriptor (attach-descriptor)'
> [INFO] 
> [INFO] --- enforcer:3.0.0:enforce (enforce-maven-version) @ camel ---
> [INFO] 
> [INFO] --- enforcer:3.0.0:enforce (enforce-java-version) @ camel ---
> [INFO] 
> [INFO] --- enforcer:3.0.0:enforce (enforce-maven) @ camel ---
> [INFO] 
> {code}
> which can then be easily executed:
> {code}
> ➜  maven git:(build-improvements) ✗ mvn -N -f ../camel flatten:1.2.5:flatten 
> [INFO] BuildTimeEventSpy is registered.
> [INFO] Processing build on daemon 56c20cb8
> [INFO] Scanning for projects...
> [INFO] BuildTimeEventSpy is registered.
> [INFO] 
> [INFO] Using the SmartBuilder implementation with a thread count of 9
> [INFO] Task segments : [flatten:1.2.5:flatten]
> [INFO] Build maximum degree of concurrency is 9
> [INFO] Total number of projects is 1
> [INFO] 
> [INFO] -----------------------< org.apache.camel:camel 
> >-----------------------
> [INFO] Building Camel 4.0.0-SNAPSHOT
> [INFO]   from pom.xml
> [INFO] --------------------------------[ pom 
> ]---------------------------------
> [INFO] 
> [INFO] --- flatten:1.2.5:flatten (default-cli) @ camel ---
> [INFO] Generating flattened POM of project 
> org.apache.camel:camel:pom:4.0.0-SNAPSHOT...
> [INFO] Segment walltime 0 s, segment projects service time 0 s, 
> effective/maximum degree of concurrency 0.97/9
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  0.025 s (Wall Clock)
> [INFO] Finished at: 2022-12-03T12:14:29+01:00
> [INFO] 
> ------------------------------------------------------------------------
> ➜  maven git:(build-improvements) ✗ 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to