ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Gill" <>
Subject Re: Newbie questions
Date Sat, 17 Mar 2007 13:23:32 GMT
I was faced with a similar problem, and what I did was write a program that
converted the legacy files into ivy files and then use a dual resolver.

To make it easy to read one XML file and write the other one. I got the xsd
for ivy.xml files, and wrote another for the legacy xml file that I wanted
to convert into ivy, and then used XMLBeans to create a library to read the
legacy files and write the ivy.xml files.

On 3/17/07, Crystal, Mayer <> wrote:
> Thanks for the responses. Regarding my first question, here is some more
> detail:
> We currently have our own set of modules which are defined in XML files
> which look something like:
> <module id=" yyy.zzz">
>     <depends id="111"/>
>     <depends id="222"/>
> ... (other ant stuff)
> </module>
> <module id="111">
>     <depends id="333"/>
> </module>
> <module id="222">
>         <export name="222.jar"/>
> </module>
> <module id="333">
>         <export name="333_1.jar" />
>         <export name="333_2.jar" />
> </module>
> Each one of these module definitions can be in different files.  We have
> a standard naming convention so I should be able to find it - for
> instance, the definition for module yyy.zzz will either be in a file
> yyy.zzz.xml or in a file yyy.xml.  So, I have the logic which can
> actually find the module based on the module's id.  Similarly, the jar
> created by the module will be places in a specific directory with a
> specific name (i.e. /lib/yyy.zzz.jar) and all of the dependent jars that
> are defined via the export command are in a specific location on my
> server so once I have the name and dependencies I can easily figure out
> how to download it.
> As you've pointed out, I think this is very similar to what the
> URLResolver is doing.  My only question is how do I override this to
> handle my specific setup.  One thought that I had was to create a class
> similar to the URLResolver which would look something like:
> public class MyResolver extends RepositoryResolver {
>     public MyResolver() {
>         setRepository(new MyRepository());
>     }
>     public String getTypeName() {
>         return "myrepository";
>     }
> }
> And then implement the MyRepository which could be a subclass of
> URLRepository which simply overloads the get and getResource methods.
> My only remaining questions are:  how do I deal with the dependency
> management (this doesn't seem to be part of the repository class)?  If I
> do have to implement my own resolvers are there any developer-centric
> documents that explain the overall architecture of the abstract classes
> and what the various classes are meant to do and how they interact with
> the system (i.e. DownloadReport, ArtifactDownloadReport,
> ResolvedModuleRevision, etc...) - what are the expected returns, how are
> error handled by the system?  I read the online documentation, but I
> didn't find any in-depth documents regarding these types of internals
> (so far I've been learning this by looking at the source).  If you have
> any pointers or suggestions on how better to solve this problem please
> feel free to let me know :)
> Thanks again,
> Mayer
> -----Original Message-----
> From: Xavier Hanin []
> Sent: Friday, March 16, 2007 12:29 PM
> To:
> Subject: Re: Newbie questions
> On 3/16/07, Crystal, Mayer < > wrote:
> >
> > I just started fiddling with Ivy and I have 2 questions that I hope
> > someone can help me with:
> >
> > 1.  We currently have our own build system which handles dependencies
> > that I would like to migrate to Ivy.  For the first cut (instead of
> > redoing everything from scratch) I would like to write some form of
> > resolver which can interact with our current system and determine
> > dependencies and download the jars for Ivy.  In essence, both the jars
> > as well as the module descriptions (including dependencies) are behind
> > this webserver in our format.  What would be the easiest way to
> > intercept Ivy's request for data and dependencies and use our resolver
> > to determine the underlying dependencies and to retrieve the actual
> > jars?  (I looked at URLResolver and IBiblioResolver which seem to do
> > something similar, but the inheritance hierarchy and all the different
> > classes were a bit much - I was hoping that someone could give me a
> > quick start for this process :))
> Could you give some more details on what you're trying to do. Depending
> on your needs, you may find a way to deal with them with only some
> configuration of an existing resolver (like the URL or VFS resolver,
> which can match a lot of environments), or overriding the URL resolver,
> or provide your own repository (see URLRepository for example of how to
> implement a Repository), or if your needs are really specific implement
> your own resolver, but it's rarely necessary.
> - Xavier
> 2.  Does Ivy have the ability (either built-in or contributed) to
> > package a project including all of its dependencies (both explicit and
> > transitive)?  For instance,  if I would like to create a tar file of
> > the entire application can I perform an Ant copy (with Ivy's help)
> > which can copy all of the jars into a lib directory?  If not, how
> > would one go about obtaining the necessary information in order to
> > perform this type of operation?
> >
> >
> >
> > Thanks,
> > Mayer
> >
> >

John Gill

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message