Search in sources :

Example 1 with PathFilter

use of io.quarkus.paths.PathFilter in project quarkus by quarkusio.

the class LocalProject method processJarPluginExecutionConfig.

private DefaultArtifactSources processJarPluginExecutionConfig(Object config, boolean test) {
    if (config == null || !(config instanceof Xpp3Dom)) {
        return null;
    }
    Xpp3Dom dom = (Xpp3Dom) config;
    final List<String> includes = collectChildValues(dom.getChild("includes"));
    final List<String> excludes = collectChildValues(dom.getChild("excludes"));
    final PathFilter filter = includes == null && excludes == null ? null : new PathFilter(includes, excludes);
    final String classifier = getClassifier(dom, test);
    final Collection<SourceDir> sources = Collections.singletonList(new DefaultSourceDir(new DirectoryPathTree(test ? getTestSourcesSourcesDir() : getSourcesSourcesDir()), new DirectoryPathTree(test ? getTestClassesDir() : getClassesDir(), filter), Collections.emptyMap()));
    final Collection<SourceDir> resources = test ? collectTestResources(filter) : collectMainResources(filter);
    return new DefaultArtifactSources(classifier, sources, resources);
}
Also used : DefaultArtifactSources(io.quarkus.bootstrap.workspace.DefaultArtifactSources) Xpp3Dom(org.codehaus.plexus.util.xml.Xpp3Dom) PathFilter(io.quarkus.paths.PathFilter) DefaultSourceDir(io.quarkus.bootstrap.workspace.DefaultSourceDir) SourceDir(io.quarkus.bootstrap.workspace.SourceDir) DirectoryPathTree(io.quarkus.paths.DirectoryPathTree) DefaultSourceDir(io.quarkus.bootstrap.workspace.DefaultSourceDir)

Aggregations

DefaultArtifactSources (io.quarkus.bootstrap.workspace.DefaultArtifactSources)1 DefaultSourceDir (io.quarkus.bootstrap.workspace.DefaultSourceDir)1 SourceDir (io.quarkus.bootstrap.workspace.SourceDir)1 DirectoryPathTree (io.quarkus.paths.DirectoryPathTree)1 PathFilter (io.quarkus.paths.PathFilter)1 Xpp3Dom (org.codehaus.plexus.util.xml.Xpp3Dom)1