Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.3:repackage (default) on project microservice-eureka: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.5.3:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:2.5.3 or one of its dependencies could not be resolved: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.5.3 -> org.springframework.boot:spring-boot-buildpack-platform:jar:2.5.3
由于spring-boot-maven-plugin版本不一致导致的,项目pom文件中对这个jar没有指定版本,默认使用的是最新的2.5.3版本,对于我们的项目只能是2.3.1.RELEASE这个版本。
在项目pom文件中指定插件的版本为2.3.1.RELEASE
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.3.1.RELEASE</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin>