Coverage Report - org.kuali.maven.plugins.ArtifactComparator
 
Classes in this File Line Coverage Branch Coverage Complexity
ArtifactComparator
0%
0/6
N/A
4
 
 1  
 package org.kuali.maven.plugins;
 2  
 
 3  
 import java.io.IOException;
 4  
 import java.util.Comparator;
 5  
 
 6  
 import org.apache.maven.artifact.Artifact;
 7  
 
 8  0
 public class ArtifactComparator implements Comparator<Artifact> {
 9  
 
 10  
     @Override
 11  
     public int compare(Artifact one, Artifact two) {
 12  
         try {
 13  0
             String path1 = one.getFile().getCanonicalPath();
 14  0
             String path2 = two.getFile().getCanonicalPath();
 15  0
             return path1.compareTo(path2);
 16  0
         } catch (IOException e) {
 17  0
             throw new RuntimeException("Unable to resolve canonical path", e);
 18  
         }
 19  
     }
 20  
 
 21  
 }