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

[MWRAPPER-15] Support SNAPSHOT versions

Open jira-importer opened this issue 4 years ago • 4 comments

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

jira-importer avatar Oct 10 '21 07:10 jira-importer

Michael Osipov commented

This can only be served by repository.a.o.

jira-importer avatar Oct 10 '21 14:10 jira-importer

Hervé Boutemy commented

with MWRAPPER-14, it's just a question of editing maven-wrapper.properties to point to the url of a SNAPSHOT

jira-importer avatar Nov 20 '21 15:11 jira-importer

Slawomir Jaranowski commented

How it was fixed ... can I provide:

mvn wrapper:wrapper -DmavenVersion=x.x.x-SNAPSHOT

jira-importer avatar Dec 18 '21 17:12 jira-importer

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
  • ./mvnw invocation 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.

jira-importer avatar Oct 18 '24 12:10 jira-importer