[英]Dependency not found in Spring Boot project
When doing a mvn clean compile in projectA I'm getting a package does not exist compilation error. 在projectA中执行mvn clean编译时 ,我得到的包不存在编译错误。 The error is refering to a package imported from projectB, which is a Spring Boot project (projectA is a regular maven project). 错误是指从projectB导入的软件包,这是一个Spring Boot项目(projectA是一个常规的maven项目)。 projectB compiles nicely and the resulting jar is in my local maven repo. projectB可以很好地编译,生成的jar位于我的本地Maven存储库中。
projectB is included in projectA: projectB包含在projectA中:
<projectB.version>1.0.4-SNAPSHOT</projectB.version>
[...]
<dependency>
<groupId>de.company</groupId>
<artifactId>projectB</artifactId>
<version>${projectB.version}</version>
</dependency>
I already did the usual cleaning and also deleted the contents of the local repo for projectB manually. 我已经进行了常规清洁,还手动删除了projectB本地存储库中的内容。
I did not use the repackage goal, but after going from 我没有使用重新包装的目标,而是从
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
to 至
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>exec</classifier>
</configuration>
</execution>
</executions>
</plugin>
...it worked. ...有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.