protected File resolveArtifact()

in src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleRequestMojo.java [249:261]


    protected File resolveArtifact(org.eclipse.aether.artifact.Artifact artifact) throws MojoExecutionException {
        ArtifactRequest req = new ArtifactRequest(
                artifact,
                getRemoteRepositoriesWithUpdatePolicy(repositories, RepositoryPolicy.UPDATE_POLICY_ALWAYS),
                null);
        ArtifactResult resolutionResult;
        try {
            resolutionResult = repoSystem.resolveArtifact(repoSession, req);
            return resolutionResult.getArtifact().getFile();
        } catch (ArtifactResolutionException e) {
            throw new MojoExecutionException("Artifact " + artifact + " could not be resolved.", e);
        }
    }