public static Artifact getArtifact()

in src/main/java/org/apache/maven/plugins/war/util/WarUtils.java [37:51]


    public static Artifact getArtifact(MavenProject project, Dependency dependency) {
        for (Artifact artifact : project.getArtifacts()) {
            if (artifact.getGroupId().equals(dependency.getGroupId())
                    && artifact.getArtifactId().equals(dependency.getArtifactId())
                    && artifact.getType().equals(dependency.getType())) {
                if (artifact.getClassifier() == null && dependency.getClassifier() == null) {
                    return artifact;
                } else if (dependency.getClassifier() != null
                        && dependency.getClassifier().equals(artifact.getClassifier())) {
                    return artifact;
                }
            }
        }
        return null;
    }