Jenkins整合maven项目,轮询git项目更新进行自动打包部署时,遇到以下问题:
[ERROR] Failed to execute goal on project exam: Could not resolve dependencies for project com.shuitou:exam:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.sun:tools:jar:1.8, com.sun:jconsole:jar:1.8: Could not find artifact com.sun:tools:jar:1.8 at specified path /root/.m2/repository/com/alibaba/druid/1.2.6/lib/openjdk-1.8-tools.jar -> [Help 1]
项目环境:jdk1.8
从字面上看是在指定目录下找不到jar包,然后找到对应的pom中的依赖
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.2.6</version>
</dependency>
然后问题来了,可能是druid的版本问题影响,然后我换成之前的版本
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.22</version>
</dependency>
然后再上传打包,正常!
特此记录一下!