[ http://jira.codehaus.org/browse/MNG-5006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=256772#action_256772 ]
Sei Syvalta commented on MNG-5006: ---------------------------------- Adding my post to the user list here too: I'm running into this too. I tried to create a test project but unfortunately the problem didn't reproduce there. Some background: - dependency to artifact with version range [1.0.1, 2.0), matching versions [1.0.1, 1.0.2, 1.0.3-SNAPSHOT]. - problems occurs when 1.0.3-SNAPSHOT tries to load it's _released_ parent pom. - if parent of 1.0.3-SNAPSHOT is changed to a snapshot the build succeeds. Some observations: - when SNAPSHOT is resolved from local repository it's list of repositories is empty. Also when it's parent is resolved it's list of repositories is empty. - org.apache.maven.model.building.DefaultModelBuilder.readParentExternally fails because of that (no repositories) - parent is not found from local repository because the key in repo tracking properties is "test-parent-pom-1.0.1.pom>releases" but is searched with key "test-parent-pom-1.0.1.pom>". Stack trace from one point of execution: org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(org.sonatype.aether.RepositorySystemSession, java.util.Collection<? extends org.sonatype.aether.resolution.ArtifactRequest>) line: 237 org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.resolution.ArtifactRequest) line: 214 org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(java.lang.String, java.lang.String, java.lang.String) line: 115 org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(org.apache.maven.model.Model, org.apache.maven.model.building.ModelBuildingRequest, org.apache.maven.model.building.DefaultModelProblemCollector) line: 819 org.apache.maven.model.building.DefaultModelBuilder.readParent(org.apache.maven.model.Model, org.apache.maven.model.building.ModelBuildingRequest, org.apache.maven.model.building.DefaultModelProblemCollector) line: 670 org.apache.maven.model.building.DefaultModelBuilder.build(org.apache.maven.model.building.ModelBuildingRequest, java.util.Collection<java.lang.String>) line: 308 org.apache.maven.model.building.DefaultModelBuilder.build(org.apache.maven.model.building.ModelBuildingRequest) line: 232 org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.resolution.ArtifactDescriptorRequest, org.sonatype.aether.resolution.ArtifactDescriptorResult) line: 308 org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.resolution.ArtifactDescriptorRequest) line: 173 org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.collection.CollectResult, java.util.LinkedList<org.sonatype.aether.impl.internal.GraphEdge>, java.util.List<org.sonatype.aether.graph.Dependency>, java.util.List<org.sonatype.aether.repository.RemoteRepository>, org.sonatype.aether.collection.DependencySelector, org.sonatype.aether.collection.DependencyManager, org.sonatype.aether.collection.DependencyTraverser, org.sonatype.aether.impl.internal.DataPool) line: 419 org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.collection.CollectRequest) line: 233 > M3 attempts to get released parent pom from snapshot repository when a > dependency has range > ------------------------------------------------------------------------------------------- > > Key: MNG-5006 > URL: http://jira.codehaus.org/browse/MNG-5006 > Project: Maven 2 & 3 > Issue Type: Bug > Affects Versions: 3.0.2 > Environment: WinXP SP3, Java 6u20 > Reporter: Kristoffer Peterhansel > Attachments: mvn-verify-fixed-version.log, mvn-verify-offline.log, > mvn-verify-range-version.log > > > I have a bit of a strange issue. When running under Maven 3.0.2 I am getting > build errors when I try to build one of our projects when one of their > dependencies have a range version. But when setting it to a specific version > it seems to work. The same project works without a hitch in Maven 2.2.1. > As can be seen from the first included verbose trace > (mvn-verify-range-version.log). Maven attempts to get the pom from our > snapshot repository. That will, obviously, not work for a released artefact. > Changing the dependency version from the [1,2) range to 1.0.1-SNAPSHOT seems > to skip that step completely. Even though it resolves to the same version in > the end. As seen in the other verbose trace (mvn-verify-fixed-version.log) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira