Automatic Dependency Management in Bamboo 3.x with Maven 2 fails

Patrick Aikens July 13, 2011

I have a multi-project build structured thusly:

parent1
|-> parent2
      |-> parent 3
            |-> project1
            |-> project2
            |-> etc

I see the following error in Bamboo when building with Maven 2 in several of my projects (all of them under parent3):

Automatic Maven plan dependencies processing failed: Cannot find parent: parent1.parent2:parent2 for project: parent1.parent2.parent3:parent3:pom:null for project parent1.parent2.parent3:parent3:pom:null

Notice the version coordinate is "null". We only declare a version in the top-level parent1 pom. parent2 and parent3 don't specify any version info, they simply inherit it from parent1. Given that parent3 is one step removed from that inheritance, maybe that's why the version string is "null" in the coordinates rather than properly found? The automatic dependency detection works for direct dependents of project2, and it doesn't have a version element in the pom either.

This has happened since Bamboo 3.0, but at least the builds completed. It still happens in 3.1 but the 'Automatic Maven dependencies' task now treats that as a build failure, so now my builds are "failing" even though the maven build task was successful. Moving from the Maven 2 builder to the Maven 3 builder works, but we have some projects where we're not ready to move to Maven 3 yet. Another interesting fact: only projects under parent3 see this problem - projects that are direct children of parent2 and parent1 work just fine. Anybody else have this problem or something similar?

3 answers

0 votes
Patrick Aikens July 13, 2011

Here's a

0 votes
Patrick Aikens July 13, 2011

Another strangeness... why does changing the Maven build task from Maven 2 to Maven 3 affect the Automatic Maven dependencies task? Aren't they isolated excutions? I'm assuming the autmatic dependencies task is using the Maven embedder and resolving the dependencies on it's own, but the "fix" for this problem on 3.1 (at least for me) is to delete the Maven 2.x builder task and use a Maven 3.x builder task.

0 votes
Patrick Aikens July 13, 2011

A quick test of adding version declarations to each of the parent poms still exhibits the error. It's almost as if the automatic dependency plugin can't walk up more than one step.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events