Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while downloading 'http://maven.apache.org/xsd/maven-4.0.0.xsd' to C:\Users\Myacc\.lsp4xml\cache\http\maven.apache.org\xsd\maven-4.0.0.xsd.XML

I am new to maven, I have installed apache-maven-3.6.1 using it via visual studio code First creating workspace was throwing error due to maven was behind proxy I updated setting.xml in maven, added proxy and workscpace was created by vsc

Its a fresh workspace, but the pom.xml is throwing error in first project tag as mentioned in title

I searched and added the same settings.xml file in C:\Users\Myacc.m2 folder and checked

I deleted the m2 folder and checked

I executed mvn clean package in project directory

none of it worked

http://maven.apache.org/xsd/maven-4.0.0.xsd">

this the xml tag which is throwing error

From browser I am able to access http://maven.apache.org/xsd/maven-4.0.0.xsd

I could not find .lsp4xml\cache\http\maven.apache.org , thought of keeping the xsd manually

like image 368
digvijay bhandari Avatar asked Aug 30 '19 11:08

digvijay bhandari


4 Answers

For the same problem, I found this solution. changed http to https in below line in pom file. worked in eclipse. Not sure why.

<project xmlns="https://maven.apache.org...
like image 85
AmitG Avatar answered Oct 20 '22 06:10

AmitG


For what it's worth I see same error (firewall related?) which I think is due to the XML parser LSP4XML - rather than a Maven issue. The useSystemProxies suggestion here worked for me: https://github.com/redhat-developer/vscode-xml/issues/134

like image 21
Greg Avatar answered Oct 20 '22 05:10

Greg


If anyone is still following for the solution.

Issue: Admin Rights

Solution: Run the eclipse in admin mode in Windows and issue will be resolved.

like image 2
Sudhir Avatar answered Oct 20 '22 05:10

Sudhir


Changing https to http made it work Note the difference in xsi:schemLocation

Incorrect:

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

Correct:

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
like image 2
Yogesh Gandhi Avatar answered Oct 20 '22 06:10

Yogesh Gandhi