private static void removeArtifact()

in src/main/java/org/apache/sling/maven/slingstart/ModelPreprocessor.java [396:412]


    private static void removeArtifact(Feature feature, ArtifactGroup group, org.apache.sling.provisioning.model.Artifact toRemove, ResolverOptions resolverOptions) {
        Iterator<org.apache.sling.provisioning.model.Artifact> it = group.iterator();
        while (it.hasNext()) {
            org.apache.sling.provisioning.model.Artifact el = it.next();

            String version = ModelResolveUtility.replace(feature, el.getVersion(), resolverOptions.getVariableResolver());
            org.apache.sling.provisioning.model.Artifact resolved;
            if (el.getVersion().equals(version)) {
                resolved = el;
            } else {
                resolved = new org.apache.sling.provisioning.model.Artifact(el.getGroupId(), el.getArtifactId(), version, el.getClassifier(), el.getType());
            }
            if (resolved.equals(toRemove)) {
                it.remove();
            }
        }
    }