ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <>
Subject Re: Newbie questions
Date Sat, 17 Mar 2007 09:58:22 GMT
Ok, I better see what your environment, and the main problem I see is that
module metadata is not always in its own file. So I see several solutions:
- write a simple program which loads all your metadata files, and generates
one file per module (either generate an ivy file, or still your own format).
Then if you used your own format, you will have to write your own module
desciptor parser, but this shouldn't be too difficult.
- write your own module descriptor parser, dealing with your special case of
several module metadata in one file (which means that the same file will be
parsed several times, one for each module). Then configure your resolver to
look at the module specific location first for metadata, then to  the upper
- write your own resolver, looking for metadata at the appropriate
locations, and parsing your files on the fly. This is the most flexible but
also the most complex solution

For developer specific documentation, we are still in need to write it, so
any contribution is welcome :-) However, there are numerous API changes in
the upcoming version, so I think we'll start this kind of doc on the new API
and package structure.


- Xavier

On 3/16/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
> >
> >

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