class OpearPackageMojo extends AbstractCommonMojo {

    List<File> getEmbeddedLibraries() {
        final Set<String> NOT_EMBEDDABLE = new HashSet<>(
                Arrays.asList(Artifact.SCOPE_IMPORT, Artifact.SCOPE_PROVIDED, Artifact.SCOPE_TEST));

        final Set<File> embeddable = resolveArtifacts(project.getDependencies().stream()
                .filter(composeTest1(Dependency::getScope, inSet(NOT_EMBEDDABLE).negate()))
                .collect(Collectors.toList()), true).stream()
                .filter(TEST_IS_OAKPAL_CORE.negate().and(TEST_IS_OAKPAL_API.negate()))
                .map(Artifact::getFile)
                .collect(Collectors.toCollection(LinkedHashSet::new));

        resolveArtifacts(project.getDependencies().stream()
                .filter(new DependencyFilter().withGroupId(OAKPAL_GROUP_ID).withArtifactId(OAKPAL_CORE_ARTIFACT_ID))
                .collect(Collectors.toList()), true).stream().map(Artifact::getFile).forEachOrdered(embeddable::remove);

        resolveArtifacts(project.getDependencies().stream()
                .filter(new DependencyFilter().withGroupId(OAKPAL_GROUP_ID).withArtifactId(OAKPAL_API_ARTIFACT_ID))
                .collect(Collectors.toList()), true).stream().map(Artifact::getFile).forEachOrdered(embeddable::remove);

        return new ArrayList<>(embeddable);
    }

}