View Javadoc

1   package com.atlassian.maven.plugins.licenses;
2   
3   import org.apache.maven.artifact.Artifact;
4   import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
5   
6   /**
7    * Simply matches a given scope to that of the artifacts scope.
8    * 
9    * @author Sherali Karimov
10   */
11  public class ArtifactScopeFilter implements ArtifactFilter
12  {
13      private final String scope;
14  
15      public ArtifactScopeFilter(String scopeStr)
16      {
17          this.scope = scopeStr;
18      }
19  
20      public boolean include(Artifact artifact)
21      {
22          return scope.equals(artifact.getScope());
23      }
24  }