mvn install -Dmaven.test.skip=true
把包安装到本地库,跳过test环节不做。
以下内容摘自 http://ljhzzyx.blog.163.com/blog/static/38380312201110304566706/
==========================================================================
Failure to find xxx:jar:1.0 in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced 这是一些jar包在之前的仓库无法获得,在更改仓库后,或把jar包部署到了私服上后,仍然出错。这时把.m2 文件夹下对应的 xxx.lastUpdated文件删除再更新依赖,就可以了。或者使用mvn命令时加 -U参数,忽略xxx.lastUpdated。
另外以上方式仍然报错,这时可能是maven 库或私服里确实没有对应的jar包,这时可以在私服里增加仓库,或者更改仓库。
安装到私服
mvn deploy:deploy-file -DgroupId=org.apache.hadoop -DartifactId=hbase -Dversion=1.0 -Dpackaging=jar -Dfile=[path to file] -Durl=[url] -DrepositoryId=[id]
批量导入jar
直接拷贝文件至/opt/data/nexus/sonatype-work/nexus/storage/pvinsight/org/apache/hadoop/hive/hive-exec/0.5.0
或者
通过脚本执行 mvn deploy:deploy-file