适用于Spring-boot依赖关系的Maven不可解析的POM

时间:2019-03-24 13:24:18

标签: java spring maven dependencies pom.xml

尝试使用Win10,Eclipse(Photon 4.8.0),Eclipse中的maven 3.5.3并遵循this tutorial

来设置基本的Spring引导应用程序

错误如下:

Non-parseable POM C:\Users\user\.m2\repository\org\springframework\boot\spring-boot-dependencies\2.1.3.RELEASE\spring-boot-dependencies-2.1.3.RELEASE.pom: in epilog non whitespace content is not allowed but got s (position: END_TAG seen ...</build>\n</project>\ns... @3189:2)

我尝试了各种建议,例如清除缓存,检查编码等,但是作为初学者,我不知道在哪里查看

pom.xml:

<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>
  <groupId>com.myproject</groupId>
  <artifactId>myproject</artifactId>
  <version>0.0.1-SNAPSHOT</version>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.3.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>


<dependencies>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-test</artifactId>
    <scope>test</scope>
</dependency>
</dependencies>

</project>

1 个答案:

答案 0 :(得分:0)

in epilog non whitespace content is not allowed but got s (position: END_TAG seen ...</build>\n</project>\ns... @3189:2

您应该重新检查您的pom(spring-boot-dependencies-2.1.3.RELEASE.pom),我认为您的字符是的' 标签后:</project>