Class DefaultScanner.ScannerFileComparator

  • All Implemented Interfaces:
    java.util.Comparator<java.io.File>
    Enclosing class:
    DefaultScanner

    private static class DefaultScanner.ScannerFileComparator
    extends java.lang.Object
    implements java.util.Comparator<java.io.File>
    A special comparator to overcome some very bad limitations of nexus-indexer during scanning: using this comparator, we force to "discover" POMs last, before the actual artifact file. The reason for this, is to guarantee that scanner will provide only "best" informations 1st about same artifact, since the POM->artifact direction of discovery is not trivial at all (pom read -> packaging -> extension -> artifact file). The artifact -> POM direction is trivial.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.io.File o1, java.io.File o2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • ScannerFileComparator

        private ScannerFileComparator()
    • Method Detail

      • compare

        public int compare​(java.io.File o1,
                           java.io.File o2)
        Specified by:
        compare in interface java.util.Comparator<java.io.File>