takari / maven-wrapper

The easiest way to integrate Maven into your project!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrading to 0.5.4 from 0.4.2 results in curl error

klieber opened this issue · comments

I recently upgraded from 0.4.2 to 0.5.4. We don't have the maven-wrapper.jar committed to our repository so on first run that is downloaded. With 0.5.4 when I run the command the first time I'm getting an error:

$ ./mvnw --version
curl: (3) URL using bad/illegal format or missing URL
Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain

I'm running this in a Windows Git Bash shell. If I run using mvnw.cmd then it works fine and then after that I can run mvnw without issue since the maven-wrapper.jar has already been downloaded at that point.

In 0.4.2, I never had to run mvnw.cmd. Not sure when exactly this was introduced because I have tested in 0.5.0 - 0.5.3.

Let me know if you need any other info.

Well... I never tested with bash on Windows ... either use the cmd on windows or the sh script on unix ..

git bash is not really a supported environment ... if that worked in the past its pure accident. Feel free to test more with git bash and send pull requests .. but as it stands this is imho out of the scope of supported usage.

it also fail my my mvnw on windows 2008 some thing to do with .net call. what version of .next expected to be install on my system?

It should not require any .net .. but windows 2008 ... not sure that has been tested

Actually, I figured out what's happening. I used the plugin to upgrade and regenerate my maven-wrapper.properties file. When it regenerated, it used windows style new lines instead of unix style which is what is breaking the curl command. Probably doesn't require a fix but you could probably add something to the mvnw script to handle that.

So no curl error really. I will close this issue then. For windows related things if there is anything to discuss. .. we can open another ticket .. however .. its working just fine .. but then I only have one Windows 10 box which I test on .. and that very little.