本文整理汇总了Java中org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter类的典型用法代码示例。如果您正苦于以下问题:Java StrictPatternIncludesArtifactFilter类的具体用法?Java StrictPatternIncludesArtifactFilter怎么用?Java StrictPatternIncludesArtifactFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StrictPatternIncludesArtifactFilter类属于org.apache.maven.shared.artifact.filter包,在下文中一共展示了StrictPatternIncludesArtifactFilter类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createArtifactFilter
import org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter; //导入依赖的package包/类
private ArtifactFilter createArtifactFilter() {
List<ArtifactFilter> filters = new ArrayList<>(3);
if (this.scope != null) {
filters.add(new ScopeArtifactFilter(this.scope));
}
if (!this.includes.isEmpty()) {
filters.add(new StrictPatternIncludesArtifactFilter(this.includes));
}
if (!this.excludes.isEmpty()) {
filters.add(new StrictPatternExcludesArtifactFilter(this.excludes));
}
return new AndArtifactFilter(filters);
}
示例2: createGlobalArtifactFilter
import org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter; //导入依赖的package包/类
private ArtifactFilter createGlobalArtifactFilter() {
AndArtifactFilter filter = new AndArtifactFilter();
if (this.scope != null) {
filter.add(new ScopeArtifactFilter(this.scope));
}
if (!this.includes.isEmpty()) {
filter.add(new StrictPatternIncludesArtifactFilter(this.includes));
}
if (!this.excludes.isEmpty()) {
filter.add(new StrictPatternExcludesArtifactFilter(this.excludes));
}
return filter;
}
示例3: filterArtifacts
import org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter; //导入依赖的package包/类
private Set<Artifact> filterArtifacts( Set<Artifact> dependencies )
{
if ( includes == null && excludes == null && ignoredScopes == null )
{
return dependencies;
}
AndArtifactFilter filter = new AndArtifactFilter();
if ( includes != null )
{
filter.add( new StrictPatternIncludesArtifactFilter( includes ) );
}
if ( excludes != null )
{
filter.add( new StrictPatternExcludesArtifactFilter( excludes ) );
}
Set<Artifact> result = new HashSet<Artifact>();
for ( Artifact artifact : dependencies )
{
if ( ignoredScopes != null && Arrays.asList( ignoredScopes ).contains( artifact.getScope() ) )
{
continue;
}
if ( filter.include( artifact ) )
{
result.add( artifact );
}
}
return result;
}
示例4: createTransitiveDependencyFilter
import org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter; //导入依赖的package包/类
private ArtifactFilter createTransitiveDependencyFilter(MavenProject project) {
List<String> dependencyKeys = new ArrayList<>(project.getDependencies().size());
for (Dependency dependency : project.getDependencies()) {
dependencyKeys.add(dependency.getManagementKey());
}
// Matches direct dependencies or the configured transitive dependencies or the project itself
OrArtifactFilter artifactFilter = new OrArtifactFilter();
artifactFilter.add(this.transitiveIncludeExcludeFilter);
artifactFilter.add(new StrictPatternIncludesArtifactFilter(dependencyKeys));
artifactFilter.add(new StrictPatternIncludesArtifactFilter(singletonList(project.getArtifact().toString())));
return artifactFilter;
}
示例5: createTransitiveIncludeExcludeFilter
import org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter; //导入依赖的package包/类
private ArtifactFilter createTransitiveIncludeExcludeFilter() {
AndArtifactFilter filter = new AndArtifactFilter();
if (!this.transitiveIncludes.isEmpty()) {
filter.add(new StrictPatternIncludesArtifactFilter(this.transitiveIncludes));
}
if (!this.transitiveExcludes.isEmpty()) {
filter.add(new StrictPatternExcludesArtifactFilter(this.transitiveExcludes));
}
return filter;
}
示例6: createTargetArtifactFilter
import org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter; //导入依赖的package包/类
private ArtifactFilter createTargetArtifactFilter() {
AndArtifactFilter filter = new AndArtifactFilter();
if (!this.targetIncludes.isEmpty()) {
filter.add(new StrictPatternIncludesArtifactFilter(this.targetIncludes));
}
return filter;
}