当前位置: 首页>>代码示例>>Java>>正文


Java StrictPatternIncludesArtifactFilter类代码示例

本文整理汇总了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);
}
 
开发者ID:ferstl,项目名称:jitwatch-jarscan-maven-plugin,代码行数:18,代码来源:AbstractJarScanMojo.java

示例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;
}
 
开发者ID:ferstl,项目名称:depgraph-maven-plugin,代码行数:18,代码来源:AbstractGraphMojo.java

示例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;
}
 
开发者ID:mojohaus,项目名称:extra-enforcer-rules,代码行数:32,代码来源:EnforceBytecodeVersion.java

示例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;
}
 
开发者ID:ferstl,项目名称:depgraph-maven-plugin,代码行数:15,代码来源:MavenGraphAdapter.java

示例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;
}
 
开发者ID:ferstl,项目名称:depgraph-maven-plugin,代码行数:14,代码来源:AbstractGraphMojo.java

示例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;
}
 
开发者ID:ferstl,项目名称:depgraph-maven-plugin,代码行数:10,代码来源:AbstractGraphMojo.java


注:本文中的org.apache.maven.shared.artifact.filter.StrictPatternIncludesArtifactFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。