Class ExclusionsFilter

java.lang.Object
org.apache.maven.shared.artifact.filter.resolve.ExclusionsFilter
All Implemented Interfaces:
TransformableFilter

public class ExclusionsFilter extends Object implements TransformableFilter
A simple filter to exclude artifacts based on either artifact id or group id and artifact id.
Since:
3.0
Author:
Robert Scholte
See Also:
  • ExclusionsDependencyFilter
  • Constructor Details

    • ExclusionsFilter

      public ExclusionsFilter(Collection<String> excludes)
      The default constructor specifying a collection of keys which must be excluded.
      Parameters:
      excludes - the keys to exclude, may not be null
      See Also:
      • Artifact.getDependencyConflictId()
  • Method Details

    • getExcludes

      public final Collection<String> getExcludes()

      Getter for the field excludes.

      Returns:
      The list of excludes.
    • transform

      public <T> T transform(FilterTransformer<T> transformer)
      Subclasses should include the following code:
         @Override
         public abstract <T> T transform( FilterTransformer<T> transformer )
         {
             return transformer.transform( this );
         }
       
      Transform this filter to a tool specific implementation
      Specified by:
      transform in interface TransformableFilter
      Type Parameters:
      T - the interface of the tool specific filter
      Parameters:
      transformer - the tool specific transformer, may not be null
      Returns:
      the transformed value, never null