今天开发人员工程环境中新引入了json-lib-2.4.jar,通过jenkins调用maven自动编译打包一直报错找不到此依赖包,
具体如下:
[ERROR] Failed to execute goal on project SP_FrontStage: Could not resolve dependencies for project com.hddata.steganalysis:SP_FrontStage:war:1.0-SNAPSHOT: Failure to find net.sf.json-lib:json-lib:jar:2.4 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
试了网上的很多方法,例如:删除了目录重新下载编译;先clean再编译……均无果;
想想,找不到这个依赖包,说明这个包没有下载下来,手动下载安装怎么样?
于是手动下载了此jar包,通过mvn命令引入到了本地库;
命令如下:
mvn install:install-file -Dfile=f:/json-lib-2.4-jdk15.jar -DgroupId=net.sf.json-lib -DartifactId=json-lib -Dversion=2.4 -Dpackaging=jar
注意:DgroupId DartifactId Dversion 这三项要和我们工程中pom