【问题标题】:Hudson Maven ${basedir} can't find dependencyHudson Maven ${basedir} 找不到依赖项
【发布时间】:2014-11-20 15:00:06
【问题描述】:

我在项目基础的 lib 目录中创建了一个 maven 存储库。 我可以使用 maven 来构建这个项目并从 lib 目录中的 repo 中获取依赖项。当我尝试使用 Hudson 构建这个项目时,Hudson 在 lib repo 中找不到依赖项。

这里是项目pom的相关部分:

      <dependency>
         <groupId>manitou</groupId>
         <artifactId>manitou.cxf.jar</artifactId>
         <version>1.0.0</version>
      </dependency>

   </dependencies>

   <repositories>
    <repository>
      <id>ErpClientsLibRepo</id>
      <url>file://${basedir}/lib</url>
    </repository>
  </repositories>

以下是从 Hudson 运行时来自 Maven 的错误:

[INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s)
[INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project DigabitERPClients: Could not resolve dependencies for project com.digabit:DigabitERPClients:jar:1.2.0: Failure to find manitou:manitou.cxf.jar:jar:1.0.0 in file:///opt/eng/hudson/jobs/20-DigabitJParent/workspace/DigabitErpClients/lib was cached in the local repository, resolution will not be reattempted until the update interval of ErpClientsLibRepo has elapsed or updates are forced
[DEBUG] Closing connection to remote
[ERROR] Failed to execute goal on project DigabitERPClients: Could not resolve dependencies for project com.digabit:DigabitERPClients:jar:1.2.0: Failure to find manitou:manitou.cxf.jar:jar:1.0.0 in file:///opt/eng/hudson/jobs/20-DigabitJParent/workspace/DigabitErpClients/lib was cached in the local repository, resolution will not be reattempted until the update interval of ErpClientsLibRepo has elapsed or updates are forced -> [Help 1]

这是 Maven(由 Hudson 运行)似乎正在查看的路径中的目录列表:

[root@vail lib]# cd /opt/eng/hudson/jobs/20-DigabitJParent/workspace/DigabitErpClients/lib
[root@vail lib]# ls
manitou
[root@vail lib]# ls manitou/
manitou.cxf.jar
[root@vail lib]#

任何想法我做错了什么?谢谢

【问题讨论】:

  • 如果您不使用存储库管理器,请开始使用一个并将这些工件部署到存储库管理器中,hudson 将能够访问它们。

标签: java maven hudson


【解决方案1】:

我进入了 hudson 项目并强制 maven 更新,现在构建工作:S

【讨论】:

    猜你喜欢
    • 2016-10-01
    • 2020-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-12
    • 2017-09-18
    • 1970-01-01
    相关资源
    最近更新 更多