Skip to content

Commit

Permalink
Using BaseVersion instead of Version
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Mar 18, 2013
1 parent b0a2e79 commit 9099923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public MavenDependencyAdapter(final org.sonatype.aether.graph.Dependency dep)
this.setOptional(dep.isOptional());
this.setScope(dep.getScope());
this.setType(dep.getArtifact().getExtension());
this.setVersion(dep.getArtifact().getVersion());
this.setVersion(dep.getArtifact().getBaseVersion());
}

private void setExclusions(final Collection<org.sonatype.aether.graph.Exclusion> exclusions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public List<DependencyResource> resolveDependencies(Dependency dep, final List<D
{
File file = a.getArtifact().getFile();
Dependency d = DependencyBuilder.create().setArtifactId(a.getArtifact().getArtifactId())
.setGroupId(a.getArtifact().getGroupId()).setVersion(a.getArtifact().getVersion())
.setGroupId(a.getArtifact().getGroupId()).setVersion(a.getArtifact().getBaseVersion())
.setPackagingType(a.getArtifact().getExtension());
DependencyResource resource = new DependencyResource(factory, file, d);
result.add(resource);
Expand Down Expand Up @@ -275,7 +275,7 @@ public DependencyMetadata resolveDependencyMetadata(Dependency query, final List

Artifact a = results.getArtifact();
Dependency d = DependencyBuilder.create().setArtifactId(a.getArtifactId()).setGroupId(a.getGroupId())
.setVersion(a.getVersion());
.setVersion(a.getBaseVersion());

return new DependencyMetadataImpl(d, results);
}
Expand Down

0 comments on commit 9099923

Please sign in to comment.