mirror of https://github.com/apache/maven.git
[MNG-7968] Expose Maven Version as Version (not String) (#1346)
Change existing API to expose Version instead of String. --- https://issues.apache.org/jira/browse/MNG-7968
This commit is contained in:
parent
ab09661c64
commit
84a48a8bf2
|
@ -77,7 +77,7 @@ public interface Session {
|
|||
* @return the maven version, never {@code null}
|
||||
*/
|
||||
@Nonnull
|
||||
String getMavenVersion();
|
||||
Version getMavenVersion();
|
||||
|
||||
int getDegreeOfConcurrency();
|
||||
|
||||
|
|
|
@ -29,13 +29,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import java.util.function.Supplier;
|
||||
|
||||
import org.apache.maven.RepositoryUtils;
|
||||
import org.apache.maven.api.DependencyCoordinate;
|
||||
import org.apache.maven.api.LocalRepository;
|
||||
import org.apache.maven.api.Project;
|
||||
import org.apache.maven.api.RemoteRepository;
|
||||
import org.apache.maven.api.Service;
|
||||
import org.apache.maven.api.Session;
|
||||
import org.apache.maven.api.SessionData;
|
||||
import org.apache.maven.api.*;
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
import org.apache.maven.api.annotations.Nullable;
|
||||
import org.apache.maven.api.services.MavenException;
|
||||
|
@ -124,8 +118,8 @@ public class DefaultSession extends AbstractSession {
|
|||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getMavenVersion() {
|
||||
return runtimeInformation.getMavenVersion();
|
||||
public Version getMavenVersion() {
|
||||
return parseVersion(runtimeInformation.getMavenVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue