[ 
https://issues.apache.org/jira/browse/MNG-8693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet updated MNG-8693:
---------------------------------
    Fix Version/s: 4.0.x-candidate
                       (was: 4.0.0-rc-4)

> Resolution of unneeded plugins
> ------------------------------
>
>                 Key: MNG-8693
>                 URL: https://issues.apache.org/jira/browse/MNG-8693
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tamas Cservenak
>            Priority: Major
>             Fix For: 4.0.x-candidate
>
>
> When a Mojo is directly invoked on CLI, that:
>  * does not require project
>  * is not used in the current project
> It causes all defined (but unused) plugin to be resolved. Why?
> Example: 
> {noformat}
> [cstamas@blondie njord (validation)]$ mvn -V njord:0.2.1-SNAPSHOT:list
> Apache Maven 4.0.0-rc-4-SNAPSHOT (62ff34f70ba0c9abc243da638aa4fc16c4d010bc)
> Maven home: /home/cstamas/Tools/maven/apache-maven-4.0.0-rc-4-SNAPSHOT
> Java version: 21.0.6, vendor: Eclipse Adoptium, runtime: 
> /home/cstamas/.sdkman/candidates/java/21.0.6-tem
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "6.14.2-300.fc42.x86_64", arch: "amd64", family: 
> "unix"
> [INFO] Mimir session created with DaemonNode 
> (socketPath=/home/cstamas/.mimir/mimir-socket; daemonPID=7299; 
> daemonVersion=0.4.1)
> [INFO] Scanning for projects...
> [INFO] 
> --------------------------------------------------------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO] 
> [INFO] eu.maveniverse.maven.njord:njord                                       
>                                               [pom]
> [INFO] eu.maveniverse.maven.njord:core                                        
>                                               [jar]
> [INFO] eu.maveniverse.maven.njord.publisher:publisher                         
>                                               [pom]
> [INFO] eu.maveniverse.maven.njord.publisher:sonatype                          
>                                               [jar]
> [INFO] eu.maveniverse.maven.njord.publisher:apache                            
>                                               [jar]
> [INFO] eu.maveniverse.maven.njord:extension                                   
>                                               [jar]
> [INFO] eu.maveniverse.maven.plugins:njord                                     
>                                      [maven-plugin]
> [INFO] eu.maveniverse.maven.njord.it:it                                       
>                                               [pom]
> [INFO] eu.maveniverse.maven.njord.it:extension-its                            
>                                               [pom]
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-gpg-plugin/3.2.7/maven-gpg-plugin-3.2.7.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-gpg-plugin/3.2.7/maven-gpg-plugin-3.2.7.pom
>  (12 kB at 37.4 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-gpg-plugin/3.2.7/maven-gpg-plugin-3.2.7.jar
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-gpg-plugin/3.2.7/maven-gpg-plugin-3.2.7.jar
>  (74 kB at 700.7 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.11.2/maven-javadoc-plugin-3.11.2.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.11.2/maven-javadoc-plugin-3.11.2.pom
>  (21 kB at 289.9 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.11.2/maven-javadoc-plugin-3.11.2.jar
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.11.2/maven-javadoc-plugin-3.11.2.jar
>  (524 kB at 3.4 MB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugin-report-plugin/3.15.1/maven-plugin-report-plugin-3.15.1.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugin-report-plugin/3.15.1/maven-plugin-report-plugin-3.15.1.pom
>  (10 kB at 128.3 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugin-report-plugin/3.15.1/maven-plugin-report-plugin-3.15.1.jar
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugin-report-plugin/3.15.1/maven-plugin-report-plugin-3.15.1.jar
>  (56 kB at 318.4 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/3.1.1/maven-release-plugin-3.1.1.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/3.1.1/maven-release-plugin-3.1.1.pom
>  (10 kB at 139.6 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/release/maven-release/3.1.1/maven-release-3.1.1.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/release/maven-release/3.1.1/maven-release-3.1.1.pom
>  (12 kB at 165.0 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/3.1.1/maven-release-plugin-3.1.1.jar
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/3.1.1/maven-release-plugin-3.1.1.jar
>  (61 kB at 731.8 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/com/mycila/license-maven-plugin/4.6/license-maven-plugin-4.6.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/com/mycila/license-maven-plugin/4.6/license-maven-plugin-4.6.pom
>  (11 kB at 151.7 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/com/mycila/license-maven-plugin-parent/4.6/license-maven-plugin-parent-4.6.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/com/mycila/license-maven-plugin-parent/4.6/license-maven-plugin-parent-4.6.pom
>  (22 kB at 306.3 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/com/mycila/license-maven-plugin/4.6/license-maven-plugin-4.6.jar
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/com/mycila/license-maven-plugin/4.6/license-maven-plugin-4.6.jar
>  (142 kB at 1.3 MB/s)
> [INFO] 
> [INFO] -------------------------------------------< 
> eu.maveniverse.maven.njord:njord >-------------------------------------------
> [INFO] Building eu.maveniverse.maven.njord:njord 0.2.1-SNAPSHOT               
>                                               [1/9]
> [INFO]   from pom.xml
> [INFO] ---------------------------------------------------------[ pom 
> ]----------------------------------------------------------
> [INFO] 
> [INFO] --- njord:0.2.1-SNAPSHOT:list (default-cli) @ njord ---
> [INFO] List of existing ArtifactStore:
> [INFO] Total of 0 ArtifactStore.
> [INFO] Copying eu.maveniverse.maven.njord:njord:pom:0.2.1-SNAPSHOT to project 
> local repository
> [INFO] Copying eu.maveniverse.maven.njord:njord:pom:consumer:0.2.1-SNAPSHOT 
> to project local repository
> [INFO] 
> --------------------------------------------------------------------------------------------------------------------------
> [INFO] Reactor Summary for eu.maveniverse.maven.njord:njord 0.2.1-SNAPSHOT:
> [INFO] 
> [INFO] eu.maveniverse.maven.njord:njord 
> ..................................................................... SUCCESS 
> [  0.169 s]
> [INFO] eu.maveniverse.maven.njord:core 
> ...................................................................... SKIPPED
> [INFO] eu.maveniverse.maven.njord.publisher:publisher 
> ....................................................... SKIPPED
> [INFO] eu.maveniverse.maven.njord.publisher:sonatype 
> ........................................................ SKIPPED
> [INFO] eu.maveniverse.maven.njord.publisher:apache 
> .......................................................... SKIPPED
> [INFO] eu.maveniverse.maven.njord:extension 
> ................................................................. SKIPPED
> [INFO] eu.maveniverse.maven.plugins:njord 
> ................................................................... SKIPPED
> [INFO] eu.maveniverse.maven.njord.it:it 
> ..................................................................... SKIPPED
> [INFO] eu.maveniverse.maven.njord.it:extension-its 
> .......................................................... SKIPPED
> [INFO] 
> --------------------------------------------------------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> --------------------------------------------------------------------------------------------------------------------------
> [INFO] Total time:  2.681 s
> [INFO] Finished at: 2025-04-17T00:51:15+02:00
> [INFO] 
> --------------------------------------------------------------------------------------------------------------------------
> [INFO] Mimir session closed (RETRIEVED=0 CACHED=12)
> [cstamas@blondie njord (validation)]$ {noformat}
> In this example, all the plugins resolved are from release or format profile, 
> while they are defined in pluginMgmgt, they are not even bound nor the 
> profiles containing them are active.



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

Reply via email to