Class ScopeFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String excludeScope  
      private java.lang.String includeScope  
    • Constructor Summary

      Constructors 
      Constructor Description
      ScopeFilter​(java.lang.String includeScope, java.lang.String excludeScope)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.Set<org.apache.maven.artifact.Artifact> excludeSingleScope​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts, java.lang.String scope)  
      java.util.Set<org.apache.maven.artifact.Artifact> filter​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
      This function determines if filtering needs to be performed.
      java.lang.String getExcludeScope()  
      java.lang.String getIncludeScope()  
      private java.util.Set<org.apache.maven.artifact.Artifact> includeSingleScope​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts, java.lang.String scope)  
      void setExcludeScope​(java.lang.String scope)  
      void setIncludeScope​(java.lang.String scope)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • includeScope

        private java.lang.String includeScope
      • excludeScope

        private java.lang.String excludeScope
    • Constructor Detail

      • ScopeFilter

        public ScopeFilter​(java.lang.String includeScope,
                           java.lang.String excludeScope)
        Parameters:
        includeScope - the scope to be included.
        excludeScope - the scope to be excluded.
    • Method Detail

      • filter

        public java.util.Set<org.apache.maven.artifact.Artifact> filter​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
                                                                 throws ArtifactFilterException
        This function determines if filtering needs to be performed. Excludes are ignored if Includes are used.
        Parameters:
        artifacts - the set of artifacts to filter.
        Returns:
        a Set of filtered artifacts.
        Throws:
        ArtifactFilterException - when there's an invalid included scope
      • includeSingleScope

        private java.util.Set<org.apache.maven.artifact.Artifact> includeSingleScope​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts,
                                                                                     java.lang.String scope)
      • excludeSingleScope

        private java.util.Set<org.apache.maven.artifact.Artifact> excludeSingleScope​(java.util.Set<org.apache.maven.artifact.Artifact> artifacts,
                                                                                     java.lang.String scope)
      • getIncludeScope

        public java.lang.String getIncludeScope()
        Returns:
        Returns the includeScope.
      • setIncludeScope

        public void setIncludeScope​(java.lang.String scope)
        Parameters:
        scope - The includeScope to set.
      • getExcludeScope

        public java.lang.String getExcludeScope()
        Returns:
        Returns the excludeScope.
      • setExcludeScope

        public void setExcludeScope​(java.lang.String scope)
        Parameters:
        scope - The excludeScope to set.