Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo automatic dependency management with Maven

I set up two parent and child projects as described https://confluence.atlassian.com/bamboo/setting-up-plan-build-dependencies-289276887.html but Bamboo does not find parent dependencies in the child project and there is absolutely no other tutorial/documentation on this subject. Would you please provide a step-by-step example on how to set up automatic dependency management with Maven?

1 answer

0 votes

Hello @Mohammad Alavi welcome to the community :)

Are you facing issues with the child project not being able to fetch dependencies built by the parent project?

Also, the documentation that you have pointed out contains a section about automatic dependency management, what in that section didn't work for you?

According to the documents I expect the child build plan to be triggered when the parent builds successfully, but this does not happen.

 

This is my parent project POM file:

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>me.smash.bamboo</groupId>
<artifactId>parent-project</artifactId>
<version>1.0</version>

...

</project>

and this is my child project POM file which depends on the parent project:


<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>me.smash.bamboo</groupId>
<artifactId>child-project</artifactId>
<version>1.0</version>


<dependencies>
<dependency>
<groupId>me.smash.bamboo</groupId>
<artifactId>parent-project</artifactId>
<version>1.0</version>
</dependency>
</dependencies>

...

</project>

Thanks for the pom.xml!

Can you also share the "Maven Dependency Processor" task configuration and the plan dependencies configuration you have on your both parent and child plans?

I used maven dependency processor task with default configurations (all fields are empty) both in parent and child projects in the default stage's default job.

 

Screen Shot 2019-11-26 at 19.54.57.png

 

and the plan's dependency configuration for both child and parent projects is as follows:

 

Screen Shot 2019-11-26 at 19.54.13.png

At first glance everything looks fine.

Giving a look at https://jira.atlassian.com/browse/BAM-18381, branches are not capable of triggering dependencies. Did you tried to trigger your child plans from the parent master?

Yes I use master branch for both parent and child project 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

685 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you