protected static boolean isCompatibleArtifactContainedInList()

in src/main/java/org/apache/sling/maven/enforcer/RequireProvidedDependenciesInRuntimeClasspath.java [332:346]


    protected static boolean isCompatibleArtifactContainedInList(Artifact artifact,
            List<Artifact> artifacts, EnforcerLogger log) throws InvalidVersionSpecificationException {
        for (Artifact artifactInList : artifacts) {
            if (areArtifactsEqualDisregardingVersion(artifact, artifactInList)) {
                // check version compatibility
                if (isVersionCompatible(artifact.getVersion(), artifactInList.getVersion())) {
                    return true;
                } else {
                    MessageBuilder msgBuilder = MessageUtils.buffer();
                    log.warnOrError("Found provided dependency " + msgBuilder.strong(artifact).a(" only with potentially incompatible version ").strong(artifactInList.getVersion()).toString() + " in runtime classpath");
                }
            }
        }
        return false;
    }