You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "KARR, DAVID" <dk...@att.com> on 2012/12/19 04:26:07 UTC

Proper fix for "non-resolvable" dependency in build server

I have a project that is building fine on my laptop.  Today I started to set up the build for this on our Bamboo server.  Everything is checked in.  Both my laptop and the build server are using Maven 3.0.4.

I have a top-level aggregator pom that specifies several modules, but this pom is not the parent of any module.  I do use parent poms, but those parents are in peer directories, and I have blank "relativePath" elements in all poms.

In the Bamboo build of the top-level aggregator POM, I see several errors like this:

[ERROR]   The project com.example.cde:java-project-parent:1.0.1 (/volatile/bamboo/bamboo3.4.3_data/xml-data/build-dir/FOO-BUILD-JOB1/java-project-parent/pom.xml) has 1 error
18-Dec-2012 16:40:21 	[ERROR]     Non-resolvable parent POM: Failure to find com.example.cde:project-parent:pom:1.0.0 in http://hostname.net:8081/nexus/content/groups/stuff was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 6, column 11 -> [Help 2]

The "java-project-parent" is one of the poms in the parent hierarchy.

I get that for some reason the "java-project-parent" artifact isn't in the local repository, but what exactly do I have to do to resolve this?  Do I have to run "mvn -U install" instead of "mvn install"?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Proper fix for "non-resolvable" dependency in build server

Posted by "KARR, DAVID" <dk...@att.com>.
> -----Original Message-----
> From: KARR, DAVID
> Sent: Wednesday, December 19, 2012 9:11 AM
> To: Maven Users List
> Subject: RE: Proper fix for "non-resolvable" dependency in build server
> 
> > -----Original Message-----
> > From: KARR, DAVID
> > Sent: Tuesday, December 18, 2012 7:26 PM
> > To: Maven Users List
> > Subject: Proper fix for "non-resolvable" dependency in build server
> >
> > I have a project that is building fine on my laptop.  Today I started
> > to set up the build for this on our Bamboo server.  Everything is
> > checked in.  Both my laptop and the build server are using Maven
> 3.0.4.
> >
> > I have a top-level aggregator pom that specifies several modules, but
> > this pom is not the parent of any module.  I do use parent poms, but
> > those parents are in peer directories, and I have blank
> "relativePath"
> > elements in all poms.
> >
> > In the Bamboo build of the top-level aggregator POM, I see several
> > errors like this:
> >
> > [ERROR]   The project com.example.cde:java-project-parent:1.0.1
> > (/volatile/bamboo/bamboo3.4.3_data/xml-data/build-dir/FOO-BUILD-
> > JOB1/java-project-parent/pom.xml) has 1 error
> > 18-Dec-2012 16:40:21 	[ERROR]     Non-resolvable parent POM: Failure
> > to find com.example.cde:project-parent:pom:1.0.0 in
> > http://hostname.net:8081/nexus/content/groups/stuff was cached in the
> > local repository, resolution will not be reattempted until the update
> > interval of nexus has elapsed or updates are forced and
> > 'parent.relativePath' points at no local POM @ line 6, column 11 ->
> > [Help 2]
> 
> Note that just before these lines in the log, I also see this:
> 
> Downloading:
> http://hostname.net:8081/nexus/content/groups/stuff/com/example/cde/pro
> ject-parent/1.0.0/project-parent-1.0.0.pom
> Downloading:
> http://hostname.net:8081/nexus/content/groups/stuff/com/example/cde/jav
> a-project-parent/1.0.1/java-project-parent-1.0.1.pom
> Downloading:
> http://hostname.net:8081/nexus/content/groups/stuff/com/example/cde/war
> -project-parent/1.0.0/war-project-parent-1.0.0.pom
> 
> I'm confused.  It downloads the pom, apparently to the local
> repository, and then claims that it can't find it.

What I've discovered is that running "mvn install" in the top-level aggregator pom isn't actually installing the artifacts in the submodules. When I looked in the local repo, the only thing in each directory in the local repo was a file like "...pom.lastUpdated".   The actual POM wasn't there.

When I had the admin manually run "mvn install" in the first submodule, that actually installed the POM into the local repo.  I have a feeling if he manually installs the other two parent poms, the build of the project that depends on all three of them will build fine.

I must be misunderstanding an important detail of how a build with submodules works.  What am I missing?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Proper fix for "non-resolvable" dependency in build server

Posted by "KARR, DAVID" <dk...@att.com>.
> -----Original Message-----
> From: KARR, DAVID
> Sent: Tuesday, December 18, 2012 7:26 PM
> To: Maven Users List
> Subject: Proper fix for "non-resolvable" dependency in build server
> 
> I have a project that is building fine on my laptop.  Today I started
> to set up the build for this on our Bamboo server.  Everything is
> checked in.  Both my laptop and the build server are using Maven 3.0.4.
> 
> I have a top-level aggregator pom that specifies several modules, but
> this pom is not the parent of any module.  I do use parent poms, but
> those parents are in peer directories, and I have blank "relativePath"
> elements in all poms.
> 
> In the Bamboo build of the top-level aggregator POM, I see several
> errors like this:
> 
> [ERROR]   The project com.example.cde:java-project-parent:1.0.1
> (/volatile/bamboo/bamboo3.4.3_data/xml-data/build-dir/FOO-BUILD-
> JOB1/java-project-parent/pom.xml) has 1 error
> 18-Dec-2012 16:40:21 	[ERROR]     Non-resolvable parent POM: Failure
> to find com.example.cde:project-parent:pom:1.0.0 in
> http://hostname.net:8081/nexus/content/groups/stuff was cached in the
> local repository, resolution will not be reattempted until the update
> interval of nexus has elapsed or updates are forced and
> 'parent.relativePath' points at no local POM @ line 6, column 11 ->
> [Help 2]

Note that just before these lines in the log, I also see this:

Downloading: http://hostname.net:8081/nexus/content/groups/stuff/com/example/cde/project-parent/1.0.0/project-parent-1.0.0.pom
Downloading: http://hostname.net:8081/nexus/content/groups/stuff/com/example/cde/java-project-parent/1.0.1/java-project-parent-1.0.1.pom
Downloading: http://hostname.net:8081/nexus/content/groups/stuff/com/example/cde/war-project-parent/1.0.0/war-project-parent-1.0.0.pom

I'm confused.  It downloads the pom, apparently to the local repository, and then claims that it can't find it.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Proper fix for "non-resolvable" dependency in build server

Posted by "KARR, DAVID" <dk...@att.com>.
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Wednesday, December 19, 2012 10:09 AM
> To: Maven Users List
> Subject: Re: Proper fix for "non-resolvable" dependency in build server
> 
> > I have a top-level aggregator pom that specifies several modules, but
> this pom
> > is not the parent of any module.  I do use parent poms, but those
> parents are in
> > peer directories, and I have blank "relativePath" elements in all
> poms.
> 
> This is most likely "wrong" and you should specify the proper
> relativePath.
> 
> > The "java-project-parent" is one of the poms in the parent hierarchy.
> 
> I have trouble following your email because I cannot "picture" the
> project layout. Can you reply with the basic layout in text form along
> with important details eg:
> 
> project-parent [top-level aggregator, not the actual parent of anything
> below]
> + java-project-parent [parent of this and that]
> + this
> + that
> + notjava-project-parent [parent of another]
> + another
> etc

It would look like this:

project-top [modules: project-parent, java-project-parent, war-project-parent, dataservice-build, dataserviceGUI]
+ project-parent
+ java-project-parent [parent: project-parent]
+ war-project-parent [parent: java-project-parent]
+ dataservice-build [modules: ../dataservice, ../dataservice-ear]
+ dataserviceGUI [parent: war-project-parent]
+ dataservice-ear [parent: project-parent]
+ dataservice [parent: war-project-parent]

> I would guess that some usage of "mvn -N install" from the top would
> cure your problem. But that should not be necessary. You should be
> able to just run "mvn clean verify" from the top and everything should
> "just work" in a project that just got checked out of source code on a
> new machine that just installed Maven. If not, you are probably doing
> something wrong in your build somewhere.

That is my intention.  There is at least one artifact that I'll have to manually install to nexus (Oracle jdbc driver), but otherwise the intention is that it should build out of the box.

However, I also want to allow for a couple of different checkout configurations.  Some people will check out from "project-top" to build the entire project, but someone people will just be checking out the three parent poms and "dataserviceGUI", and some will need the three parents and "dataservice-build", "dataservice-ear", and "dataservice".  I suppose that means that I can always depend on "../*-project-parent" to exist, so perhaps setting the values for "relativePath" could always work.

> You may also benefit from reading Stephen Connolly's recent emails to
> this list in the thread "Recursive Maven considered harmful"
> especially the section starting with "You are doing Maven wrong if
> your entire build cannot work under the following incremental
> behaviors..." [timestamp on that email is Mon, 17 Dec 2012 11:36:42
> +0000].
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Re: Proper fix for "non-resolvable" dependency in build server

Posted by Wayne Fay <wa...@gmail.com>.
> I have a top-level aggregator pom that specifies several modules, but this pom
> is not the parent of any module.  I do use parent poms, but those parents are in
> peer directories, and I have blank "relativePath" elements in all poms.

This is most likely "wrong" and you should specify the proper relativePath.

> The "java-project-parent" is one of the poms in the parent hierarchy.

I have trouble following your email because I cannot "picture" the
project layout. Can you reply with the basic layout in text form along
with important details eg:

project-parent [top-level aggregator, not the actual parent of anything below]
+ java-project-parent [parent of this and that]
+ this
+ that
+ notjava-project-parent [parent of another]
+ another
etc

I would guess that some usage of "mvn -N install" from the top would
cure your problem. But that should not be necessary. You should be
able to just run "mvn clean verify" from the top and everything should
"just work" in a project that just got checked out of source code on a
new machine that just installed Maven. If not, you are probably doing
something wrong in your build somewhere.

You may also benefit from reading Stephen Connolly's recent emails to
this list in the thread "Recursive Maven considered harmful"
especially the section starting with "You are doing Maven wrong if
your entire build cannot work under the following incremental
behaviors..." [timestamp on that email is Mon, 17 Dec 2012 11:36:42
+0000].

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org