maven-mvnd icon indicating copy to clipboard operation
maven-mvnd copied to clipboard

Make mvnd download Maven version specified by Maven Wrapper configuration

Open hboutemy opened this issue 1 year ago • 4 comments

currently, mvnd ships with an embedded Maven version in it: this leads to questions on how to have a mvnd release for each Maven release, with a clear pattern #392

it would be nice if Maven version was not injected at mvnd build time but at runtime: to avoid reinventing a wheel, the Maven Wrapper configuration .mvn/wrapper/maven-wrapper.properties could be used to define per-project target Maven

hboutemy avatar Jan 08 '23 09:01 hboutemy

@gnodet I did not have time yet study in the build how the original Maven distribution is modified when it is injected into mvnd, but from a pure logical perspective, I suppose the modifications are not specific to a Maven version (i suppose with minimum version prerequisite) and all the mvnd CLI + server aspects look generic also

hboutemy avatar Jan 08 '23 09:01 hboutemy

https://github.com/apache/maven-mvnd/issues/143 sums up some reasons why we chose not to support multiple Maven versions back in 2021. I'd be open to revisiting this, but it would require some additional porting of code to Maven and also some proper testing.

ppalaga avatar Jan 10 '23 12:01 ppalaga

This is actually a very required and must needed feature which mvnd must have.

kunal-techprescient avatar Nov 21 '23 15:11 kunal-techprescient

This is actually a very required and must needed feature which mvnd must have.

This is currently not possible. Each minor release of Maven requires some changes in mvnd, and only 3.9.x and 4.0.0-alpha-x are currently supported. If you want to work with Maven 3.8.x, you should be able to use an older version of mvnd. Given how much Maven tries to be backward compatible and still supporting JDK 8, you should be able to easily upgrade to the latest Maven 3.9.5 and use latest version of mvnd with it.

gnodet avatar Nov 21 '23 15:11 gnodet