本文整理匯總了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;
}