mojohaus / versions

Versions Maven Plugin
https://www.mojohaus.org/versions/versions-maven-plugin/
Apache License 2.0
327 stars 265 forks source link

maven-jar-plugin update not discovered #1070

Open THausherr opened 2 months ago

THausherr commented 2 months ago

How to reproduce: 1) Clone https://github.com/apache/tika 2) in tika-parent/pom.xml , change <maven.jar.version>3.4.1</maven.jar.version> to <maven.jar.version>3.3.0</maven.jar.version> 3) run mvn org.codehaus.mojo:versions-maven-plugin:2.16.2:display-dependency-updates org.codehaus.mojo:versions-maven-plugin:2.16.2:display-plugin-updates org.codehaus.mojo:versions-maven-plugin:2.16.2:display-property-updates, while using maven 3.9.6.

expected: getting output like

${maven.jar.version} ................................... 3.3.0 -> 3.4.1
maven-jar-plugin ................................... 3.3.0 -> 3.4.1

what I got instead: no such thing

Whatever the cause is, it doesn't happen in another project of mine, so I think the jar itself or its metadata isn't to blame. I have read the FAQ.

slawekjaranowski commented 2 months ago

Hi

maven.jar.version property is not used in tika-parent/pom.xml so property update is not detected. plase add a pluginManagemnt section in tika-parent/pom.xml

but:

mvn versions:display-plugin-updates -pl tika-eval/tika-eval-core/pom.xml  
...

[INFO] --- versions:2.16.2:display-plugin-updates (default-cli) @ tika-eval-core ---
[INFO] 
[INFO] The following plugin updates are available:
[INFO]   maven-jar-plugin ................................... 3.3.0 -> 3.4.1

looks ok.

THausherr commented 2 months ago

Thanks, this works, but is unexpected. It would mean that it wouldn't make much sense to use properties. Github dependabot detects it (but has other drawbacks).