springboot2.0升级到springboot2.4.7之后遇到的问题:
1.无法打包
[INFO] [1m------------------------------------------------------------------------[m
[INFO] [1;31mBUILD FAILURE[m
[INFO] [1m------------------------------------------------------------------------[m
[INFO] Total time: 3.056 s
[INFO] Finished at: 2021-05-26T12:24:33+08:00
[INFO] [1m------------------------------------------------------------------------[m
[ERROR] Failed to execute goal [32morg.springframework.boot:spring-boot-maven-plugin:2.4.7-SNAPSHOT:repackage[m [1m(repackage)[m on project [36mrms[m: [1;31mExecution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.4.7-SNAPSHOT:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:2.4.7-SNAPSHOT or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.springframework.boot:spring-boot-buildpack-platform:jar:2.4.7-SNAPSHOT, org.springframework.boot:spring-boot-loader-tools:jar:2.4.7-SNAPSHOT: Could not find artifact org.springframework.boot:spring-boot-buildpack-platform:jar:2.4.7-SNAPSHOT[m -> [1m[Help 1][m
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch.
[ERROR] Re-run Maven using the [1m-X[m switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [1m[Help 1][m http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
解决办法:
pom文件中注释了以下代码就搞定了
后面发现注释掉就无法使用maven打包,所以只需要删掉里面的lombok就行,比如:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>