Example usage for org.apache.maven.artifact.resolver ArtifactNotFoundException ArtifactNotFoundException

List of usage examples for org.apache.maven.artifact.resolver ArtifactNotFoundException ArtifactNotFoundException

Introduction

In this page you can find the example usage for org.apache.maven.artifact.resolver ArtifactNotFoundException ArtifactNotFoundException.

Prototype

@SuppressWarnings("checkstyle:parameternumber")
    public ArtifactNotFoundException(String message, String groupId, String artifactId, String version, String type,
            String classifier, List<ArtifactRepository> remoteRepositories, String downloadUrl, List<String> path,
            Throwable cause) 

Source Link

Usage

From source file:npanday.executable.impl.NetPluginExecutableFactoryImpl.java

License:Apache License

public Artifact findArtifact(Set<Artifact> artifacts, String artifactId) throws ArtifactNotFoundException {
    List<String> ids = Lists.newArrayList();
    for (Artifact a : artifacts) {
        ids.add(a.getArtifactId());/*  ww  w. j  a v a 2  s. c o m*/

        if (a.getArtifactId().equalsIgnoreCase(artifactId)) {
            return a;
        }
    }

    throw new ArtifactNotFoundException(
            "NPANDAY-066-11: Could not find artifact " + artifactId + " among " + ids, "*", artifactId, "*",
            "*", null, null, null, null, null);
}