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 2022/12/18 15:42:00 UTC
[jira] [Commented] (MNG-7183) Plugin declaration silently ignored if groupId uses property references
[ https://issues.apache.org/jira/browse/MNG-7183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17649039#comment-17649039 ]
Michael Osipov commented on MNG-7183:
-------------------------------------
[~gnodet], do you want to take a look at this?
> Plugin declaration silently ignored if groupId uses property references
> -----------------------------------------------------------------------
>
> Key: MNG-7183
> URL: https://issues.apache.org/jira/browse/MNG-7183
> Project: Maven
> Issue Type: Bug
> Components: Bootstrap & Build, Inheritance and Interpolation
> Affects Versions: 3.6.2, 3.6.3, 3.8.1
> Reporter: Martin D'Aloia
> Priority: Minor
> Attachments: bug-example.zip
>
>
> Declaring a plugin where its {{<groupId>}} value is/contains a property reference ({{$\{example}}}) is silently ignored and no error is thrown since Maven 3.6.2 (worked on 3.6.1).
> *Actual behavior:*
> - Plugin configuration silently ignored
> *Expected behavior:*
> - Work as in 3.6.1, or
> - Produce an error if such config is not allowed
> *Workaround:*
> * Use a static value for the <groupId> without property references
> *Suspecting root cause:*
> * MNG-6697
> Attached you could find a self-contained example using the {{maven-clean-plugin}} (but also happens with third-party plugins).
> To ease the comparison, this has 2 profiles: one declares the value explicitly and the other (indirect) via a property reference.
> Execute it as: {{./run.sh}}
> and you will get at the end:
> {noformat}
> ./out/maven-3.8.1-profile-indirect.log:[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.8.1-profile-indirect.log:[DEBUG] (f) skip = false
> ./out/maven-3.8.1-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.8.1-profile-explicit.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.3-profile-indirect.log:[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.3-profile-indirect.log:[DEBUG] (f) skip = false
> ./out/maven-3.6.3-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.3-profile-explicit.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.2-profile-indirect.log:[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.2-profile-indirect.log:[DEBUG] (f) skip = false
> ./out/maven-3.6.2-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.2-profile-explicit.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.1-profile-indirect.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.1-profile-indirect.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.1-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.1-profile-explicit.log:[DEBUG] (f) skip = true
> {noformat}
> Here you could see that the plugin version (2.5) and skip (false) configuration isn't what was configured for {{indirect}} profile.
> Another example, defining a base config as {{<pluginManagement>}}, it is also ignoring the specific {{<configuration>}} on {{<plugin>}} usage.
> Execute it as: {{./run.sh pom-pluginManagement.xml}}
> and you will get at the end:
> {noformat}
> ./out/maven-3.8.1-profile-indirect.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.8.1-profile-indirect.log:[DEBUG] (f) skip = false
> ./out/maven-3.8.1-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.8.1-profile-explicit.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.3-profile-indirect.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.3-profile-indirect.log:[DEBUG] (f) skip = false
> ./out/maven-3.6.3-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.3-profile-explicit.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.2-profile-indirect.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.2-profile-indirect.log:[DEBUG] (f) skip = false
> ./out/maven-3.6.2-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.2-profile-explicit.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.1-profile-indirect.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.1-profile-indirect.log:[DEBUG] (f) skip = true
> ./out/maven-3.6.1-profile-explicit.log:[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-bug-example ---
> ./out/maven-3.6.1-profile-explicit.log:[DEBUG] (f) skip = true
> {noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)