2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.odlparent;
11 import java.util.List;
13 import org.eclipse.aether.graph.DependencyFilter;
14 import org.eclipse.aether.graph.DependencyNode;
16 public class KarafFeaturesDependencyFilter implements DependencyFilter {
19 * Accepts only Karaf features.
21 * @param node The dependency node.
22 * @param parents The parents (ignored).
23 * @return {@code true} if the dependency is a Karaf feature, {@code false} otherwise.
26 public boolean accept(DependencyNode node, List<DependencyNode> parents) {
28 && node.getArtifact() != null
29 && node.getDependency() != null
30 && node.getDependency().getScope() != null
31 && node.getArtifact().getClassifier().equals("features")
32 && node.getArtifact().getExtension().equals("xml");