Jeremy Landis created MWRAPPER-157:
--------------------------------------

             Summary: Maven wrapper jar is no longer downloaded on windows 11
                 Key: MWRAPPER-157
                 URL: https://issues.apache.org/jira/browse/MWRAPPER-157
             Project: Maven Wrapper
          Issue Type: Bug
          Components: Maven Wrapper Scripts
    Affects Versions: 3.3.2
            Reporter: Jeremy Landis


mvnw started failing about a year ago unless curl uses -k option to download 
maven wrapper jar.

mvnw.cmd now is also failing to download maven wrapper jar.

 

Neither are working on maven 4 post beta-4.  Therefore, I'm stuck here 
[https://github.com/spotbugs/spotbugs-maven-plugin/actions/workflows/it-maven-4.0.0.yaml]
 on older copy.  Issue started with beta-5.

 

To try to see what was going on, I tried locally windows 11 which has both the 
issues mentioned.  Further looking, it appears to me that mvnw.cmd is using 
long deprecated windows code to download and should be upgraded.  For the bash 
side of things, using git bash latest, the fact I have to add -k seems to 
indicate there is some issue with security.

In all cases, if I put the maven-wrapper.jar in place, the maven wrapper itself 
works fine.

 

To reproduce, just take the GHA from spotbugs and update it then let that build 
on your fork.  Watch it fail.  It will fail to see maven being there.  Then 
force a maven wrapper jar into place, watch it then work.  That same thing then 
can be repeated locally.

 

I have a commit for adding -k for mvnw and have had it for a long time but 
something else has to be going on there.  For mvnw.cmd, I've yet to figure out 
how to rewrite so its using proper code.  Fixing issues with using obsolete 
microsoft logic there would be helpful but likely will drop windows 2016 
support but given gradle already did so, eclipse ide already did so, and others 
I'm sure also have, it probably is the right time to drop legacy support.

 

So what I'm looking for here is some resolution as to why -k is required to 
download the maven wrapper via curl and to fix windows code to not use 
deprecated code.  Further, I'd like to actually be on maven 4.0.0-rc-2 on 
various plugins since using it does actually work provided the maven wrapper 
actually works correctly.

 

Alternative, I could just write on GHA a curl myself and download it since the 
tooling straight up fails.  But its very unclear why maven 4 fails whereas any 
older version beta 4 or before works fine there.  Using ubuntu on that end.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to