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-dependency-updates only showing updates from the most major allowed segment? #960

Closed
andrzejj0 opened this issue May 22, 2023 · 2 comments · Fixed by #966
Closed
Labels
Milestone

Comments

@andrzejj0
Copy link
Contributor

While working on a small refactoring job for #291, I cam across a major bug: looks like display-dependency-updates and possibly also other goals, will only report updates from the most major allowed segment, and ignore updates from lesser segments -- unless allowAnyUpdates is selected for display-dependency-updates. The latter is completely not verified as goals use different routines to retrieve updates.

Result of display-dependency-updates with allowAnyUpdates on the project itself:

The following dependencies in Dependency Management have newer versions:
  dom4j:dom4j ................................. 1.6.1 -> 20040902.021138
  org.apache.maven:maven-artifact ............... 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-compat ................. 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-core ................... 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-model .................. 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-plugin-api ............. 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-settings ............... 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven.doxia:doxia-core ................. 1.12.0 -> 2.0.0-M6
  org.apache.maven.doxia:doxia-integration-tools ... 1.11.1 -> 2.0.0-M10
  org.apache.maven.doxia:doxia-sink-api ............. 1.12.0 -> 2.0.0-M6
  org.apache.maven.doxia:doxia-site-renderer ....... 1.11.1 -> 2.0.0-M10
  org.apache.maven.enforcer:enforcer-api ................ 3.2.1 -> 3.3.0
  org.apache.maven.plugin-testing:maven-plugin-testing-harness ...
                                                  3.3.0 -> 4.0.0-alpha-1
  org.apache.maven.plugin-tools:maven-plugin-annotations ...
                                                          3.8.1 -> 3.9.0
  org.apache.maven.reporting:maven-reporting-api ..... 3.1.1 -> 4.0.0-M6
  org.apache.maven.reporting:maven-reporting-impl .... 3.2.0 -> 4.0.0-M8
  org.junit.jupiter:junit-jupiter ................... 5.9.3 -> 5.10.0-M1
  org.junit.jupiter:junit-jupiter-api ............... 5.9.3 -> 5.10.0-M1
  org.junit.jupiter:junit-jupiter-engine ............ 5.9.3 -> 5.10.0-M1
  org.junit.jupiter:junit-jupiter-migrationsupport ...
                                                      5.9.3 -> 5.10.0-M1
  org.junit.jupiter:junit-jupiter-params ............ 5.9.3 -> 5.10.0-M1
  org.junit.platform:junit-platform-commons ......... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-console ......... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-engine .......... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-jfr ............. 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-launcher ........ 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-reporting ....... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-runner .......... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-suite ........... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-suite-api ....... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-suite-commons ... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-suite-engine .... 1.9.3 -> 1.10.0-M1
  org.junit.platform:junit-platform-testkit ......... 1.9.3 -> 1.10.0-M1
  org.junit.vintage:junit-vintage-engine ............ 5.9.3 -> 5.10.0-M1
  org.mockito:mockito-inline ........................... 4.11.0 -> 5.2.0
  org.slf4j:slf4j-simple ............................... 1.7.36 -> 2.0.7

The following dependencies in pluginManagement of plugins have newer versions:
  com.puppycrawl.tools:checkstyle ....................... 9.3 -> 10.11.0

The following dependencies in Plugin Dependencies have newer versions:
  com.puppycrawl.tools:checkstyle ....................... 9.3 -> 10.11.0

result of display-dependency-updates with allowAnyUpdates=false and allowMajorUpdates=allowMinorUpdates=allowIncrementalUpdates=true:

The following dependencies in Dependency Management have newer versions:
  dom4j:dom4j ................................. 1.6.1 -> 20040902.021138
  org.apache.maven:maven-artifact ............... 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-compat ................. 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-core ................... 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-model .................. 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-plugin-api ............. 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven:maven-settings ............... 3.2.5 -> 4.0.0-alpha-5
  org.apache.maven.doxia:doxia-core ................. 1.12.0 -> 2.0.0-M6
  org.apache.maven.doxia:doxia-integration-tools ... 1.11.1 -> 2.0.0-M10
  org.apache.maven.doxia:doxia-sink-api ............. 1.12.0 -> 2.0.0-M6
  org.apache.maven.doxia:doxia-site-renderer ....... 1.11.1 -> 2.0.0-M10
  org.apache.maven.plugin-testing:maven-plugin-testing-harness ...
                                                  3.3.0 -> 4.0.0-alpha-1
  org.apache.maven.reporting:maven-reporting-api ..... 3.1.1 -> 4.0.0-M6
  org.apache.maven.reporting:maven-reporting-impl .... 3.2.0 -> 4.0.0-M8
  org.mockito:mockito-inline ........................... 4.11.0 -> 5.2.0
  org.slf4j:slf4j-simple ............................... 1.7.36 -> 2.0.7

The following dependencies in pluginManagement of plugins have newer versions:
  com.puppycrawl.tools:checkstyle ....................... 9.3 -> 10.11.0

The following dependencies in Plugin Dependencies have newer versions:
  com.puppycrawl.tools:checkstyle ....................... 9.3 -> 10.11.0

I guess that might be a major bug if confirmed and it would be best to include the fix in the coming release (postpone if necessary).

andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 24, 2023
…sser segments

mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
@gmshake
Copy link
Contributor

gmshake commented May 26, 2023

Also encounter this with version 2.15.0.

@andrzejj0
Copy link
Contributor Author

andrzejj0 commented May 26, 2023

A fix is almost ready, but I don't know if it's gonna make it to 2.16.0.

Also, VersionDetails and especially ArtifactVersions is a big pile of mud in a dire need of rearchitecting. But that's something for >2.16.0.

EDIT: Don't want to ship anything unfinished. Let's skip the release for this as well.

I've found yet another bug there, albeit with a lesser significance, because it concerns version ranges: if an artifact is defined using two or more ranges, and the selected version falls in the first range, the versions in between the ranges will never get selected.

[, 1.0.0]   v1=1.1.0   v2=1.1.1   v3=1.9.0  (2.0.0, 10.0.0)

from the above, v1, v2, v3 will never get shown as possible updates.

andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 27, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
@andrzejj0 andrzejj0 changed the title display-dependency-managment only showing updates from the most major allowed segment? display-dependency-updates only showing updates from the most major allowed segment? May 28, 2023
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 31, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue May 31, 2023
…s from lesser segments

Resolves mojohaus#299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
@slawekjaranowski slawekjaranowski added this to the 2.16.0 milestone Jun 1, 2023
slawekjaranowski pushed a commit that referenced this issue Jun 1, 2023
…esser segments

Resolves #299: allowAnyUpdates should be ignored with a warning message if any of: allowMajorUpdates, allowMinorUpdates, allowIncrementalUpdates is set to false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants