ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garima Bathla <garima.bat...@gmail.com>
Subject Re: Retrieve the list of confs
Date Fri, 27 Mar 2009 22:36:35 GMT
OK , the only way I figured it out was by digging the ivy code - :-) . Since
Ivy can be used as standalone tool - having Ivy JavaDoc around will be handy
( just a suggestion).

For your pleasure the solution is below:

           Ivy ivy = Ivy.newInstance();

            URL ivySettinsURL = new URL("path/to/ivy/settings/file);   //
You can also use ivy.configure(File IvySettingsFile) method.
            ivy.configure(ivySettinsURL);
            ivy.pushContext();
            ResolvedModuleRevision rmd =
ivy.findModule(ModuleRevisionId.newInstance(
                    "orgName", "ModuleName", "Revision"));
            Configuration[] con = rmd.getDescriptor().getConfigurations();

            String[] confs2 = rmd.getDescriptor().getConfigurationsNames();

Regards,
Garima.


On Fri, Mar 27, 2009 at 1:10 PM, Garima Bathla <garima.bathla@gmail.com>wrote:

> My requirement is to programmaticlly retrieve the list of confs for a given
> module and revision.
>
> e.g. Given a Module name = [XXX] revision=[1.0.0] and ivysettings.xml
> already in place; what API I can use to retrieve the list of confs available
> for this module, in any of the repositories those are listed in
> ivysettings.xml.
>
> Also please note that I need a Java API; ( Also at this point I am using
> Apache Ivy standalone, not invoking Ivy via ant tasks).
>
> Thanks,
> Garima.
>
>

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