java - Spring Boot Maven 构建失败

标签 java spring maven

我是 Maven 新手。但是,我正在尝试使用 Gitlab CI Runner 进行自动化测试和构建/部署。

我从我的一位同事那里获得了当前的 Maven 配置。

当作业运行时,它会在几秒钟后失败,并显示以下错误消息:

Downloaded: https://repo.maven.apache.org/maven2/org/springframework/security/spring-security-bom/4.2.3.RELEASE/spring-security-bom-4.2.3.RELEASE.pom (5 KB at 101.0 KB/sec)
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-processor:jar is missing. @ line 20, column 21
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project de.demo:Rest:2.0 (/builds/Dev/Demo/Restv2/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-processor:jar is missing. @ line 20, column 21
[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: Job failed: exit code 1

这是我的 spring 依赖项:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.9.RELEASE</version>
</parent>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-processor</artifactId>
        <exclusions>
            <exclusion>
                <groupId>com.vaadin.external.google</groupId>
                <artifactId>android.json</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
</dependencies>

非常感谢您的帮助,我找不到错误的解决方案:/

非常感谢!

最佳答案

我想你的意思是

<!-- 
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot
-configuration-processor -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
</dependency>

不是spring-boot-starter-processor,请在此处查看:https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor/1.5.9.RELEASE

关于java - Spring Boot Maven 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47999500/

相关文章:

java - 打包包含 JSP 和静态资源的 spring boot 应用程序

java - 从另一个 Maven 存储库 Artifact 中获取所有 hibernate 注释/实体

java - 布局 GridPanel BorderPanel 按钮 Accordion

Java 类定义泛型

java - 方法调用中的 Null、原始数据值和包装类

java - install4j:如何检查我的apache tomcat服务器是否启动成功

java - Spring Data - 存储库方法名称中的 OR 条件

git - 是否有一个单一的 Git 命令来获取当前标记、分支和提交?

scala - 如何在Windows上从Maven和SBT获得彩色输出?

java - 数据库访问Java