Class LibDuplicateCleaner

java.lang.Object
com.jalios.jcms.tools.LibDuplicateCleaner

public class LibDuplicateCleaner extends Object
Detects duplicate jars (multiple versions of the same artifact) in a WEB-INF/lib directory and offers to delete the older versions. No external dependency: compiles and runs with the JDK alone. This class is meant to live at WEB-INF/classes/com/jalios/jcms/tools/LibDuplicateCleaner.class, so by default it locates WEB-INF/lib relative to its own compiled location (the sibling "lib" folder of the classes root) instead of relying on the current working directory. This makes it safe to run directly from Eclipse ("Run As > Java Application"), whatever the run configuration's working directory is. Usage: java com.jalios.jcms.tools.LibDuplicateCleaner [path_to_lib] [--yes] [--dry-run] path_to_lib : optional override; defaults to WEB-INF/lib next to this class's classes root --yes / -y : automatically delete older versions without asking --dry-run : simulate deletions without removing anything
  • Constructor Details

    • LibDuplicateCleaner

      public LibDuplicateCleaner()
  • Method Details

    • main

      public static void main(String[] args)