You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wrapperVersion property gets removed when upgrading to Maven Wrapper 3.3.3 #364
When I install a newer version of Maven Wrapper, wrapperVersion is removed from .mvn/wrapper/maven-wrapper.properties.
To reproduce (using Maven 3.9.11 as mvn):
mkdir reproducer
cd reproducer
# Install Maven Wrapper 3.3.2
mvn wrapper:3.3.2:wrapper -Dmaven=3.9.11
# This show `wrapperVersion=3.3.2`
grep wrapperVersion .mvn/wrapper/maven-wrapper.properties
# Update to Maven Wrapper 3.3.3
./mvnw wrapper:3.3.3:wrapper
# This returns nothing, because wrapperVersion has been removed, which I don't expect to happen
grep wrapperVersion .mvn/wrapper/maven-wrapper.properties
Note: previously this description also mentioned distributionSha256Sum getting removed during a Maven Wrapper update. I've split this off to its own issue: #367
Update automation tools (and humans too, I guess) need a reliable way to determine the current version of Maven Wrapper. The wrapperVersion property was a way, although admittedly flawed, because I encounter a lot of projects with wrapperVersion bumped manually, but the mvnw* 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?
distributionSha256Sum getting removed when updating, which you already committed a fix for.
wrapperVersion getting 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?
distributionSha256Sum getting removed when updating, which you already committed a fix for.
wrapperVersion getting 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.
@slawekjaranowski I think for now #145 should just be reverted, because wrapperVersion was explicitly introduced as a way to determine the Maven Wrapper version (#249), and removing it has now broken update workflows. Do you agree?
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 wrapperVersion was 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 see the PR for wrapperVersion has been merged, and you previously committed a fix for distributionSha256Sum, so I believe this issue can be closed. Agreed?
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 distributionSha256Sum we should read existing properties
I've created a separate issue for the removal of distributionSha256Sum during a Maven Wrapper update, because I believe it warrants a separate discussion: #367
@slawekjaranowski I see the PR for wrapperVersion has been merged, and you previously committed a fix for distributionSha256Sum, so I believe this issue can be closed. Agreed?
as we have separate issue for distributionSha256Sum we can close it
Activity
slawekjaranowski commentedon Sep 2, 2025
done in:
slawekjaranowski commentedon Sep 2, 2025
in order to preserver
distributionSha256Sumwe should read existing propertiesbreun commentedon Sep 2, 2025
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?
GreyTeardrop commentedon Sep 2, 2025
Reposting some context: the
wrapperVersionproperty was added in scope of MWRAPPER-134 by #135.breun commentedon Sep 2, 2025
@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?
slawekjaranowski commentedon Sep 2, 2025
exactly, PR are welcome ....
Please let me know if someone would to work on it.
I can release next version at next week 😄
breun commentedon 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?[-]Some properties get removed when upgrading[/-][+]`wrapperVersion` and `distributionSha256Sum` properties get removed when upgrading to Maven Wrapper 3.3.3[/+]slawekjaranowski commentedon Sep 2, 2025
we can simply revert #145 - in one exclusions - I would like to preserve assertions for missing wrapperUrl
breun commentedon Sep 2, 2025
@slawekjaranowski I think you mean like this?
breun commentedon Sep 4, 2025
@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?[-]`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[/+]breun commentedon Sep 4, 2025
I've created a separate issue for the removal of
distributionSha256Sumduring a Maven Wrapper update, because I believe it warrants a separate discussion: #367slawekjaranowski commentedon Sep 4, 2025
as we have separate issue for
distributionSha256Sumwe can close itMaven Wrapper: restore wrapperVersion (required for Renovate)
Maven Wrapper: restore wrapperVersion (required for Renovate)
Maven Wrapper: restore wrapperVersion (required for Renovate)