private List getPatchArtifacts()

in tomee-patch-plugin/src/main/java/org/apache/tomee/patch/plugin/PatchMojo.java [453:471]


    private List<Artifact> getPatchArtifacts() {
        final Predicate<String> match = Pattern.compile(select).asPredicate();
        final Artifact[] available = getSourceArtifacts();

        final List<Artifact> selected = Stream.of(available)
                .filter(artifact -> match.test(artifact.getFile().getName()))
                .collect(Collectors.toList());

        if (selected.size() == 0) {
            final String message = String.format("No artifacts matched expression '%s'.  %s available artifacts:", select, available.length);
            getLog().error(message);
            Arrays.stream(available)
                    .map(artifact -> artifact.getFile().getName())
                    .forEach(s -> getLog().error(" - " + s));

            throw new NoMatchingArtifactsException(select);
        }
        return selected;
    }