Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display-plugin-updates: Inherited plugin version not detected #550

Closed
kwin opened this issue Jan 27, 2022 · 3 comments · Fixed by #562
Closed

display-plugin-updates: Inherited plugin version not detected #550

kwin opened this issue Jan 27, 2022 · 3 comments · Fixed by #562
Assignees

Comments

@kwin
Copy link
Contributor

kwin commented Jan 27, 2022

When cloning https://github.com/apache/sling-parent and executing mvn org.codehaus.mojo:versions-maven-plugin:2.9.0:display-plugin-updates it emits

[WARNING] The following plugins do not have their version specified:
[WARNING]   maven-jar-plugin ......................................... 3.2.2

for the module sling-bundle-parent, although the version of this plugin is managed in https://github.com/apache/sling-parent/blob/b7104da953b090821549d23f9bdf1ea1d002a1d8/sling-parent/pom.xml#L249 (the parent).

@stefanseifert
Copy link
Contributor

it also happens with version 2.8.1 of the plugin.

strange issue. it works for other plugins which are declared in the same way.

from time to time i've observed this in very few other projects as well, e.g. https://github.com/wcm-io/io.wcm.maven.parent
in that context it seems to be related when the same plugin is also used in profiles without version number (which is correct but seems to be misinterpreted by the plugin). but it's not the same case here.

@kwin
Copy link
Contributor Author

kwin commented Jan 27, 2022

I have only seen this in projects where the pom.xml in the parent folder is not the parent pom.xml, i.e. separated reactor and parent, but in the example from above the reference to the parent is definitely correct (https://github.com/apache/sling-parent/blob/b7104da953b090821549d23f9bdf1ea1d002a1d8/sling-bundle-parent/pom.xml#L22-L25).

@stefanseifert
Copy link
Contributor

stefanseifert commented Feb 17, 2022

#562 is my proposal to fix this issue.

while looking at the details i discovered that this issue it not an edge case, but version defined in parent POMs for plugins where never handled properly if a plugin is actually used in the local POM without a version.

#562 effectively skips the version update check for all plugins which have their version not defined in the current POM but in a parent POM. one could argue that it would be nice to also check the plugin versions defined in the parent POMS (similar to what display-dependency-updates is doing), but this would be a much bigger refactoring of this quite old and complex logic - this should be done in a separate enhancement issue if required (-> #533). so this fixes only the problem at hand to not report false positives as it does currently.

@stefanseifert stefanseifert self-assigned this Feb 17, 2022
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Dec 29, 2022
…cessUnboundPlugins

- if true, will show updates to plugins defined in parent poms, which have no version in the current pom
- false by default to retain backwards compatibility
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Dec 29, 2022
…cessUnboundPlugins

- if true, will show updates to plugins defined in parent poms, which have no version in the current pom
- false by default to retain backwards compatibility
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Jan 4, 2023
…cessUnboundPlugins

- if true, will show updates to plugins defined in parent poms, which have no version in the current pom
- false by default to retain backwards compatibility
slawekjaranowski pushed a commit that referenced this issue Jan 4, 2023
…undPlugins

- if true, will show updates to plugins defined in parent poms, which have no version in the current pom
- false by default to retain backwards compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants