想使用git params plugin实现参数化构建,可是旧版的插件对于ssh链接git存在bug,不能使用git tag。须要本身使用快照snapshot版的插件,固然这个问题在jenkins2.0+版本中不会有,下载编译源码编译是遇到了一些错误javascript
错误大体是这样的:java
Non-resolvable parent POM for org.jenkins-ci.tools:git-parameter:0.4.1-SNAPSHOT: Failure to find org.jenkins-ci.plugins:plugin:pom:1.580.2 in http://localhost:8081/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexusMirror has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 3, column 10 @
经过本身的nexus仓库没法获取到git
<parent> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>plugin</artifactId> <!-- Baseline Jenkins version you use to build and test the plugin. Users must have this version or newer to run. --> <version>1.580.2</version> </parent>
在setting文件的mirrors节点下增长一个mirror指向http://repo.jenkins-ci.org/publicssh
<mirrors> <mirror> <mirrorOf>m.g.o-public</mirrorOf> <url>http://repo.jenkins-ci.org/public</url> <id>jenkins-ci.org</id> <name>Jenkins CI Public</name> </mirror> </mirrors>