maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <>
Subject [jira] Closed: (MNG-4475) Transitive Dependency Resolution silently fails if parent pom cannot be retrieved from repository
Date Tue, 01 Dec 2009 15:51:55 GMT


Benjamin Bentmann closed MNG-4475.

       Resolution: Fixed
    Fix Version/s: 3.0-alpha-6
         Assignee: Benjamin Bentmann

Improved log output in [r885804|].

bq. [WARNING] Invalid artifact metadata for projectA:jar:0.4.0
This is the warning telling you about the problem and this warning is always present in the
log, even without debug enabled. So the problem is not silently ignored. The improved message
will now clearly say that this effects transitive dependencies and that debug logging can
be used to see all the details.

The stack trace is deliberately not shown unless debug is enabled as there are still a bunch
of broken POMs out in the wild that users depend on and throwing the stack trace at them when
they have no chance to fix or disable it is annoying.

> Transitive Dependency Resolution silently fails if parent pom cannot be retrieved from
> -------------------------------------------------------------------------------------------------
>                 Key: MNG-4475
>                 URL:
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 3.0-alpha-4, 3.0-alpha-5
>         Environment: Java 1.6_15, Mac OS X 10.6.2
>            Reporter: Sven Panko
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-alpha-6
> While preparing our projects to be migrated from Maven 2 (currently using 2.2.1) to Maven
3 (3.0-alpha-5) I faced a problem concerning transitive dependencies. I had the following
> 3 projects:
> * a parent project (PARENT)
> * Project A (parent = PARENT with lots of 3rd party libs as dependencies)
> * Project B (parent = PARENT and declares Project A to be a dependency)
> I tried to build Project B using Maven 3 but the build failed, because Project A's transitive
dependencies were not resolved. When trying to build the same project using Maven 2 it successfully
picked up the transitive dependencies. After a bit of searching I activated the error stacktraces
and saw the following exception when running the project's build with Maven 3:
> [DEBUG] Unable to find resource 'PARENT:pom:0.4-SNAPSHOT' in repository internal-snapshots
> org.apache.maven.wagon.ResourceDoesNotExistException: Failure to resolve PARENT/0.1-SNAPSHOT/PARENT-0.4-SNAPSHOT.pom
from was cached in the local repository. Resolution
will not be reattempted until the update interval of internal-snapshots has elapsed or updates
are forced.
>         at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(
>         at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(
>         at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(
>         at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(
>         at org.apache.maven.repository.legacy.LegacyRepositorySystem.resolve(
>         at org.apache.maven.project.RepositoryModelResolver.resolveModel(
>         at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(
>         at org.apache.maven.model.building.DefaultModelBuilder.readParent(
>         at
>         at
>         at
>         at
>         at
>         at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(
>         at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(
>         at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.recurse(
>         at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(
>         at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(
>         at org.apache.maven.repository.legacy.LegacyRepositorySystem.resolve(
>         at org.apache.maven.DefaultProjectDependenciesResolver.resolve(
>         at org.apache.maven.DefaultProjectDependenciesResolver.resolve(
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.resolveProjectDependencies(
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>         at org.apache.maven.DefaultMaven.doExecute(
>         at org.apache.maven.DefaultMaven.execute(
>         at org.apache.maven.cli.MavenCli.execute(
>         at org.apache.maven.cli.MavenCli.doMain(
>         at org.apache.maven.cli.MavenCli.main(
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke(
>         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(
>         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
>         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
>         at org.codehaus.plexus.classworlds.launcher.Launcher.main(
> [WARNING] Invalid artifact metadata for projectA:jar:0.4.0: 1 problem was encountered
while building the effective model for projectA:0.4.0
> [FATAL] Non-resolvable parent POM PARENT:0.1-SNAPSHOT for projectA:0.4.0: Failed to resolve
POM for PARENT:0.1-SNAPSHOT due to Missing:
> ...
> The error message was of course correct, since the PARENT project wasn't properly installed
in my local repo, and I will now attempt to fix that, but Maven 3 should not have swallowed
this stacktrace, because it was totally unclear why transitive dependencies were not resolved
(while Project A itself ended up on the classpath of Project B)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message