maven-wrapper
maven-wrapper copied to clipboard
[MWRAPPER-15] Support SNAPSHOT versions
Slawomir Jaranowski opened MWRAPPER-15 and commented
In some case I would test build with the latest snapshot maven version. Such possibility can help other to easy test maven version under development.
Would be great to have possibility to provide mavenVersion like:
4.0.0-alpha-1-SNAPSHOT or even only SNAPSHOT in this case last SNAPSHOT version should be used.
Affects: 3.0.2, 3.3.2
0 votes, 5 watchers
Hervé Boutemy commented
with MWRAPPER-14, it's just a question of editing maven-wrapper.properties to point to the url of a SNAPSHOT
Slawomir Jaranowski commented
How it was fixed ... can I provide:
mvn wrapper:wrapper -DmavenVersion=x.x.x-SNAPSHOT
Tamas Cservenak commented
This is not solved at all.
What I did:
- deployed master of maven4 to RAO (https://repository.apache.org/content/repositories/snapshots/org/apache/maven/apache-maven/4.0.0-beta-5-SNAPSHOT/apache-maven-4.0.0-beta-5-20241018.115030-49-bin.zip)
- edited .mvn/wrapper/maven-wrapper.properties with that URL above
./mvnwinvocation fails with error./mvnw: line 255: /tmp/tmp.TeQUuvXjNO/apache-maven-4.0.0-beta-5-20241018.115030-49/mvnw.url: No such file or directory
Reason is simple: wrapper wrongly assumes that zip filename and directory structure (when unzipped) are same, but are not. Filename is apache-maven-4.0.0-beta-5-20241018.115030-49-bin.zip (timestamped snapshot) but zip internally contains apache-maven-4.0.0-beta-5-SNAPSHOT directory.