mvn 包因所需工件丢失而失败,即使它存在于我的远程存储库中

2023-11-27

我正在尝试奔跑mvn清理包在我的 Maven 项目上,它失败并显示以下消息:

工件 net.ezswitch:ResourcesComponent:jar:0.0.14 的“所需工件缺失”

我已经配置了我的设置.xml包括我的远程存储库,如果我在浏览器上导航,我实际上可以在我的存储库中找到这个 Jar,但 Maven 却不能,不知何故。

我已经检查过我正在运行的 Maven 版本是我编辑的 settings.xml 文件生效的版本,因为如果我禁用在那里配置的配置文件,Maven 将失败并显示不同的消息。

我在 MAC OS X Lion 上使用 Maven 2.2.1。

这是我的settings.xml:

<localRepository>/Users/hordine/.m2/repository</localRepository>
<servers>
  <server>
      <id>LiquixRepository</id>
      <username>henrique</username>
      <password>xxxxx</password>
      <configuration>
          <httpConfiguration>
              <put>
                  <params>
                      <param>
                          <name>http.authentication.preemptive</name>
                          <value>%b,true</value>
                      </param>
                  </params>
              </put>
          </httpConfiguration>      
      </configuration>
  </server>

  <server>
      <id>dev.liquix.eu</id>
      <username>henrique</username>
      <password>xxxxx</password>
  </server>
  <server>
      <id>ezpay-dev.liquix.eu</id>
      <username>henrique</username>
      <password>xxxxx</password>
  </server>
</servers>
<profiles>
  <profile>
      <id>ezswitch</id>

      <properties>
          <tomcat.home>/System/Library/tomcat</tomcat.home>
          <subversion.user>henrique</subversion.user>
          <subversion.password>xxxxx</subversion.password>
      </properties>

      <activation>
          <jdk>1.6</jdk>
      </activation>

      <repositories>
          <repository>
              <id>central</id>
              <name>EzSwitch Cache</name>
              <layout>default</layout>
              <url>http://ezpay-dev.liquix.eu:9998/repository</url>
          </repository>
          <repository>
            <id>central_maven1</id>
            <name>EzSwitch Cache2</name>
            <layout>legacy</layout>
            <url>http://ezpay-dev.liquix.eu:9998/repository</url>
          </repository>
      </repositories>


      <pluginRepositories>
          <pluginRepository>
              <id>central</id>
              <name>EZswitch</name>
              <url>http://ezpay-dev.liquix.eu:9998/repository</url>
              <snapshots>
              </snapshots>
              <releases>
              </releases>
          </pluginRepository>
      </pluginRepositories>

  </profile>
</profiles>
<activeProfiles>
    <activeProfile>ezswitch</activeProfile>
</activeProfiles>

我收到的整个错误消息是:

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Missing:
----------
1) net.ezswitch:ResourcesComponent:jar:0.0.14

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=net.ezswitch -DartifactId=ResourcesComponent -Dversion=0.0.14 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=net.ezswitch -DartifactId=ResourcesComponent -Dversion=0.0.14 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) eu.liquix:RegistrationSolution:war:0.4.60-SNAPSHOT
    2) net.ezswitch:ResourcesComponent:jar:0.0.14

----------
1 required artifact is missing.

for artifact: 
  eu.liquix:RegistrationSolution:war:0.4.60-SNAPSHOT

from the specified remote repositories:
  central (http://ezpay-dev.liquix.eu:9998/repository),
  central_maven1 (http://ezpay-dev.liquix.eu:9998/repository)


    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:711)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

但是,如果我通过浏览器导航到该位置,我可以在以下位置看到工件:

http://ezpay-dev.liquix.eu:9998/repository/net/ezswitch/ResourcesComponent/0.0.14/ResourcesComponent-0.0.14.jar

我将不胜感激任何帮助。提前致谢。

恩里克·奥尔丁


显然,错误消息“缺少所需的工件”隐藏了实际的根本原因,这在消息中不可见。在(-X 选项)上运行带有调试消息的 Maven 将打印出其他信息,这些信息可以更详细地了解问题所在。

为了以后参考,这次的错误是

[WARNING] Unable to get resource 'net.ezswitch:ResourcesComponent:pom:0.0.14' from repository central (ezpay-dev.liquix.eu:9998/repository):
Specified destination directory cannot be created: /Users/hordine/.m2/repository/net/ezswitch/ResourcesComponent/0.0.14

如果没有调试标志,这是不可见的。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

mvn 包因所需工件丢失而失败,即使它存在于我的远程存储库中 的相关文章

随机推荐

  • 从字符串列表中删除空字符串

    我想从 python 的字符串列表中删除所有空字符串 我的想法是这样的 while in str list str list remove 有没有更多的Pythonic方法来做到这一点 我会用filter str list filter N
  • Identity Core 的密码历史记录

    密码历史记录有默认实现吗 我正在尝试在我的项目中使用身份来实现该功能 因此我添加了包含密码哈希值的密码历史表 当用户更改密码时 usermanager 会生成密码的哈希值 var passwordHash userManager Passw
  • 如何签署 MSI?

    我的公司希望阻止客户安装我们的产品时出现的 UAC 弹出窗口 我们从 VeriSign VeriSign Class 3 Code Signing 2010 CA 购买了证书 我得到了一个 MyCompany cer 文件 我通过双击证书并
  • 如何将 sockaddr_in6::sin6_addr 字节顺序设置为网络字节顺序?

    我开发了一个网络应用程序并使用套接字 API 我想设置sockaddr in6结构的sin6 addr字节顺序 对于 16 位或 32 位变量 很简单 使用 htons 或 htonl IPv4 sockaddr in addr addr
  • OpenCV findFundamentalMat 非常不稳定且敏感

    我正在为我的大学开展一个项目 我们希望四轴飞行器能够用他的相机稳定自己 不幸的是 基本矩阵对特征点内的微小变化反应非常敏感 我稍后会给你例子 我认为由于 ocv 我的匹配已经工作得很好了 我正在使用 SURF 特征并将它们与 knn Met
  • 约束表达式无效

    下列代码示例与 GCC 12 2 和 MSVC 19 33 不同 它不能使用 Clang 15 或 Clang trunk 进行编译 嵌套required子句中的约束表达式是否无效 struct t constexpr auto b con
  • 使用 Rangy 保存其位置时,插入符号在 Firefox 中消失

    这种情况仅发生在 Firefox 中 重要提示 我正在保存插入符的位置rangy saveSelection 当点击内容可编辑div时 on keyup 将外部 html 元素 作为节点 添加到内容可编辑 div 时 我需要通过多种方式不断
  • Javascript 中的条形图:堆叠条形图 + 分组条形图

    我正在寻找一个 Javascript 解决方案 将分组和堆叠条形图与漂亮的图表混合在一起 例如由Protovis 例如 如果我想比较 Apple iPad iPhone 设备和 Android 设备上的下载量 我可能会这样做 请原谅我糟糕的
  • 解码或转义 \u00f0\u009f\u0091\u008d 为

    我们都知道 UTF 8 很难 我从 Facebook 导出消息 生成的 JSON 文件将所有非 ASCII 字符转义为 unicode 代码点 我正在寻找一种简单的方法来将这些 un icode 代码点转义为常规的旧 UTF 8 我也很想使
  • 在python中创建非阻塞套接字

    我试图了解非阻塞套接字是如何工作的 所以我用 python 编写了这个简单的服务器 import socket s socket socket socket AF INET socket SOCK STREAM s bind 127 0 0
  • C++中的指针和C#中的引用类型之间的区别

    在 C 中 指针是指向存储另一个变量的内存地址的指针 而在 C 中 引用在某种程度上是相同的 这两者有什么区别 在 C 中 引用类型在不再需要时将被自动垃圾回收
  • 激活器:Play Framework 2.3.x:运行与启动

    为什么这两个命令的行为不同 在生产模式下启动游戏和在开发模式下启动游戏不同吗 activator run Dconfig file myConfig conf works activator run Dconfig file myConfi
  • Metastore 中分区但 HDFS 中不存在路径

    我们的摄取过程存在问题 这会导致分区被添加到 Hive 中的表中 但 HDFS 中的路径实际上并不存在 我们已经解决了这个问题 但仍然存在这些坏分区 当使用 Tez 查询这些表时 我们收到 FileNotFound 异常 指向 HDFS 中
  • 将ios 5模拟器安装到xcode 5.1?

    我目前在 Mac 10 8 5 上使用 xcode 5 1 但我无法在这个 xcode 中安装 ios 模拟器 有人告诉我如何安装ios 5模拟器吗 伙计 这个really今天 当我从 Xcode 5 0 升级到 Xcode 5 1 并发现
  • 为什么 String.IndexOf 和 String.Contains 在提供阿拉伯文本时不一致?

    我想知道我是否在 NET Framework 中发现了错误 或者我是否不明白某些内容 运行这段代码后 var text var word bool exist text Contains word int index text IndexO
  • Composer 2,您的某些插件似乎与它不兼容

    我尝试从 magento 市场安装扩展 但出现不兼容错误 问题1 magento composer root update plugin 已锁定到版本 1 0 0 并且未请求更新此包 magento composer root update
  • 如何自定义要在“添加更多 portlet”菜单中显示的 portlet

    我需要自定义哪个 portlet 出现在 添加更多 portlet 菜单 中 如下图所示 我需要根据登录的用户或站点 社区 限制此菜单中显示的 portlet 数量 这样 站点所有者或站点管理员将能够仅将全能管理员为他们决定的那些 port
  • 计算并显示页面加载进度百分比

    我有一个加载器 它在页面开始加载时加载 我需要显示其中的完成百分比 我的应用程序包含大量 jquery 和 css 并且还包含 ajax 调用 到目前为止 我已经在页面加载开始时显示进度条 并在 ajax 成功完成时隐藏它 另外 我已经显示
  • 在 Linux 中使用 C 语言使用原始套接字进行数据包嗅探

    我需要在 Linux 中编写一个数据包嗅探器来检测发送的 HTTPS 数据包并保存请求中的 url 我在中找到了这方面的代码安全狂并运行它 该代码运行并且仅嗅探接收到的数据包 但我需要在嗅探器中获取发送的数据包 如何获取这段代码中发送的数据
  • mvn 包因所需工件丢失而失败,即使它存在于我的远程存储库中

    我正在尝试奔跑mvn清理包在我的 Maven 项目上 它失败并显示以下消息 工件 net ezswitch ResourcesComponent jar 0 0 14 的 所需工件缺失 我已经配置了我的设置 xml包括我的远程存储库 如果我