Jenkins构建maven项目:找不到本地依赖JAR包的解决办法

1. 依赖本地jar包:


   jsch
   jsch
   0.1.44
   system
   ${project.basedir}\src\main\webapp\WEB-INF\lib\jsch-0.1.44.jar

2. 本地 用maven clean package打的war包里面有jar,放到Jenkins上打包就报错了。错误如下:

Failed to execute goal on project ibisv3: Could not resolve dependencies for project *test:war:3.0: The following artifacts could not be resolved: jsch:jsch:jar:0.1.44, smshenan:smshenan:jar:1.0: Could not find artifact jsch:jsch:jar:0.1.44 at specified path /home/workspace/JR01_ktz_IBIS_tomcat_mysql_zh_219war\src\main\webapp\WEB-INF\lib\jsch-0.1.44.jar -> [Help 1]

3. 原因:路径写错了,修改成/src/main/webapp/WEB-INF/lib就好了

${project.basedir}/src/main/webapp/WEB-INF/lib/jsch-0.1.44.jar

 

你可能感兴趣的:(Maven,Jenkins)