Maven:父项目未解析,传递依赖项未用于编译

发布于 2024-09-24 04:37:16 字数 1978 浏览 1 评论 0原文

在搜索并尝试了很多东西之后,我需要一个 Maven maven :)
所以,我的问题是,在我的开发盒(Windows 2003)上我可以构建我的maven项目,但是在Bamboo服务器(x86_64 x86_64 x86_64 GNU/Linux)上它失败了,因为其中一个模块没有库并且编译没有找到类。
该类存在传递依赖关系,在我看来,该依赖关系尚未解决。
我在两个机器上运行了命令“mvn -X clean install”并比较了输出。 我认为相关的唯一变化是

在 dev-box

[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: pl.com.abg.iacsro:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.  

上 Bamboo box

[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: null:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.

在我看来,maven 没有解析模块的父级,因为后来在构建过程中我看到了(在 Bamboo box 上)

[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[DEBUG] Reason: Failed to validate POM for project pl.com.abg.iacsro:sapscndp-claimprocessing-api at Artifact [pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided] 
Validation Errors:
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:systemcore-jobs-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:workflow-crossconflictresolution-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:iacs-commons-objectfactory:jar
[DEBUG] 'dependencies.dependency.version' is missing for ro.siveco.iacsro:farmerregistry-api:jar

我也发现了这个,

[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.

但我已经检查并验证了对 xsd 的依赖关系的 pom,因此 pom 是有效的。


您知道如何解决这个问题吗?

非常感谢!

PS:如果我可能忽略了一些东西,这里是 Bamboo box 的完整列表 http ://dl.dropbox.com/u/402296/install.txt

After searching and trying a lot of things I need a Maven maven :)
So, my problem is that on my development box (which is Windows 2003) I can build my maven project, but on the Bamboo server (x86_64 x86_64 x86_64 GNU/Linux) it fails because one of the modules doesn't have a library and the compiling doesn't find a class.
The class is found in a transitive dependency, dependency that it seems to me that is not resolved.
I've run the command "mvn -X clean install" on both boxes and compared the output.
The only change I think it's relevant is

On dev-box

[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: pl.com.abg.iacsro:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.  

On Bamboo box

[DEBUG] Retrieving parent-POM: pl.com.abg.iacsro:sapscndp-claimprocessing:pom:1.0-SNAPSHOT for project: null:sapscndp-claimprocessing-api:jar:DEV2010 from the repository.

It seems to me that maven doesn't resolve the parent of the module, because later in the build process I've seen (on Bamboo box)

[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[DEBUG] Reason: Failed to validate POM for project pl.com.abg.iacsro:sapscndp-claimprocessing-api at Artifact [pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided] 
Validation Errors:
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:systemcore-jobs-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:workflow-crossconflictresolution-api:jar
[DEBUG] 'dependencies.dependency.version' is missing for pl.com.abg.iacsro:iacs-commons-objectfactory:jar
[DEBUG] 'dependencies.dependency.version' is missing for ro.siveco.iacsro:farmerregistry-api:jar

I've also found this

[WARNING] POM for 'pl.com.abg.iacsro:sapscndp-claimprocessing-api:pom:DEV2010:provided' is invalid.

but I've checked and validated myself the pom of the dependency against the xsd, so the pom is valid.

Do you have any idea how to resolve this ?

Many thanks!

P.S. : In case maybe I've overlooked something, here's the full listing from the Bamboo box http://dl.dropbox.com/u/402296/install.txt

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

走过海棠暮 2024-10-01 04:37:16

当我看到这样的条目时:

[DEBUG] Connecting to repository: 'Artifactory-internal-repository' with url: 'http://192.168.0.59:8081/artifactory/repo'.
Downloading: http://192.168.0.59:8081/artifactory/repo/pl/com/abg/iacsro/onthespotcheck/1.0-SNAPSHOT/onthespotcheck-1.0-SNAPSHOT.pom
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG]   Artifact resolved
[WARNING] POM for 'pl.com.abg.iacsro:onthespotcheck-checks-api:pom:DEV2009_2:provided' is invalid.

我很想问关于 onthespotcheck-1.0-SNAPSHOT.pom 是否有什么特别要说的?

顺便说一句,你有很多:

for project: null:artifactId:version

我觉得很奇怪。为什么 groupId 为 null?关于你的 pom 有什么值得一提的吗?

When I see such an entry:

[DEBUG] Connecting to repository: 'Artifactory-internal-repository' with url: 'http://192.168.0.59:8081/artifactory/repo'.
Downloading: http://192.168.0.59:8081/artifactory/repo/pl/com/abg/iacsro/onthespotcheck/1.0-SNAPSHOT/onthespotcheck-1.0-SNAPSHOT.pom
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG]   Artifact resolved
[WARNING] POM for 'pl.com.abg.iacsro:onthespotcheck-checks-api:pom:DEV2009_2:provided' is invalid.

I'm tempted to ask if there is anything particular to say about onthespotcheck-1.0-SNAPSHOT.pom?

As a side note, you have a bunch of:

for project: null:artifactId:version

that I find pretty weird. Why is the groupId null? Anything worth to mention about your pom?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文