[ https://jira.codehaus.org/browse/MNG-5526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=334177#comment-334177 ]
Nico De Groote commented on MNG-5526: ------------------------------------- When I add the <repositories> <repository> <id>public-repo</id> <name>Public Repository</name> <url>http://mvn-repo.kamodata.be/nexus/content/groups/public</url> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> </repository> </repositories> to my artifact pom it does resolve, but this should be inherited from settings.xml file where i did define the Nexus mirrorOf *. We do not want to define the repositories over and over again just because we want to use the RELEASE version value. > parent with 'RELEASE' version not resolved when only maven-metadata-local.xml > (with a SNAPSHOT pom) file available in the local nexus repo > ------------------------------------------------------------------------------------------------------------------------------------------ > > Key: MNG-5526 > URL: https://jira.codehaus.org/browse/MNG-5526 > Project: Maven 2 & 3 > Issue Type: Bug > Components: Dependencies > Affects Versions: 3.0.3, 3.0.4, 3.0.5 > Reporter: Nico De Groote > Priority: Critical > Attachments: artifact_pom.xml, parent-pom.xml > > > We have a parent pom project containing all infrastructure + plugin version > to be used by all our projects. > We always point to the RELEASE of this parent pom for our projects. However > when there is only a maven-metadata-local.xml in our local nexus repo, we get > the following error. > Non-resolvable parent POM: Failed to resolve version for > be.company:parent:pom:RELEASE and 'parent.relativePath' points at wrong local > POM @ line 3, column 11 -> [Help 2] > org.apache.maven.model.resolution.UnresolvableModelException: Failed to > resolve version for be.company:parent:pom:RELEASE > at > org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:159) > at > org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:819) > at > org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:670) > at > org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:308) > at > org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232) > at > org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:386) > at > org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:355) > at > org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:319) > at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:632) > at > org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:581) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:233) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) > at > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) > Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failed > to resolve version for be.company:parent:pom:RELEASE > at > org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541) > at > org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220) > at > org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197) > at > org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:323) > at > org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:155) > ... 22 more > Caused by: org.sonatype.aether.resolution.VersionResolutionException: Failed > to resolve version for be.company:parent:pom:RELEASE > at > org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:273) > at > org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:276) > ... 26 more > When we remove this meta-data-local.xml file, all works fine again. It also > works fine if there are already som maven-metadata-nexus.xml files available > I could reproduce this by using the following pom projects (see attachments), > and following these steps: > 1) deploy a version 1.0.0 for the parent pom to your repo; > 2) remove the deployed parent from your local repo (suppose someone else did > the deploy to the remote repository) > 3) install/deploy a version 1.0.1-SNAPSHOT to your repo; > 4) now try to install/deploy the artifact project, pointing to the RELEASE > version of the parent pom.... you will get the given error -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira