當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。