解决maven问题 cvc-elt.1.a Cannot find the declaration of element 'project'

摘要: pom.xml报错: cvc-elt.1.a: Cannot find the declaration of element ‘project’. [cvc-elt.1.a]


将原来的

1
2
<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/maven-v4_0_0.xsd">

改为

1
2
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

即可

即改下xsi:schemaLocation的值http变为https

最新的schemaLocation地址已经是https协议了,调整后报错消失了