美文网首页
docker搭建jenkins出现插件找不到问题

docker搭建jenkins出现插件找不到问题

作者: 余于鱼不是鱼鱼鱼 | 来源:发表于2021-12-07 17:21 被阅读0次

    想着自己搭一下jenkins,于是拿起docker就开干,环境都配置好了,仓库也配置好了。结果在构建的时候一直报插件找不到......

    <pre class="console-output" style="box-sizing: inherit; font-size: var(--font-size-monospace); white-space: pre-wrap; overflow-wrap: break-word; margin: 0px; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:2.2.6.RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:2.2.6.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:2.2.6.RELEASE from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public): /usr/local/maven/repo/org/springframework/boot/spring-boot-maven-plugin/2.2.6.RELEASE/spring-boot-maven-plugin-2.2.6.RELEASE.pom.part.lock (No such file or directory) -> [Help 1] Waiting for Jenkins to finish collecting data
    [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException</pre>

    遇事不决先百度,大多数给出的解决方案是改pom文件,指定插件版本或者添加阿里云插件下载地址。都试了一下,发现还是报一样的错。仔细看报错jenkins控制台日志,发现如下一行

    原来我的jenkins容器无法在/usr/local/maven文件夹下面创建文件

    解决方案:

    使用root进入jenkins容器

    docker exec -it -u root [jenkins容器id] /bin/bash
    

    给jenkins添加权限

    chown -R jenkins:jenkins /usr/local/maven
    

    相关文章

      网友评论

          本文标题:docker搭建jenkins出现插件找不到问题

          本文链接:https://www.haomeiwen.com/subject/lblaxrtx.html