You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2020/10/03 13:37:00 UTC

[jira] [Closed] (MNG-6983) Plugin key can get out of sync with artifactId and groupId

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

Michael Osipov closed MNG-6983.
-------------------------------
    Fix Version/s:     (was: 3.7.0-candidate)
                   3.7.0
       Resolution: Fixed

Fixed with [39641ac803e17360df40288aaeb40ea0c5ccd77d|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=39641ac803e17360df40288aaeb40ea0c5ccd77d].

> Plugin key can get out of sync with artifactId and groupId
> ----------------------------------------------------------
>
>                 Key: MNG-6983
>                 URL: https://issues.apache.org/jira/browse/MNG-6983
>             Project: Maven
>          Issue Type: Bug
>          Components: core, Plugins and Lifecycle
>    Affects Versions: 3.6.3
>            Reporter: Paul Pazderski
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.7.0
>
>         Attachments: pluginNotExecuted.zip
>
>
> I have a project build with maven where some maven plugins are not executed without any warning or error shown in output. I was able to reproduce the issue with a minimal example. (see attachment)
> The expected result of this example is to get the one source file compiled if you invoke {{mvn compile}}.
> If I run this example using Maven 3.6.3 the following output appears:
> {noformat}
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -------------------------< org.example:child >--------------------------
> [INFO] Building child 0.0.1-SNAPSHOT
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ child ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory [...]\pluginNotExecuted\src\main\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ child ---
> [INFO] No sources to compile
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:  0.644 s
> [INFO] Finished at: [...]
> [INFO] ------------------------------------------------------------------------
> {noformat}
> Notice that there is no execution of the build-helper-maven-plugin (and as consequence no source compiled) and no indication why it is missing.
> From what I've found the problem seem to be the usage of variable in the plugins groupId. If you replace either the variable in parent- or child-pom with the actual value the build shows a warning
> {noformat}
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model for org.example:child:jar:0.0.1-SNAPSHOT
> [WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 16, column 21
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
> [WARNING]
> {noformat}
> If you replace both variables with the actual value everything works as expected.
>  
> I investigated the problem further and will provide more details with a pull request for a possible fix.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)