|
Suleiman
a Java duplicate
resource detector
current version: 0.1
Suleiman is a tool to detect duplicate resources -- including
.class files, .properties files, or other resources -- by analyzing
sets of source folders and/or jar and zip files.
Duplicate resources in a project are a common source of bugs, sometimes
hard-to-catch ones. If a web application happens to have several copies
of a .property file, for instance, each with different content, it is
very likely that the classloader will choose one of them at random each time the server is
started. This non-deterministic, erratic behaviour is hard to debug and
can consume lots of effort to track down.
This happens with ordinary .class files as well -- your compiler may be
pointing and using a class in one of your jars, but the application
server is looking at a different version in a different jar -- a
version you didn't even know existed.
So we started a project for a tool that could aid us in finding those
insidious duplicates, whether they're inside a jar or zip file or in an
expanded directory structure. The tool's features are as follows:
- Inspects a set of Sources and indexes all files within them.
- a Source is either a root directory for a Java package
structure, or an archive file (zip/jar)
- The tool can be fed a directory and automatically open
all jar/zips in that directory
- Consults the generated index and builds a report saying
which resources (if any) were found in multiple source folders.
- Formats the report in HTML format.
The tool is currently usable (as far as I know :) but is
certainly not complete. The project was created to share the tool with
other developers and, if it proves useful to other people, to gather
ideas and feature requests to make it even more useful.
copyleft 2005 -- errr, the Suleiman authors :)
|