maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <>
Subject Re: Parent SNAPSHOT not resolved Maven 2.2.1 - 3.0.4 - (Nexus repo)
Date Thu, 03 Oct 2013 14:04:00 GMT
On 3 Oct 2013, at 14:31, NRO wrote:

> Thanks for the clear explanation.
> All our artifacts are served by our Nexus Repository Manager (external and
> internal).
> All our repositories (hosted and proxy) are managed by Nexus, this is why
> our settings.xml and parent poms does not need to refer to other
> repositories because we want to control all from Nexus.
> So declaring a fake snapshot repository will help Maven re-route resolution
> to a parent pom...
> BTW if you replace the snapshot parent by a release version, the same
> problem appear despite the maven central in super pom...

This isn't what I see locally using the same poms as below, with the parent version set to
a release it will attempt to fetch it:


Repeating the same test using a mirror (and clearing the local repository of any cached records
about the pom, see below):

	Downloading: https://some.repo.manager/content/groups/

Note that Maven will record failed attempts to fetch releases in your local repository:

	[ERROR] Non-resolvable parent POM: Failure to find a.b.c:parente:pom:0.0.1 in
was cached in the local repository,
		resolution will not be reattempted until the update interval of central has elapsed or updates
are forced and 'parent.relativePath' points at wrong local POM @ line 7, column 10 -> [Help

and will not attempt to fetch the release again until the update interval elapses (default
is daily) or you use -U to force it to re-check.

> Again adding the fake repository helps solving the case.
> I am still not convinced it is a feature ;-)

Since there is no snapshot repository defined in the current pom.xml, settings.xml, or Maven
super-pom - and the relativePath doesn't lead to the parent pom - how should Maven know where
to fetch it?

I guess you could say that defining a mirror in your settings.xml should add an implicit snapshot
repository definition, but how would you remove such a repository definition if you didn't
want it? Because each snapshot repository is queried separately, if you then defined additional
snapshot repositories then you could end up with multiple queries going through the mirror.
In a way this all comes back to the fact that mirror != repository and I'm not sure that mixing
these concepts by adding implicit repositories based on mirror definitions is a good thing
- especially when there's a simple solution (declare the repository in settings.xml) that
captures the intent and would also work when not mirroring.

(just my 2 sen)

> --
> View this message in context:
> Sent from the Maven - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message