maven项目解决pom.xml头部 http://maven.apache.org/xsd/maven-4.0.0.xsd报错的问题

我在网上查了半天也没查出来个所以然出来,最后还是请教别人才知道的

 

这是文件内引入某个资源

pom.xml头部http://maven.apache.org/xsd/maven-4.0.0.xsd"报错。

后来发现是 Eclipse 配置的问题

1、找到maven的包的位置:window->preferences->Maven->User Settings找到。

正常的应该是:

我们右边的 Global Settings 和 User Settings 两个都配置的路径需要指向的是 Maven 的 settings.xml 文件的路径

如下:

 

然后保存后点击项目名右键找到 Maven 下的 Update Project 刷新一下项目即可

 

发布了80 篇原创文章 · 获赞 68 · 访问量 17万+
展开阅读全文

Maven的pom.xml第一行报错,显示未知错误,哪位大佬能帮忙解决下,不胜感激!

06-12

问题rt 代码如下: ![图片说明](https://img-ask.csdn.net/upload/201906/12/1560350057_455880.png) ![图片说明](https://img-ask.csdn.net/upload/201906/12/1560350062_430379.png) ``` <?xml version="1.0" encoding="UTF-8"?> <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"> <modelVersion>4.0.0</modelVersion> <!-- 从spring-boot-starter-parent继承版本号 --> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.5.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.manning</groupId> <artifactId>readinglist</artifactId> <version>0.0.1-SNAPSHOT</version> <name>Reading List</name> <description>Reading List Demo</description> <properties> <java.version>1.8</java.version> </properties> <!-- 起步依赖 --> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> <!-- maven构建插件 --> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ``` 问答

Maven install 出错!!!求解决方法

10-18

在maven install时,报错 ``` [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-parseable POM C:\Users\80883846\.m2\repository\org\springframework\boot\spring-boot-starter-parent\1.5.7.RELEASE\spring-boot-starter-parent-1.5.7.RELEASE.pom: Expected root element 'project' but found 'html' (position: START_TAG seen <html>... @1:6) @ C:\Users\80883846\.m2\repository\org\springframework\boot\spring-boot-starter-parent\1.5.7.RELEASE\spring-boot-starter-parent-1.5.7.RELEASE.pom, line 1, column 6 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.hkt.bpu.asd.noss:pcms-admin-portal:1.0.0 (G:\EclipseWorkspace\PCMS Admin Portal\trunk\pom.xml) has 1 error [ERROR] Non-parseable POM C:\Users\80883846\.m2\repository\org\springframework\boot\spring-boot-starter-parent\1.5.7.RELEASE\spring-boot-starter-parent-1.5.7.RELEASE.pom: Expected root element 'project' but found 'html' (position: START_TAG seen <html>... @1:6) @ C:\Users\80883846\.m2\repository\org\springframework\boot\spring-boot-starter-parent\1.5.7.RELEASE\spring-boot-starter-parent-1.5.7.RELEASE.pom, line 1, column 6 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException ``` 请问这个问题该怎么解决? 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 数字20 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览