开发者

Building a maven child project that depends on another projects child project with Bamboo

I have two maven projects

Project AAA

  • AAA-Core
  • AAA-Other

Project BBB

  • BBB-Core
  • BBB-AAA-specific

I want to create a build plan in Bamboo to build the BBB-AAA-specific project. The plan configuration is such that this project depends on the AAA-Other projec build. Thus everything should work ok.

But when I try to run the BBB-AAA-sp开发者_StackOverflow社区ecific Bamboo plan I get an error that states: "Unable to find resource 'foo.bar.AAA:AAA:pom:0.0.1-SNAPSHOT' in repository snapshots (http://foo.bar.com)"

What is going on?

The bamboo builds for "AAA-Core" and "AAA-Other" work as expected.


I figured out this myself:

The AAA-Other module's pom.xml depends on the parent projects (AAA) pom.xml. The error message from building the BBB-AAA-specific project means that the snapshot of the AAA project is not available in the local maven repository ie. it has not been installed there.

To overcome this, I created a separate Bamboo build plan just for the AAA parent project that handles the installation of just the parent project, not any of the child projects. This was accomplished with the following builder goal:

--non-recursive clean install

What this does, is that the parent project is built and installed without the child projects. This in turn guarantees that the AAA projects pom.xml is available in the local maven repository and the BBB-AAA-specific Bamboo build may then use it as a dependency.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜