Finding unused jars used in an eclipse project

前端 未结 5 746
情歌与酒
情歌与酒 2020-11-28 02:52

Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars?

5条回答
  •  盖世英雄少女心
    2020-11-28 03:36

    I found a very fast and interesting tool to archive this goal:

    http://tattletale.jboss.org/

    Just unzip the program and run:

    java -Xmx512m -jar tattletale.jar ~/myjavaproject/mydistribution output
    

    This will generate a very impressive report with different points (text from their site):

    • Identify dependencies between JAR files
    • Find missing classes from the classpath
    • Spot if a class/package is located in multiple JAR files
    • Spot if the same JAR file is located in multiple locations
    • With a list of what each JAR file requires and provides
    • Verify the SerialVersionUID of a class
    • Find similar JAR files that have different version numbers
    • Find JAR files without a version number
    • Find unused JAR archives
    • Identify sealed / signed JAR archives
    • Locate a class in a JAR file
    • Get the OSGi status of your project
    • Remove black listed API usage
    • And generate the same reports for your .WAR and .EAR archives

提交回复
热议问题