Return-Path: Delivered-To: apmail-ant-ivy-user-archive@www.apache.org Received: (qmail 53050 invoked from network); 27 Mar 2009 22:37:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Mar 2009 22:37:08 -0000 Received: (qmail 8995 invoked by uid 500); 27 Mar 2009 22:37:07 -0000 Delivered-To: apmail-ant-ivy-user-archive@ant.apache.org Received: (qmail 8954 invoked by uid 500); 27 Mar 2009 22:37:07 -0000 Mailing-List: contact ivy-user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@ant.apache.org Delivered-To: mailing list ivy-user@ant.apache.org Received: (qmail 8944 invoked by uid 99); 27 Mar 2009 22:37:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2009 22:37:07 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garima.bathla@gmail.com designates 209.85.200.173 as permitted sender) Received: from [209.85.200.173] (HELO wf-out-1314.google.com) (209.85.200.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2009 22:36:57 +0000 Received: by wf-out-1314.google.com with SMTP id 28so1531627wfc.10 for ; Fri, 27 Mar 2009 15:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=2xZ+jJBq64z81IuKckwG4eO8KoBpdgynM7hcniGhPqo=; b=lQgKvtpvMHBLgXk2D41EcehB+eKs27MOTfafx1H6akYUcxOHONLkqTwizF+ln7fwPZ wfp6hKyx/45XYxGaOjQHdSPutV0QGv0SSk416XX6bdTs4wq3tu/dNpIUJhHOO8LC3Rv3 ctGSNWipluxOm/VwFR3NID8H+Rl75YpxUo/v4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=rafIxcxjFhfK1q4TOSrRlrIjOb2kiiXdRG1FuyvUY87JdXhAMjLLX5UfHQK+ja9peF WGd1vyMdXFYw+1Y/+uZIh/LkfpsJteMoEuJmw2Wo+PrB5Fb4g1FVs20yn9E8p2/EMmEa Xfu9Ce6n6PXDeMguvfoz4bdj1MRUeJPoxU6JQ= MIME-Version: 1.0 Received: by 10.142.76.15 with SMTP id y15mr1085752wfa.263.1238193395742; Fri, 27 Mar 2009 15:36:35 -0700 (PDT) In-Reply-To: <1fb30820903271310w3b30ee99kc7369fca70107d27@mail.gmail.com> References: <1fb30820903271310w3b30ee99kc7369fca70107d27@mail.gmail.com> Date: Fri, 27 Mar 2009 15:36:35 -0700 Message-ID: <1fb30820903271536jd31fa13x9d806e5497914f2a@mail.gmail.com> Subject: Re: Retrieve the list of confs From: Garima Bathla To: ivy-user@ant.apache.org Content-Type: multipart/alternative; boundary=001636e1fd01843a0c0466215d15 X-Virus-Checked: Checked by ClamAV on apache.org --001636e1fd01843a0c0466215d15 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 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. > > --001636e1fd01843a0c0466215d15--