}
}
if ( !includes.isEmpty() )
{
final ArtifactFilter includeFilter = new PatternIncludesArtifactFilter( includes, actTransitively );
filter.add( includeFilter );
allFilters.add( includeFilter );
}
if ( !excludes.isEmpty() )
{
final ArtifactFilter excludeFilter = new PatternExcludesArtifactFilter( excludes, actTransitively );
filter.add( excludeFilter );
allFilters.add( excludeFilter );
}
// FIXME: Why is this added twice??
// if ( additionalFilters != null && !additionalFilters.isEmpty() )
// {
// allFilters.addAll( additionalFilters );
// }
for ( final Iterator<Artifact> it = artifacts.iterator(); it.hasNext(); )
{
final Artifact artifact = it.next();
if ( !filter.include( artifact ) )
{
it.remove();
if ( logger.isDebugEnabled() )
{
logger.debug( artifact.getId() + " was removed by one or more filters." );
}
}
}
reportFilteringStatistics( allFilters, logger );
for ( final Iterator<ArtifactFilter> it = allFilters.iterator(); it.hasNext(); )
{
final ArtifactFilter f = it.next();
if ( f instanceof StatisticsReportingArtifactFilter )
{
final StatisticsReportingArtifactFilter sFilter = (StatisticsReportingArtifactFilter) f;