Dependency not found in Spring Boot project

When compiling mvn clean in projectA, I get an error message that does not exist . The error refers to a package imported from projectB, which is a Spring boot project (projectA is a normal maven project). projectB compiles nicely and the resulting jar is in my local maven repository.

projectB is included in 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 cleanup and also manually deleted the contents of the local repo for the project.

+2
source share
1 answer

I did not use the repackaging goal, but after moving 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.

+2
source

Source: https://habr.com/ru/post/1261900/


All Articles