Maven多模块项目jar包引用问题:

Failed to execute goal on project xxx-service: Could not resolve dependencies for project com.xxx:xxx-service:jar:1.0.0: Failed to collect dependencies at com.yyy:yyy-facade:jar:1.0.0: Failed to read artifact descriptor for com.yyy:yyy-facade:jar:1.0.0: Failure to find com.yyy:yyy:pom:1.0.0 in http://host:ip/nexus/public/ was cached in the local repository, resolution will not be reattempted until the update interval of test-mirrorId has elapsed or updates are forced -> [Help 1]

  这个是项目中出现的一个问题,多组件的项目,统一进行了版本升级,但是都没有进行发布(maven deploy),因此私服上面没有最新的jar包,只要出现有依赖的组件jar包(一般是接口层),就会导致发布失败。于是在就先直接把接口层进行打包发布。此时私服上面已经有了最新的版本包,但是其他组件在发布时还是报了了这个错。这是没有先把父pom进行打包,可参考SF:https://stackoverflow.com/questions/6642146/maven-failed-to-read-artifact-descriptor

This problem can occur if you have some child projects that refer to a parent pom and you have not installed from the parent pom directory (run mvn install from the parent directory). One of the child projects may depend on a sibling project and when it goes to read the pom of the sibling, it will fail with the error mentioned in the question unless you have installed from the parent pom directory at least once.

大致意思:如果你有子项目引用了父项目的POM,但没有在父项目POM目录下执行安装操作(父目录下执行mvn install),这个问题就会出现。当一个子模块可能会依赖一个兄弟子模块而且去读取兄弟子模块的pom时,除非在父项目POM目录下至少执行一次安装,否则就会读取失败,即出现上述错误。

  建议和总结:

  1. 先部分升级打包,再升级其余部分
  2. 或者把引用的版本降低,先将本组件的最新版本进行发布(父pom那一层全部打包),再更新引用最新的版本
  3. 或者直接把子模块的引入先注释掉,直接把父pom先打包即可,后续可单独再打包(接口包之类的,暂测可行,但是非长久之计)。

另外也有可能是jar包下载错误,可以先把本地maven的jar包缓存先删除掉,再直接项目右键【Maven==》》Update Project==》》Force Update of Snapshots/Release(勾选上)】,强制更新jar包引用。

Maven:Failed to read artifact descriptor for xxx的更多相关文章

  1. Maven错误Failed to read artifact descriptor for xxx:jar 和 missing artifact maven dependency

    可参考:http://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place http:// ...

  2. Failed to read artifact descriptor for xxx:jar 的Maven项目jar包依赖配置的问题解决

    在开发的过程中,尤其是新手,我们经常遇到Maven下载依赖jar包的问题,也就是遇到“Failed to read artifact descriptor for xxx:jar”的错误. 对于这种非 ...

  3. Failed to read artifact descriptor for xxx:jar的问题解决

    在开发的过程中,尤其是新手,我们经常遇到Maven下载依赖jar包的问题,也就是遇到“Failed to read artifact descriptor for xxx:jar”的错误. 对于这种非 ...

  4. Failed to read artifact descriptor for xxx:jar

    在MyEclipse中执行Maven的install命令时,报“Failed to read artifact descriptor for xxx:jar ”的错误.这可能是在下载过程中文件出现错误 ...

  5. artifactdescriptorexception:Failed to read artifact descriptor for xxx:jar ”

    在Eclipse中执行Maven的install命令时,报“Failed to read artifact descriptor for xxx:jar ”的错误.这可能是在下载过程中文件出现错误.或 ...

  6. Maven项目强制更新,解决Failed to read artifact descriptor for xxx.jar问题

    导入的maven项目pom.xml现红叉 分析原因:在maven本地仓库中找不到相应的jar包. 解决方案:让maven强制更新依赖. 项目右击菜单,Maven -> Update Projec ...

  7. Failed to read artifact descriptor for xxx:jar:版本号

    解决步骤: 1.先删除对应的本地仓库下的文件夹,比如org.apache.maven.plugins:maven-resource,删掉plugins文件夹 2.项目右键-->Maven--&g ...

  8. Maven项目报错:Missing artifact****和ArtifactDescriptorException: Failed to read artifact descriptor for***和Cannot change version of project facet Dynamic web module to 2.5

    一.关于Cannot change version of project facet Dynamic web module to 2.5 具体查看博客:http://blog.csdn.net/ste ...

  9. maven clean package 时出现Failed to read artifact descriptor for的问题解决

    maven clean package 时出现Failed to read artifact descriptor for的问题 [ERROR] Failed to execute goal on p ...

随机推荐

  1. C++中数字与字符串之间的转换 scanf string总结(复习必读)

    1 string的scanf读入操作 C++里面控制台输入直接使用cin操作就可以了:或者getline(istringstream,string); 字符和数字加减就是字符的ASCII码和数字直接加 ...

  2. vDom和domDiff

    虚拟dom和domDiff 1. 构建虚拟DOM var tree = el('div', {'id': 'container'}, [ el('h1', {style: 'color: blue'} ...

  3. solus linux 更新源

    添加源(清华大学开源软件镜像)sudo eopkg ar Solus https://mirrors.tuna.tsinghua.edu.cn/solus/shannon/eopkg-index.xm ...

  4. 013.Oracle数据库,SUBSTR取子字符串

    /*Oracle数据库查询日期在两者之间*/ SELECT EXPIRE_DATE , SUBSTR(EXPIRE_DATE , , ) FROM ME_EO WHERE ( ISSUE_DATE B ...

  5. C# 控件缩写规范

    标准控件缩写规范 类 型 前 缀 示 例 Adrotator adrt adrtTopAd BulletedList blst blstCity Button btn btnSubmit Calend ...

  6. dedecms 标签使用 runphp=php 获取文章静态地址

    [field:id runphp='yes'] $url=GetOneArchive(@me); @me=$url['arcurl']; [/field:id]

  7. 学习进度04(billbill长评数据提取01)

    学习了python写入csv文件自己想了一个小实战,爬取billbill<白色相簿>番剧的长评 网页是动态变化的,往下拉他才会更新出长评,找出关键链接https://api.bilibil ...

  8. ffmpeg “inttypes.h”: No such file or directory

    编译过程:错误一:无法打开包括文件:“inttypes.h”: No such file or directory解决方法:删除之,并在其之前添加如下代码: #if defined(WIN32) &a ...

  9. yeoman 介绍、安装 和 使用

    一.介绍.安装 1, 是什么 Yeoman其实是3个工具的总和: ü  yo --- 脚手架,自动生成工具 ü  Grunt.gulp --- 构建工具 (最初只有grunt,后面gulp火了添加进来 ...

  10. bzoj 1912: [Apio2010]patrol 巡逻

    呵呵呵呵呵呵,自己画图,大概半个小时,觉的连上边会成环(是不是该交仙人掌了??)然后求环不重合部分最大就好了, 结果写了一坨DP,最后写不下去了,再次扒了题解. 发现我真的是个sb. k==1,直接是 ...