private static Set<Artifact> getAllRecursive(DependencyNode node) {
        Set<Artifact> children = new LinkedHashSet<>();
        if (node.getChildren() != null) {
            for (DependencyNode dep : node.getChildren()) {
                children.add(dep.getArtifact());
                children.addAll(getAllRecursive(dep));
            }
        }
        return children;
    }
Enforces that all expected dependencies are present.
Fails by default for rules that do not match any dependencies.
Similar to the built-in 'bannedDependencies' rule in maven-enforcer-plugin.

@author bjorncs
vespa-enforcer-extensions/src/main/java/com/yahoo/vespa/maven/plugin/enforcer/EnforceDependencies.java