void (Artifact artifact, final Processor<? super PackagingElement<?>> processor, PackagingElementResolvingContext context) { processPackagingElements(artifact.getRootElement(), null, new PackagingElementProcessor<>() { @Override public boolean process(@NotNull PackagingElement<?> element, @NotNull PackagingElementPath path) { return processor.process(element); } @Override public boolean shouldProcessSubstitution(ComplexPackagingElement<?> element) { return !(element instanceof ArtifactPackagingElement); } }, context, true, artifact.getArtifactType()); }