To find the dependencies for a legacy project - in other words, to create an 
ivy.xml from scratch, which seems to be part of what you need to do - we used a 
script around a tool called JarJar, hosted at Google Code. You give it a "main" 
jar and the complete classpath and it generates the dependencies in text format 
(ready to use with GraphViz). We then processed the output to generate an 
ivy.xml file compatible with our repository.

That final part is really project specific - it depends on how you map your 
jars to organizations, modules and artifacts. You can keep it simple and use a 
1-to-1 mapping for jars, but for third party jars files usually you have to 
deal with a 1-to-N mapping of modules to artifacts (jars).

The link for JarJar is http://code.google.com/p/jarjar/
This article explains the idea: http://sixlegs.com/blog/java/depfind.html

HTH,
  Nascif



-----Original Message-----
From: Brown, Carlton [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2008 9:58 PM
To: [email protected]
Subject: RE: Dependency generation

 > -----Original Message-----
> From: Jeff Wang [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 14, 2008 9:37 PM
> To: [email protected]
> Subject: Dependency generation
>
> I'm part of this messy project that's been around for about 10 years.
> We've got Ant, and have checked in all of our libraries in
> our SVN.  I just want to start with dependency generation
> first, but it seems like I need to setup a Maven 2
> repository?  Or am I just reading the tutorials wrong?

The missing link is that you need a repository.  It can be dirt simple
like a shared network directory, as long as it observes a consistent
layout scheme.  You don't have to use the Maven 2 scheme.  But it's
simple, most of the examples follow that scheme, and a number of useful
tools anticipate it in their defaults, like Archiva.  It's nothing but
organisation/module/revision/artifact.jar.

For your internal repository I suggest reserving the right to be very
creative with organisation to uniquely identify modules, don't just use
com/mycompany and stick everything under that.  You can look at
http://repo1.maven.org/maven2/ and see how different projects have
approached it.  Good luck.

-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on
the contents of this message is prohibited. In such
case please notify us and destroy and delete all
copies of this transmission.  Thank you.
====================================================

Reply via email to