当前位置:首页 » 《随便一记》 » 正文

Could not resolve dependencies for project

29 人参与  2024年02月17日 10:31  分类 : 《随便一记》  评论

点击全文阅读


maven 打包Could not resolve dependencies for project和无效的目标发行版: 1.8
1.maven 打包Could not resolve dependencies for project

最近项目上使用的是idea ide的多模块话,需要模块之间的依赖,比如说系统管理模块依赖授权模块进行认证和授权,而认证授权模块需要依赖系统管理模块进行,然后,我就开始相互依赖,然后出现这样的问题:

“Could not resolve dependencies for project”,让我百思不得其解,最后网络搜了搜,最后给的解决方案是:

我也碰到这个问题,需要把parent工程,也就是package是pom的那个工程先install一下
然后我就找parent下面的pom,找到标签里是pom的那个包,然后install了一下,就好了。原因未知,但是的确救了很多碰到相似问题的人

简单一句话:对着父项目先 clean install 然后子项目clean package发布 ok

2.maven 打包无效的目标发行版: 1.8

保证所有打包的项目 使用的jdk为1.8的版本
在这里插入图片描述
—————————————————————————————————————————————
报错如下图
在这里插入图片描述

[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

解决方案是现在目录下打包

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包

mvn clean install package

点击全文阅读


本文链接:http://zhangshiyu.com/post/68757.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1