• <bdo id='I6tvM'></bdo><ul id='I6tvM'></ul>

    <small id='I6tvM'></small><noframes id='I6tvM'>

  • <i id='I6tvM'><tr id='I6tvM'><dt id='I6tvM'><q id='I6tvM'><span id='I6tvM'><b id='I6tvM'><form id='I6tvM'><ins id='I6tvM'></ins><ul id='I6tvM'></ul><sub id='I6tvM'></sub></form><legend id='I6tvM'></legend><bdo id='I6tvM'><pre id='I6tvM'><center id='I6tvM'></center></pre></bdo></b><th id='I6tvM'></th></span></q></dt></tr></i><div id='I6tvM'><tfoot id='I6tvM'></tfoot><dl id='I6tvM'><fieldset id='I6tvM'></fieldset></dl></div>
    <legend id='I6tvM'><style id='I6tvM'><dir id='I6tvM'><q id='I6tvM'></q></dir></style></legend>

      <tfoot id='I6tvM'></tfoot>
      1. 查找丢失的 Maven 工件

        Finding missing Maven artifacts(查找丢失的 Maven 工件)

                <tbody id='wjMPk'></tbody>
            • <tfoot id='wjMPk'></tfoot>
              1. <small id='wjMPk'></small><noframes id='wjMPk'>

                <legend id='wjMPk'><style id='wjMPk'><dir id='wjMPk'><q id='wjMPk'></q></dir></style></legend>
                <i id='wjMPk'><tr id='wjMPk'><dt id='wjMPk'><q id='wjMPk'><span id='wjMPk'><b id='wjMPk'><form id='wjMPk'><ins id='wjMPk'></ins><ul id='wjMPk'></ul><sub id='wjMPk'></sub></form><legend id='wjMPk'></legend><bdo id='wjMPk'><pre id='wjMPk'><center id='wjMPk'></center></pre></bdo></b><th id='wjMPk'></th></span></q></dt></tr></i><div id='wjMPk'><tfoot id='wjMPk'></tfoot><dl id='wjMPk'><fieldset id='wjMPk'></fieldset></dl></div>

                  <bdo id='wjMPk'></bdo><ul id='wjMPk'></ul>

                  本文介绍了查找丢失的 Maven 工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我是 Maven 新手,正在努力添加依赖项.我正在尝试将现有项目转换为 Maven,在为我引用的库中的所有 jar 添加依赖项后,我收到一条关于缺少工件的错误消息:

                  I'm new to Maven, and struggling with adding dependencies. I'm trying to convert an existing project to Maven, and after adding the dependencies for all the jars in my referenced libraries, I'm receiving an error message about missing artifacts:

                  Missing artifact stax:stax:jar:1.0    
                  Missing artifact clover:clover:jar:1.3-rc4
                  Missing artifact log4j:log4j:bundle:1.2.16
                  Missing artifact stax:stax-ri:jar:1.0
                  

                  通过阅读这篇文章:如何处理 Maven 缺少工件错误?,听起来我需要手动下载这些jar并将它们添加到我的本地maven存储库中.我的问题是如何找到这些罐子?我试着用谷歌搜索它们,我可以找到名称相似的罐子,但不完全像这些,所以我不确定它们是否是正确的罐子.

                  From reading this post: How to handle Maven missing artifact errors?, it sounds like I need to manually download these jars and add them to my local maven repository. My question is how do I find these jars? I tried googling them, and I can find jars that have similar names, but not exactly like these, so I'm not sure if they're the right jars.

                  有什么技巧可以解决这个问题吗?log4j jar 是我原始项目的引用库中唯一明确列出的,所以我猜其他的是我拥有的其他 jar 所需要的,我不知道在哪里可以找到它们或它们的确切名称应该是.

                  Any tips for dealing with this problem? The log4j jar is the only one explicitly listed in the referenced libraries of my original project, so I'm guessing the other ones are required by other jars that I have, and I don't know where to find them or what their exact names should be.

                  谢谢!

                  推荐答案

                  感谢大家的回复.问题的实际原因是,对于这 3 个缺失的工件中的每一个,由于某种原因,当 Maven 将它们下载到我的本地存储库中时,.lastUpdated 被附加到 jar 的末尾.例如,stax-1.0.jar.lastUpdated.这就是 Maven 找不到 stax-1.0.jar 的原因.

                  Thanks to everyone for responding. The actual cause of the problem is that for each of those 3 missing artifacts, for some reason, when Maven downloaded them into my local repository, .lastUpdated was appended to the end of the jar. For example, stax-1.0.jar.lastUpdated. This is the reason Maven could not find stax-1.0.jar.

                  所以,为了解决这个问题,我必须手动下载 stax-1.0.jar,然后将其安装到本地 maven 存储库中与混乱文件完全相同的位置,以便 Maven 可以找到它.(例如,使用命令:

                  So, to fix this problem, I had to manually download stax-1.0.jar, then install it into the local maven repository in the exact same place as the messed up file, so that Maven could find it. (For example, using the command:

                  mvn install:install-file -Dfile=<path-to-file>/stax-1.0.jar         
                  -DgroupId=stax -DartifactId=stax -Dversion=1.0 -Dpackaging=jar
                  

                  使用与现有的不正确文件完全相同的 groupId 和 artifactId 对于 maven 找到它至关重要.

                  Using the same exact groupId and artifactId as the existing, incorrect file was crucial in order for maven to find it.

                  这篇关于查找丢失的 Maven 工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Maven JAVA_HOME environment variable is not defined correctly, but it is(Maven JAVA_HOME 环境变量未正确定义,但它是)
                  TOMCAT_OPTS, environment variable and System.getEnv()(TOMCAT_OPTS、环境变量和 System.getEnv())
                  Launch mac eclipse with environment variables set(设置环境变量启动 mac eclipse)
                  Environment Variable with Maven(使用 Maven 的环境变量)
                  How to subtract ivy dependency sets(如何减去常春藤依赖集)
                  Reading resource file inside jar dependency(在jar依赖中读取资源文件)
                  <i id='cQrNO'><tr id='cQrNO'><dt id='cQrNO'><q id='cQrNO'><span id='cQrNO'><b id='cQrNO'><form id='cQrNO'><ins id='cQrNO'></ins><ul id='cQrNO'></ul><sub id='cQrNO'></sub></form><legend id='cQrNO'></legend><bdo id='cQrNO'><pre id='cQrNO'><center id='cQrNO'></center></pre></bdo></b><th id='cQrNO'></th></span></q></dt></tr></i><div id='cQrNO'><tfoot id='cQrNO'></tfoot><dl id='cQrNO'><fieldset id='cQrNO'></fieldset></dl></div>
                    <bdo id='cQrNO'></bdo><ul id='cQrNO'></ul>

                    <small id='cQrNO'></small><noframes id='cQrNO'>

                    <legend id='cQrNO'><style id='cQrNO'><dir id='cQrNO'><q id='cQrNO'></q></dir></style></legend>

                          <tbody id='cQrNO'></tbody>
                        <tfoot id='cQrNO'></tfoot>