Class GroupTree

java.lang.Object
org.eclipse.aether.internal.impl.filter.ruletree.GroupTree

public class GroupTree extends Object
Group tree for Maven groupIDs. This class parses a text file that has a directive on each line. Directive examples:
  • ignored/formatting - each line starting with '#' (hash) or being empty/blank is ignored.
  • modifier ! is negation (disallow; by def entry allows). If present must be first character.
  • modifier = is limiter (to given G; by def is "G and below"). If present, must be first character. If negation present, must be second character.
  • a valid Maven groupID ie "org.apache.maven".
By default, a G entry ie org.apache.maven means "allow org.apache.maven G and all Gs below (so org.apache.maven.plugins etc. are all allowed). Examples:

# this is my group filter list

org.apache.maven
!=org.apache.maven.foo
!org.apache.maven.indexer
=org.apache.bar

File meaning: "allow all org.apache.maven and below", "disallow org.apache.maven.foo groupId ONLY" (hence org.apache.maven.foo.bar is allowed due first line), "disallow org.apache.maven.indexer and below" and "allow org.apache.bar groupID ONLY".

In case of conflicting rules, parsing happens by "first wins", so line closer to first line in file "wins", and conflicting line is ignored.

  • Field Details

  • Constructor Details

  • Method Details

    • loadNodes

      public int loadNodes(Stream<String> linesStream)
    • loadNode

      public boolean loadNode(String line)
    • acceptedGroupId

      public boolean acceptedGroupId(String groupId)
    • getName

      public String getName()
    • isLeaf

      public boolean isLeaf()
    • isStop

      public boolean isStop()
    • isAllow

      public Boolean isAllow()
    • addSibling

      protected org.eclipse.aether.internal.impl.filter.ruletree.Node addSibling(String name, boolean stop, Boolean allow)
    • getSibling

      protected org.eclipse.aether.internal.impl.filter.ruletree.Node getSibling(String name)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • dump

      public void dump(String prefix)