-
Bug
-
Resolution: Handled by Support
-
Medium
-
None
-
3.1
-
None
-
Standalone, Linux, JDK 1.6.0_24, Maven 3.0.3
I've noticed that automatic build dependencies stopped working after somewhere along the way of upgrades from bamboo 2.6 (I must have missed relevant release notes entry). After a quick glance at the configuration panels I've figured out that I need to add a 'Maven Dependencies Processor' task to my build plan. Unfortunately the task fails, despite the fact that Maven 2.x task in the same job succeeds. Error message is
03-Aug-2011 11:34:48 Automatic Maven plan dependencies processing failed: Cannot find parent: org.objectledge:ledge-common for project: null:ledge-components:jar:null for project null:ledge-components:jar:null
It appears that Maven Dependency Processor task has trouble resolving the parent project from a remote repository. Here's how my setup looks like.
<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> <parent> <groupId>org.objectledge</groupId> <artifactId>ledge-common</artifactId> <relativePath>../ledge-common/pom.xml</relativePath> <version>1.0.11-SNAPSHOT</version> </parent> <artifactId>ledge-components</artifactId> <packaging>jar</packaging> <!-- ... --> </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>org.objectledge</groupId> <artifactId>ledge-common</artifactId> <packaging>pom</packaging> <version>1.0.11-SNAPSHOT</version> <!-- ... --> <repositories> <repository> <id>nexus</id> <name>Objectledge Nexus repository</name> <url>http://objectledge.org/nexus/content/groups/m2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>Objectledge Nexus repository (plugins)</name> <url>http://objectledge.org/nexus/content/groups/m2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </snapshots> </pluginRepository> </pluginRepositories> <distributionManagement> <repository> <id>nexus.objectledge.org</id> <name>ObjectLedge releases Nexus repository</name> <url>http://nexus.objectledge.org/nexus/content/repositories/m2releases</url> </repository> <snapshotRepository> <id>nexus.objectledge.org</id> <name>ObjectLedge snapshots Nexus repository</name> <url>http://nexus.objectledge.org/nexus/content/repositories/m2snapshots</url> </snapshotRepository> </distributionManagement> </project>
<settings xmlns="http://maven.apache.org/settings/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <interactiveMode>false</interactiveMode> <servers> <server> <id>nexus.objectledge.org</id> <username>bamboo</username> <password>***********</password> </server> </servers> <profiles> <profile> <id>bamboo</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <snapshots> <enabled>true</enabled> </snapshots> <id>objectledge.snapshots</id> <name>ObjectLedge snapshots repository</name> <url>http://objectledge.org/nexus/content/repositories/m2snapshots</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots> <enabled>true</enabled> </snapshots> <id>objectledge.snapshots</id> <name>ObjectLedge snapshots repository</name> <url>http://objectledge.org/nexus/content/repositories/m2snapshots</url> </pluginRepository> </pluginRepositories> </profile> </profiles> </settings>
As you see I am using Nexus repository manager. SNAPSHOT artifacts built by bamboo are deployed to a dedicated repository. Both Nexus and Bamboo have artifact retention policies, but Maven2 has not. Whatever goes into the local repository, stays there. In order to avoid SNAPSHOT artifact buildup, I have a Bamboo plan running on fixed schedule that removes SNAPSHOTs from bamboo users local repository. Because of this, in order to build ledge-components module (and others), the parent POM needs to be resolved from remote repository. There's a catch - remote repository location is defined in the parent POM itself. That's why bamboo user needs the to have the repository defined in it's default Maven profile in order to bootstrap the build after the local repository has been purged.
This setup works the ordinary Bamboo builds, but Maven Dependency Processor fails resolve the parent project as indicated by error message above.
I also did another test an executed sudo -u bamboo mvn dependency:list from the build-dir, which I imagine is quite similar to whatever the dependency processor is doing, and it worked without problems.
Too bad I cannot set maven options for the decadency processor task, a -X could shed some light on the issue.
Form Name |
---|
[BAM-9455] Automatic Maven dependency processor fails to resolve parent project
Workflow | Original: Bamboo Workflow 2016 v1 - Restricted [ 1433228 ] | New: JAC Bug Workflow v3 [ 3378034 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: Bamboo Workflow 2016 v1 [ 1406546 ] | New: Bamboo Workflow 2016 v1 - Restricted [ 1433228 ] |
Workflow | Original: Bamboo Workflow 2014 v2 [ 606573 ] | New: Bamboo Workflow 2016 v1 [ 1406546 ] |
Workflow | Original: Bamboo Workflow 2014 [ 593934 ] | New: Bamboo Workflow 2014 v2 [ 606573 ] |
Workflow | Original: Bamboo Workflow 2010 [ 340045 ] | New: Bamboo Workflow 2014 [ 593934 ] |
Resolution | New: Handled by Support [ 8 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Rafal,
If you have more problems with the patched file in the newer Bamboo versions, please create a ticket at https://support.atlassian.com. It will allow us to exchange log files and other instance details, keeping your data private (https://jira.atlassian.com/ is a public instance).
Thanks in advance,
Renan