-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
0
-
Issue Summary
Currently, Bamboo only parses <dependencies></dependencies> when automatic dependency management is enabled for a plan, and it indeed works as expected - builds of parent Maven projects trigger builds of child project.
However, Bamboo does not take into consideration <parent></parent>, and since it's not considered as a dependency, child plans cannot be built automatically when a parent is built.
Steps to Reproduce
- Create a plan with a repo that has one pom.xml. It will be parent
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.atlassian</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Example Parent</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>4.13.1</junit.version>
<spring.version>1.2.8</spring.version>
</properties>
</project>
- Create a plan that has a repo with the child pom. xml that uses the above parent:
<project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.atlassian</groupId> <artifactId>test</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>test-plugin1</artifactId> <name>Test Plugin Using Parent</name> <packaging>jar</packaging> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> </dependencies> </project>
3. Add Maven dependency analyzer task for both. Enable automatic dependency management for both.
Expected Results
When plan1 is built, it should trigger build of plan2.
Actual Results
Plan2 build is not triggered when plan1 is successfully built.
Workaround
Explicitly add dependency on parent in <dependencies></dependencies>:
<dependency> <groupId>com.atlassian</groupId> <artifactId>test</artifactId> <version>0.0.1-SNAPSHOT</version> <type>pom</type> </dependency>
Consider parent as a dependency in automatic maven deps management
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
0
-
Issue Summary
Currently, Bamboo only parses <dependencies></dependencies> when automatic dependency management is enabled for a plan, and it indeed works as expected - builds of parent Maven projects trigger builds of child project.
However, Bamboo does not take into consideration <parent></parent>, and since it's not considered as a dependency, child plans cannot be built automatically when a parent is built.
Steps to Reproduce
- Create a plan with a repo that has one pom.xml. It will be parent
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.atlassian</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Example Parent</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>4.13.1</junit.version>
<spring.version>1.2.8</spring.version>
</properties>
</project>
- Create a plan that has a repo with the child pom. xml that uses the above parent:
<project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.atlassian</groupId> <artifactId>test</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>test-plugin1</artifactId> <name>Test Plugin Using Parent</name> <packaging>jar</packaging> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> </dependencies> </project>
3. Add Maven dependency analyzer task for both. Enable automatic dependency management for both.
Expected Results
When plan1 is built, it should trigger build of plan2.
Actual Results
Plan2 build is not triggered when plan1 is successfully built.
Workaround
Explicitly add dependency on parent in <dependencies></dependencies>:
<dependency> <groupId>com.atlassian</groupId> <artifactId>test</artifactId> <version>0.0.1-SNAPSHOT</version> <type>pom</type> </dependency>