背景
下載公司的遠程代碼,結果總是無法下載。適使用-U命令也不行。
lcc@lcc cheetah-node$ mvn clean -U package -Dmaven.test.skip=true
刪除掉
xxx-1.0.0-SNAPSHOT.jar.lastUpdated
xxx-1.0.0-SNAPSHOT.pom.lastUpdated
這樣的文件重新下載也不行。
解決方法1
直接拷貝jar包到本地桌面,然後
mvn install:install-file
-DgroupId=alipay
-DartifactId=alipay-trade-sdk
-Dversion=1.0
-Dpackaging=jar -Dfile=F:\支付寶SDKJARlongguo\alipay-trade-sdk.jar
但是這樣只是臨時使用
解決方法2
到倉庫找到這些文件
然後到相關的maven目錄下
cd /Users/lcc/soft/maven/repo/com/xxx/boot/boot-xxx-plugin/1.0.7.RELEASE
然後將這些文件全部下載到這個目錄
wget http://xxxxxxx/repository/maven-releases/com/xxxxx/boot/boot-xxxxx-plugin/1.0.7.RELEASE/boot-xxxxxxx-plugin-1.0.7.RELEASE.pom.sha1
然後就可以正常使用了