public ModelSource resolveModel()

in src/main/java/org/apache/maven/resolver/internal/ant/AntModelResolver.java [127:147]


    public ModelSource resolveModel(final String groupId, final String artifactId, final String version)
            throws UnresolvableModelException {
        Artifact pomArtifact = new DefaultArtifact(groupId, artifactId, "", "pom", version);

        try {
            final ArtifactRequest request = new ArtifactRequest(pomArtifact, repositories, context);
            pomArtifact = repoSys.resolveArtifact(session, request).getArtifact();
        } catch (final ArtifactResolutionException e) {
            throw new UnresolvableModelException(
                    "Failed to resolve POM for " + groupId + ":" + artifactId + ":" + version + " due to "
                            + e.getMessage(),
                    groupId,
                    artifactId,
                    version,
                    e);
        }

        final File pomFile = pomArtifact.getFile();

        return new FileModelSource(pomFile);
    }