-
Notifications
You must be signed in to change notification settings - Fork 267
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
Version constraints break 'use-latest-versions' when property-based versions are present #243
Comments
copybara-service bot
pushed a commit
to google/auto
that referenced
this issue
Oct 22, 2020
Process: ( for F in common factory service value; do ( mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:update-properties org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-releases -f $F/pom.xml ); done && mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-versions -f value/src/it/gwtserializer/pom.xml ) Then undid the Compile-Testing update in value/pom.xml. It somehow breaks things. (Someday I will remember -DgenerateBackupPoms=false....) For some reason, gwtserializer responds to use-latest-versions but not to use-latest-releases, even though it's updating GWT to a release (just as in one of the other POMs). We don't use use-latest-versions everywhere not just because it could theoretically pick a non-release versions but also because use-latest-versions replaces variable usages like ${guava-version} by inlining the value into them: mojohaus/versions#243 I would have updated the plugins in addition to the deps, but oddly the plugin does not support this: https://stackoverflow.com/q/34032262/28465 RELNOTES=n/a PiperOrigin-RevId: 338485304
copybara-service bot
pushed a commit
to google/auto
that referenced
this issue
Oct 22, 2020
Process: ( for F in common factory service value; do ( mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:update-properties org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-releases -f $F/pom.xml ); done && mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-versions -f value/src/it/gwtserializer/pom.xml ) Then undid the Compile-Testing update in value/pom.xml. It somehow breaks things. And I undid the google-java-format update in factory/pom.xml. It isn't compatible with JDK8/9, which is what Travis is set up for. (And then I flailed around for 15 minutes because Maven didn't rebuild some files when I changed JDKs, producing mystery failures. Argh. Perhaps we should set `<useIncrementalCompilation>` to `false` everywhere.) (Someday I will remember -DgenerateBackupPoms=false....) For some reason, gwtserializer responds to use-latest-versions but not to use-latest-releases, even though it's updating GWT to a release (just as in one of the other POMs). We don't use use-latest-versions everywhere not just because it could theoretically pick a non-release versions but also because use-latest-versions replaces variable usages like ${guava-version} by inlining the value into them: mojohaus/versions#243 I would have updated the plugins in addition to the deps, but oddly the plugin does not support this: https://stackoverflow.com/q/34032262/28465 Fixes #919, #918, #917, #915, #914, #911, #908, #906, #904, #903, #901, #900, #899 RELNOTES=n/a PiperOrigin-RevId: 338485304
copybara-service bot
pushed a commit
to google/auto
that referenced
this issue
Oct 22, 2020
Process: ( for F in common factory service value; do ( mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:update-properties org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-releases -f $F/pom.xml ); done && mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-versions -f value/src/it/gwtserializer/pom.xml ) Then undid the Compile-Testing update in value/pom.xml. It somehow breaks things. And I undid the google-java-format update in factory/pom.xml. It isn't compatible with JDK8/9, which is what Travis is set up for. (And then I flailed around for 15 minutes because Maven didn't rebuild some files when I changed JDKs, producing mystery failures. Argh. Perhaps we should set `<useIncrementalCompilation>` to `false` everywhere.) And *then* I undid the auto-service upgrade in value/processor/pom.xml. It causes problems but only under JDK9: https://travis-ci.org/github/google/auto/jobs/738096563 The error isn't in generated code, so I suspect a compiler bug. (But my quick search didn't find a filed OpenJDK issue.) (Someday I will remember -DgenerateBackupPoms=false....) For some reason, gwtserializer responds to use-latest-versions but not to use-latest-releases, even though it's updating GWT to a release (just as in one of the other POMs). We don't use use-latest-versions everywhere not just because it could theoretically pick a non-release versions but also because use-latest-versions replaces variable usages like ${guava-version} by inlining the value into them: mojohaus/versions#243 I would have updated the plugins in addition to the deps, but oddly the plugin does not support this: https://stackoverflow.com/q/34032262/28465 Fixes #919, #918, #917, #915, #914, #911, #908, #906, #904, #903, #901, #900, #899 RELNOTES=n/a PiperOrigin-RevId: 338485304
copybara-service bot
pushed a commit
to google/auto
that referenced
this issue
Oct 22, 2020
Process: ( for F in common factory service value; do ( mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:update-properties org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-releases -f $F/pom.xml ); done && mvn org.codehaus.mojo:versions-maven-plugin:2.8.1:use-latest-versions -f value/src/it/gwtserializer/pom.xml ) Then undid the Compile-Testing update in value/pom.xml. It somehow breaks things. And I undid the google-java-format update in factory/pom.xml. It isn't compatible with JDK8/9, which is what Travis is set up for. (And then I flailed around for 15 minutes because Maven didn't rebuild some files when I changed JDKs, producing mystery failures. Argh. Perhaps we should set `<useIncrementalCompilation>` to `false` everywhere.) And *then* I undid the auto-service upgrade in value/processor/pom.xml. It causes problems but only under JDK9: https://travis-ci.org/github/google/auto/jobs/738096563 The error isn't in generated code, so I suspect a compiler bug. (But my quick search didn't find a filed OpenJDK issue.) (Someday I will remember -DgenerateBackupPoms=false....) For some reason, gwtserializer responds to use-latest-versions but not to use-latest-releases, even though it's updating GWT to a release (just as in one of the other POMs). We don't use use-latest-versions everywhere not just because it could theoretically pick a non-release versions but also because use-latest-versions replaces variable usages like ${guava-version} by inlining the value into them: mojohaus/versions#243 I would have updated the plugins in addition to the deps, but oddly the plugin does not support this: https://stackoverflow.com/q/34032262/28465 Fixes #919, #918, #917, #915, #914, #911, #908, #906, #904, #903, #901, #900, #899 RELNOTES=n/a PiperOrigin-RevId: 338507900
Looks like the old behaviour has been reverted by #340. Can be closed @slachiewicz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
In version 2.2 of the versions-maven-plugin, the 'use-latest-versions' would ignore versions that were declared as a property. This issue has already been identified by #99 and #109. However, this change in behavior also introduces another problem documented in this issue where the specification of version constraints ( allowMajorUpdates, DallowMinorUpdates, allowIncrementalUpdates) breaks when a property-based version is encountered. Ideally it would be beneficial to have the behavior of the 2.2 version restored as it would eliminate this issue and also restore the ability to use a combination of property-based and non-property based versions within a given pom. The versions could then be managed via the 'update-property' and 'use-latest-versions' goals respectively without conflict.
There may be a relationship to #205
Test Case (developed using with Maven 3.5.0)
Project 'a'
Project 'b'
File Structure:
Test setup:
Stage 1.0.1-0-SNAPSHOT and 1.0.2-0-SNAPSHOT versions of project 'a'
Build 'b' that depends on version 1.0.1-0-SNAPSHOT of 'a' (verifies build works)
(cd b; mvn clean install)
Test steps:
Attempt to bump version to next incremental snapshot buildnumber using specific version of versions-maven-plugin (version > 2.2):
Results with versions-maven-plugin > 2.2:
Attempt to bump version to next incremental snapshot buildnumber using specific version of versions-maven-plugin (version = 2.2):
Results with versions-maven-plugin = 2.2:
Attempt to bump version without constraints using specific version of versions-maven-plugin:
Results with versions-maven-plugin > 2.2:
Results with versions-maven-plugin = 2.2:
The text was updated successfully, but these errors were encountered: