www-repository mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <steve.lough...@gmail.com>
Subject Re: Tool to validate depdendencies
Date Fri, 25 May 2007 07:46:44 GMT
On 24/05/07, Gilles Scokart <GScokart@isabel.eu> wrote:

> Is there a tool that could identify unnecessary dependencies from a pom.xml
> or [better] an ivy.xml.
> More precisely, I want to identify the minimal set of jars I really need to
> compile my module, in order to clean the module descriptor.
> And if I manage to do that, I would go further.  I would like to have the
> set of jars that the users of my module will require to compile : my module
> + only the modules that I use in my interface (Class that I use as argument,
> that I extend or that I throws).

Compile time dependencies probably can be determined through static
analysis. Youd need a mapping of classname to artifact, and so go from
imported and inherited classes to artifacts used. Some of the java2rdf
and pom2rdf stuff could build up the graphs, but you'd need to write
your own code (sparql queries?) to come up with the answers.

determining run-time dependencies is a kind of halting problem class
of problem- you can't tell until you run, and even then it depends on
the exact configuration. For example hibernate chooses between
different caches at run time, some of which need commons-collections,
some of which dont. Depending on where you deploy a hibernate based
app, your dependencies change


View raw message