-
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
Impossible to restrict Major version number update - allowMajorUpdates=false
is not respected
#11
Comments
Would that mean allowMinorrUpdates is not respected either? |
@DiJu519, I guess it would. I added new section "UPDATE: More tests" into issue main body. It thoroughly addresses your question. Look at the case "incremental=true: FAILURE" where property In fact, the way this plugin works breaks any assumptions. This makes me wonder if I even understand intentions of all these properties (or anyone uses its functionality at all). |
I did some testing on this as well with a repo with non-textual semantic versions (ie, no RC, BETA, ALPHA stuff), only numeric triples (xx.yy.zz) with some SNAPSHOTS and got good results, except if the upper bound was equivalent with a -SNAPSHOT. Since I think it is a bit different bug, I logged a separate issue #22 |
@khmarbaise this may need to be re-opened This same issue is present in the UseLatestSnapshots Goal. Seems d214f34 fixed all but that goal. Hitting it now locally
|
Adding MajorMinorPatch filtering to UseLatestSnapshots goal Change-Id: Iae00c0ccd956fccdfca8f208bc5d18fa28625876
Adding MajorMinorPatch filtering to UseLatestSnapshots goal Change-Id: Iae00c0ccd956fccdfca8f208bc5d18fa28625876
Test
Add
org.mockito:mockito-core:1.9.5
dependency topom.xml
.Update versions disabling major version number updates:
Check results - the major number changes
1
to2
:Versions
UPDATE: More tests
It is assumed that:
This makes sense because there is normally no semantic relationship between (e.g.) two minor version number when major is different. For example, there is no point to restrict minor and incremental updates in
2.0.8
when major updates are allowed to expect results like3.0.8
- this is simply impractical as2.0.8
/3.0.8
/4.0.8
/.../x.0.8
are normally irrelevant versions regardless of common less significant partx.0.8
.Let's test updates for dependency
org.apache.maven:maven-plugin-api:2.0.8
which has updates for major, minor, incremental version numbers respectively.The following dependency was added to
pom.xml
:Expected results
Given
2.0.8
the following version are expected version numbers:3.3.3
(the latest at the time of testing);2.2.1
(the latest in2.x.x
at the time of testing);2.0.11
(the latest in 2.0.x` at the time of testing).No changes allowed: SUCCESS
No changes in
pom.xml
as expected.incremental=true: FAILURE
diff:
Why would it jump from
2.0.8
to2.1.0
(let alone suffixM1
) when only incremental number8
was allowed to be changed?minor=true: FAILURE
diff:
Why would it jump from
2.0.8
to3.0
(let alone suffixbeta-3
) when only minor number0
was allowed to be changed?major=true: SUCCESS
diff:
This update is as expected.
The text was updated successfully, but these errors were encountered: