【发布时间】:2020-05-12 10:01:57
【问题描述】:
我的 Spring Boot 项目有问题,它在 pom.xml 中有另一个 Spring Boot 项目作为依赖项。
我可以使用 eclipse 正确运行它,但是当我尝试使用命令mvn spring-boot:run 使用终端运行它时会出现错误。
[ERROR] Failed to execute goal on project platform-service: Could not resolve dependencies for project com.test.platform:platform-service:jar:0.0.1-SNAPSHOT: Could not find artifact com.test:student-service:jar:exec:0.0.1-SNAPSHOT
这就是我在 pom.xml 中添加依赖项的方式:
<dependency>
<groupId>com.test</groupId>
<artifactId>student-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
我尝试了不同的解决方案,例如 mvn package spring-boot:repackage,但没有奏效。
非常感谢。
【问题讨论】:
-
您添加了 com. talan :student-service 但应用程序抱怨 com. test :学生服务缺失。错字?
-
@Benoit 我修好了,但还是不行
-
您可以发布您尝试在 Eclipse 中运行的项目的
pom.xml吗?
标签: java eclipse spring-boot maven