Repository navigation
wrapperVersion property gets removed when upgrading to Maven Wrapper 3.3.3 #364
Description
Activity
in order to preserver
distributionSha256Sumwe should read existing propertiesdone in:
Update automation tools (and humans too, I guess) need a reliable way to determine the current version of Maven Wrapper. The
wrapperVersionproperty was a way, although admittedly flawed, because I encounter a lot of projects withwrapperVersionbumped manually, but themvnw*scripts from a much older version, because they were not updated along with the property.I saw that Renovate plans to determine the Maven Wrapper version based on a regex check on the scripts themselves (renovatebot/renovate#37779), which when matched should be more reliable than reading
wrapperVersion. But the regex check will only work as long as the format of the comment line it’s parsed from doesn’t change, so it’s still a fragile method.Could Maven Wrapper provide its version in a more robust (machine-readable) way?
Reacted by Slawomir Jaranowski and Manuel BachReposting some context: the
wrapperVersionproperty was added in scope of MWRAPPER-134 by #135.@slawekjaranowski It seems this issue is now about two things:
distributionSha256Sumgetting removed when updating, which you already committed a fix for.wrapperVersiongetting removed when updating, which was done somewhat intentionally, but maybe without regard for the fact that it was used as a way (but maybe not the best or most robust way, because not all users seem to understand that it was basically a ‘read-only’ property) for tools and people to determine the Maven Wrapper version used by a project, and the discussion on how to best deal with that.
I think it might be good to have separate issues for these two different concerns?
Reacted by Slawomir Jaranowski@slawekjaranowski It seems this issue is now about two things:
distributionSha256Sumgetting removed when updating, which you already committed a fix for.wrapperVersiongetting removed when updating, which was done somewhat intentionally, but maybe without regard for the fact that it was used as a way (but maybe not the best or most robust way, because not all users seem to understand that it was basically a ‘read-only’ property) for tools and people to determine the Maven Wrapper version used by a project, and the discussion on how to best deal with that.
I think it might be good to have separate issues for these two different concerns?
exactly, PR are welcome ....
Please let me know if someone would to work on it.
I can release next version at next week 😄
- addedpriority:criticalCrashes, loss of data, severe memory leakCrashes, loss of data, severe memory leak
on Sep 2, 2025 @slawekjaranowski I think for now #145 should just be reverted, because
wrapperVersionwas explicitly introduced as a way to determine the Maven Wrapper version (#249), and removing it has now broken update workflows. Do you agree?Reacted by Mykola Rybak- changed the title
[-]Some properties get removed when upgrading[/-][+]`wrapperVersion` and `distributionSha256Sum` properties get removed when upgrading to Maven Wrapper 3.3.3[/+]on Sep 2, 2025 @slawekjaranowski I think for now #145 should just be reverted, because
wrapperVersionwas explicitly introduced as a way to determine the Maven Wrapper version (#249), and removing it has now broken update workflows. Do you agree?we can simply revert #145 - in one exclusions - I would like to preserve assertions for missing wrapperUrl
@slawekjaranowski I think you mean like this?
Reacted by Slawomir Jaranowski@slawekjaranowski I see the PR for
wrapperVersionhas been merged, and you previously committed a fix fordistributionSha256Sum, so I believe this issue can be closed. Agreed?Reacted by Slawomir Jaranowski- changed the title
[-]`wrapperVersion` and `distributionSha256Sum` properties get removed when upgrading to Maven Wrapper 3.3.3[/-][+]`wrapperVersion` property gets removed when upgrading to Maven Wrapper 3.3.3[/+]on Sep 4, 2025 in order to preserver
distributionSha256Sumwe should read existing propertiesI've created a separate issue for the removal of
distributionSha256Sumduring a Maven Wrapper update, because I believe it warrants a separate discussion: #367Reacted by Slawomir Jaranowski@slawekjaranowski I see the PR for
wrapperVersionhas been merged, and you previously committed a fix fordistributionSha256Sum, so I believe this issue can be closed. Agreed?as we have separate issue for
distributionSha256Sumwe can close it
Affected version
3.3.3
Bug description
When I install a newer version of Maven Wrapper,
wrapperVersionis removed from.mvn/wrapper/maven-wrapper.properties.To reproduce (using Maven 3.9.11 as
mvn):Note: previously this description also mentioned
distributionSha256Sumgetting removed during a Maven Wrapper update. I've split this off to its own issue: #367