maven 打包Could not resolve dependencies for project和無(wú)效的目標(biāo)發(fā)行版: 1.8
1.maven 打包Could not resolve dependencies for project
最近項(xiàng)目上使用的是idea ide的多模塊話,需要模塊之間的依賴,比如說(shuō)系統(tǒng)管理模塊依賴授權(quán)模塊進(jìn)行認(rèn)證和授權(quán),而認(rèn)證授權(quán)模塊需要依賴系統(tǒng)管理模塊進(jìn)行,然后,我就開始相互依賴,然后出現(xiàn)這樣的問題:
“Could not resolve dependencies for project”,讓我百思不得其解,最后網(wǎng)絡(luò)搜了搜,最后給的解決方案是:
我也碰到這個(gè)問題,需要把parent工程,也就是package是pom的那個(gè)工程先install一下
然后我就找parent下面的pom,找到標(biāo)簽里是pom的那個(gè)包,然后install了一下,就好了。原因未知,但是的確救了很多碰到相似問題的人
簡(jiǎn)單一句話:對(duì)著父項(xiàng)目先 clean install 然后子項(xiàng)目clean package發(fā)布 ok
2.maven 打包無(wú)效的目標(biāo)發(fā)行版: 1.8
保證所有打包的項(xiàng)目 使用的jdk為1.8的版本
—————————————————————————————————————————————
報(bào)錯(cuò)如下圖
[ERROR] Failed to execute goal on project source-data: Could not resolve dependencies for project source-data:source-data:jar:1.0-SNAPSHOT: Failure to find com.hikvision.bigdata:app-framework-support-aksk-sdk:jar:1.2.1-SNAPSHOT in http://maven.XXXXX/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of citydo has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
解決方案是現(xiàn)在目錄下打包文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-480497.html
mvn install:install-file -DgroupId=com.hikvision.bigdata -DartifactId=app-framework-support-aksk-sdk -Dversion=1.2.1-SNAPSHOT -Dpackaging=jar -Dfile=/var/lib/jenkins/workspace/xyt_source_data/doc/lib/app-framework-support-aksk-sdk.jar
然后再去mvn install 生成target jar包文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-480497.html
mvn clean install package
到了這里,關(guān)于Could not resolve dependencies for project的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!