我刚刚在STS中创建了一个新的Spring Starter项目。创建后,看到它没有完全加载为MAVEN项目。在POM文件中看到以下错误。
项目构建错误:不可解析的POM C:\ Users \ salim.m2 \ repository \ org \ springframework \ boot \ spring-boot-starter- parent \ 2.3.0.RELEASE \ spring-boot-starter-parent-2.3.0.RELEASE.pom:意外标记\ n
不知道发生了什么。请帮助我。
https://maven.apache.org/xsd/maven-4.0.0.xsd“> 4.0.0 org.springframework.boot 弹簧启动启动器父母 2.3.0。发布 com.vishnu.ws.soap hellowebservice 0.0.1-快照 hellowebservice 您好SOAP服务
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
我不知道您是否正确发布了pom,但是它似乎不正确,因此出现了解析错误。它缺少一些标签。对于您的情况,IT应该是这样的:
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.RELEASE</version>
</parent>
<groupId>com.vishnu.ws.soap</groupId>
<artifactId>hellowebservice</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>hellowebservice</name>
<description>SOAP Service</description>
<!-- additional lines as you have it now -->
</project>