首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >创建Spring Starter项目时POM文件中出现错误

创建Spring Starter项目时POM文件中出现错误
EN

Stack Overflow用户
提问于 2020-05-31 21:17:24
回答 1查看 116关注 0票数 1

我刚刚在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 spring-boot-starter-parent 2.3.0.RELEASE com.vishnu.ws.soap hellowebservice 0.0.1-快照hellowebservice问候SOAP服务

代码语言:javascript
复制
<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>

EN

回答 1

Stack Overflow用户

发布于 2020-05-31 23:12:05

我不知道你是否正确地发布了你的pom,但它似乎是不正确的,因此给出了解析错误。显然,它缺少一些标签。对于您的案例,应该是这样的:

代码语言:javascript
复制
<?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>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62116831

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档