Skip to content

Conversation

bdemers
Copy link
Member

@bdemers bdemers commented Jun 17, 2024

The only-script mode doesn't use the wrapper distribution, this property is now only added to the maven-wrapper.properties file when other types are used.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MWRAPPER-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MWRAPPER-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Fixes #291

@bdemers bdemers changed the title [MWRAPPER-143] The wrapperVersion property is not used in only-script mode [MWRAPPER-143] - The wrapperVersion property is not used in only-script mode Jun 17, 2024
@slachiewicz slachiewicz added the bug Something isn't working label Dec 16, 2024
@jira-importer
Copy link

Resolve #291

1 similar comment
@jira-importer
Copy link

Resolve #291

gnodet added a commit to gnodet/maven-wrapper that referenced this pull request Jul 18, 2025
The sh_type_only-script integration test was expecting the wrapperVersion
property to be present in only-script mode, but PR apache#145 removed this
property from only-script mode since it's not used. Updated the test
to match the expected behavior.
bdemers and others added 2 commits August 15, 2025 15:58
… mode

The only-script mode doesn't use the wrapper distribution, this property is now only added to the maven-wrapper.properties file when other types are used.
@slawekjaranowski slawekjaranowski merged commit 91bdb45 into master Aug 15, 2025
53 checks passed
@slawekjaranowski slawekjaranowski deleted the MWRAPPER-143-bdemers branch August 15, 2025 17:36
@github-actions github-actions bot added this to the 3.3.3 milestone Aug 15, 2025
@cstamas
Copy link
Member

cstamas commented Aug 30, 2025

Original issue that added version:
https://issues.apache.org/jira/browse/MWRAPPER-134

So, the intent of the version in the properties file was in fact to ease various automations to detect, and maybe suggest an upgrade for wrapper itself. We are now breaking automations for the second time...

Hence, this PR is wrong. And sorry for being late to the party.

@GreyTeardrop
Copy link

I'm in the same boat as @cstamas - only discovered this change when Renovate created an upgrade PR for Maven Wrapper to version 3.3.3 which removes the wrapperVersion property. If that PR gets merged, there won't be an easy way to get another update PR without a manual change. Please, consider rolling back this change…

@breun
Copy link
Contributor

breun commented Sep 2, 2025

For update automation tools 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 should be more reliable than reading wrapperVersion, as long as the format of that 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?

@slawekjaranowski
Copy link
Member

@breun please comments in open linked issue

@breun
Copy link
Contributor

breun commented Sep 2, 2025

@breun please comments in open linked issue

Ok, comment reposted here: #364 (comment)

breun added a commit to breun/maven-wrapper that referenced this pull request Sep 2, 2025
breun added a commit to breun/maven-wrapper that referenced this pull request Sep 2, 2025
slawekjaranowski pushed a commit that referenced this pull request Sep 3, 2025
* Revert "[MWRAPPER-143] - The wrapperVersion property is not used in only-script mode (#145)"

This reverts commit 91bdb45.

* Revert #145, but leave wrapperUrl assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MWRAPPER-143] Maven wrapper plugin should not create wrapperVersion property for script-only mode
8 participants