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


Java ArtifactsFilter类代码示例

本文整理汇总了Java中org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter的典型用法代码示例。如果您正苦于以下问题:Java ArtifactsFilter类的具体用法?Java ArtifactsFilter怎么用?Java ArtifactsFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ArtifactsFilter类属于org.apache.maven.shared.artifact.filter.collection包,在下文中一共展示了ArtifactsFilter类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: filterDependencies

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
@Override
protected Set<Artifact> filterDependencies(Set<Artifact> dependencies,
                                           FilterArtifacts filters) throws MojoExecutionException {
    try {
        Set<Artifact> filtered = new LinkedHashSet<Artifact>(dependencies);

        @SuppressWarnings("unchecked")
        Collection<ArtifactsFilter> filtersToUse = filters.getFilters();
        filtersToUse.addAll(getAdditionalFilters());

        filtered.retainAll(filters.filter(dependencies));
        return filtered;
    }
    catch (ArtifactFilterException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex);
    }
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:18,代码来源:SupportMojo.java

示例2: getMarkedArtifactFilter

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
protected ArtifactsFilter getMarkedArtifactFilter() {
	return new ArtifactsFilter() {
		
		@Override
		public boolean isArtifactIncluded(Artifact artifact) throws ArtifactFilterException {
			return true;
		}
		
		@Override
		@SuppressWarnings("rawtypes")
		public Set filter(Set artifacts) throws ArtifactFilterException {
			return artifacts;
		}
	};
}
 
开发者ID:OnPositive,项目名称:aml,代码行数:18,代码来源:Java2RamlMojo.java

示例3: getFilters

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
/**
 * Return artifact filters configured for this MOJO.
 * @param additionalFilters optional additional filters to apply
 * @return the filters
 */
protected final FilterArtifacts getFilters(ArtifactsFilter... additionalFilters) {
	FilterArtifacts filters = new FilterArtifacts();
	for (ArtifactsFilter additionalFilter : additionalFilters) {
		filters.addFilter(additionalFilter);
	}
	filters.addFilter(
			new ArtifactIdFilter("", cleanFilterConfig(this.excludeArtifactIds)));
	filters.addFilter(
			new MatchingGroupIdFilter(cleanFilterConfig(this.excludeGroupIds)));
	if (this.includes != null && !this.includes.isEmpty()) {
		filters.addFilter(new IncludeFilter(this.includes));
	}
	if (this.excludes != null && !this.excludes.isEmpty()) {
		filters.addFilter(new ExcludeFilter(this.excludes));
	}
	return filters;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:23,代码来源:AbstractDependencyFilterMojo.java

示例4: getAdditionalFilters

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
@Override
protected Collection<ArtifactsFilter> getAdditionalFilters() {
    Collection<MavenDependency> dependencies = new HashSet<>();

    if(StringUtils.isNotBlank(blackListedBoms)){
        addCustomBoms(dependencies);
    } else {
        addDefaultBOMs(dependencies);
    }

    if(StringUtils.isNotBlank(blackListedGAVs)){
        addCustomGAVs(dependencies);
    } else {
        addDefaultGAVs(dependencies);
    }

    if(getLog().isDebugEnabled()){
        getLog().debug("Filtering out dependencies from the following BOMs: " + bomsUsed);
        getLog().debug("Dependencies to be filtered out:");
        dependencies.stream().sorted(Comparator.comparing(MavenCoordinate::toCanonicalForm)).forEach(mavenDependency -> getLog().debug(mavenDependency.toCanonicalForm()));
    }
    List<ArtifactsFilter> filters = new ArrayList<>(dependencies.size());

    for(MavenCoordinate dep : dependencies){
        filters.add(newExcludeFilter(dep));
    }

    return filters;
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:30,代码来源:RepackageExtensionMojo.java

示例5: getAdditionalFilters

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
private ArtifactsFilter[] getAdditionalFilters() {
	List<ArtifactsFilter> filters = new ArrayList<ArtifactsFilter>();
	if (this.excludeDevtools) {
		Exclude exclude = new Exclude();
		exclude.setGroupId("org.springframework.boot");
		exclude.setArtifactId("spring-boot-devtools");
		ExcludeFilter filter = new ExcludeFilter(exclude);
		filters.add(filter);
	}
	if (!this.includeSystemScope) {
		filters.add(new ScopeFilter(null, Artifact.SCOPE_SYSTEM));
	}
	return filters.toArray(new ArtifactsFilter[filters.size()]);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:15,代码来源:RepackageMojo.java

示例6: getAdditionalFilters

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
@Override
protected Collection getAdditionalFilters() {
    Collection<MavenDependency> dependencies = new HashSet<>();

    if(StringUtils.isNotBlank(blackListedBoms)){
        addCustomBoms(dependencies);
    } else {
        addDefaultBOMs(dependencies);
    }

    if(StringUtils.isNotBlank(blackListedGAVs)){
        addCustomGAVs(dependencies);
    } else {
        addDefaultGAVs(dependencies);
    }

    if(getLog().isDebugEnabled()){
        getLog().debug("Filtering out dependencies from the following BOMs: " + bomsUsed);
        getLog().debug("Dependencies to be filtered out:");
        dependencies.stream().sorted(Comparator.comparing(MavenCoordinate::toCanonicalForm)).forEach(mavenDependency -> getLog().debug(mavenDependency.toCanonicalForm()));
    }
    List<ArtifactsFilter> filters = new ArrayList<>(dependencies.size());

    for(MavenCoordinate dep : dependencies){
        filters.add(newExcludeFilter(dep));
    }

    return filters;
}
 
开发者ID:syndesisio,项目名称:syndesis-rest,代码行数:30,代码来源:RepackageExtensionMojo.java

示例7: getAdditionalFilters

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
private ArtifactsFilter[] getAdditionalFilters() {
	if (this.excludeDevtools) {
		Exclude exclude = new Exclude();
		exclude.setGroupId("org.springframework.boot");
		exclude.setArtifactId("spring-boot-devtools");
		ExcludeFilter filter = new ExcludeFilter(exclude);
		return new ArtifactsFilter[] { filter };
	}
	return new ArtifactsFilter[] {};
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:11,代码来源:RepackageMojo.java

示例8: getMarkedArtifactFilter

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
@Override
protected ArtifactsFilter getMarkedArtifactFilter() {
    return new DestFileFilter( this.overWriteReleases, this.overWriteSnapshots, this.overWriteIfNewer,
                               this.useSubDirectoryPerArtifact, this.useSubDirectoryPerType,
                               this.useSubDirectoryPerScope, this.useRepositoryLayout, this.stripVersion,
                               this.outputDirectory );
}
 
开发者ID:Kadvin,项目名称:spring-component-framework,代码行数:8,代码来源:SpringComponentIndexDetails.java

示例9: getMarkedArtifactFilter

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
protected ArtifactsFilter getMarkedArtifactFilter() {
    return new ResolveFileFilter(new SourcesFileMarkerHandler(this.markersDirectory));
}
 
开发者ID:jboss-fuse,项目名称:hawt-app,代码行数:4,代码来源:BuildMojo.java

示例10: getMarkedArtifactFilter

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
protected ArtifactsFilter getMarkedArtifactFilter() {
    return new DestFileFilter(this.overWriteReleases, this.overWriteSnapshots, this.overWriteIfNewer, false, false, false, false, false, getDependenciesDirectory());
}
 
开发者ID:apache,项目名称:nifi-maven,代码行数:4,代码来源:NarMojo.java

示例11: getMarkedArtifactFilter

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
@Override
protected ArtifactsFilter getMarkedArtifactFilter()
{
   return null;
}
 
开发者ID:gaol,项目名称:dependency-check-maven-plugin,代码行数:6,代码来源:GeneratePomMojo.java

示例12: getMarkedArtifactFilter

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
@Override
protected ArtifactsFilter getMarkedArtifactFilter() {
  return new P2Filter(excludeP2);
}
 
开发者ID:andriusvelykis,项目名称:pde-target-maven-plugin,代码行数:5,代码来源:AddPomDependenciesMojo.java

示例13: getAdditionalFilters

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
/**
 * Defines the defualt set of artifacts to exclude from the repackaged module
 * @return
 */
protected Collection<ArtifactsFilter> getAdditionalFilters() {
    return new ArrayList<>();
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:8,代码来源:SupportMojo.java

示例14: getMarkedArtifactFilter

import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter; //导入依赖的package包/类
protected abstract ArtifactsFilter getMarkedArtifactFilter(); 
开发者ID:kefik,项目名称:Pogamut3,代码行数:2,代码来源:AbstractDependencyFilterMojo.java


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