【发布时间】: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 将能够访问它们。