mirror of https://github.com/apache/maven.git
[MNG-7971] Add Artifact#getBaseVersion (#1345)
This commit is contained in:
parent
3c65873b58
commit
eec44b4ace
|
@ -73,6 +73,14 @@ public interface Artifact {
|
||||||
@Nonnull
|
@Nonnull
|
||||||
Version getVersion();
|
Version getVersion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base version of the artifact.
|
||||||
|
*
|
||||||
|
* @return the version
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
Version getBaseVersion();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The classifier of the artifact.
|
* The classifier of the artifact.
|
||||||
*
|
*
|
||||||
|
|
|
@ -75,6 +75,11 @@ public class DefaultArtifact implements Artifact {
|
||||||
return session.parseVersion(artifact.getVersion());
|
return session.parseVersion(artifact.getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Version getBaseVersion() {
|
||||||
|
return session.parseVersion(artifact.getBaseVersion());
|
||||||
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public String getExtension() {
|
public String getExtension() {
|
||||||
|
|
|
@ -86,6 +86,11 @@ public class DefaultDependency implements Dependency {
|
||||||
return session.parseVersion(dependency.getArtifact().getVersion());
|
return session.parseVersion(dependency.getArtifact().getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Version getBaseVersion() {
|
||||||
|
return session.parseVersion(dependency.getArtifact().getBaseVersion());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getExtension() {
|
public String getExtension() {
|
||||||
return dependency.getArtifact().getExtension();
|
return dependency.getArtifact().getExtension();
|
||||||
|
|
Loading…
Reference in New Issue