springboot 2.2.0 snapshot 升级到 2.5.0 snapshot时,jenkins构建失败,出现的版本无法转换的问题
第一次报错:
[FATAL] Non-resolvable parent POM for org.kosoku:commonfast:2.0.0-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.5.0-SNAPSHOT from https://repo.spring.io/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.5.0-SNAPSHOT from/to spring-snapshots (https://repo.spring.io/snapshot): repo.spring.io and 'parent.relativePath' points at no local POM @ line 5, column 13
提示无法转换,于是想到是不是jenkins依赖没有更新问题,于是 jenkins配置中 加入了 clean package -Dmaven.test.skip=true -U clean install ,我是加入了 -U clean install
第二次就开始下载大量的包了,然后提示maven的插件要从3.2.0降级到3.1.0
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project commonfast: The plugin org.apache.maven.plugins:maven-resources-plugin:3.2.0 requires Maven version 3.1.0
然后我就在pom中进行了配置
因为3.2.0是springboot自带的,所以这里单独引入一下:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>3.1.0</version> </plugin>
然后就构建成功了!!
good job~