Return-Path: Delivered-To: apmail-ant-ivy-user-archive@www.apache.org Received: (qmail 86842 invoked from network); 9 Oct 2009 08:24:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Oct 2009 08:24:55 -0000 Received: (qmail 44527 invoked by uid 500); 9 Oct 2009 08:24:55 -0000 Delivered-To: apmail-ant-ivy-user-archive@ant.apache.org Received: (qmail 44450 invoked by uid 500); 9 Oct 2009 08:24:55 -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 44440 invoked by uid 99); 9 Oct 2009 08:24:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 08:24:55 +0000 X-ASF-Spam-Status: No, hits=-3.3 required=10.0 tests=FS_OBFU_PRMCY,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Alexander.Foreman@morganstanley.com designates 205.228.53.69 as permitted sender) Received: from [205.228.53.69] (HELO hqmtaint02.ms.com) (205.228.53.69) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 08:24:42 +0000 Received: from hqmtaint02 (localhost.ms.com [127.0.0.1]) by hqmtaint02.ms.com (output Postfix) with ESMTP id 7F29FE3905F for ; Fri, 9 Oct 2009 04:24:21 -0400 (EDT) Received: from ny0030as02 (unknown [170.74.93.68]) by hqmtaint02.ms.com (internal Postfix) with ESMTP id 597A2110036 for ; Fri, 9 Oct 2009 04:24:21 -0400 (EDT) Received: from ny0030as02 (localhost [127.0.0.1]) by ny0030as02 (msa-out Postfix) with ESMTP id 418E3AB82A6 for ; Fri, 9 Oct 2009 04:24:21 -0400 (EDT) Received: from hqmsaext01.ms.com (hqmsaext01 [205.228.53.70]) by ny0030as02 (mta-in Postfix) with ESMTP id 3F6625CC02F for ; Fri, 9 Oct 2009 04:24:21 -0400 (EDT) Received: from hqmsaext01 (localhost.ms.com [127.0.0.1]) by hqmsaext01.ms.com (output Postfix) with ESMTP id 330C654101 for ; Fri, 9 Oct 2009 04:24:21 -0400 (EDT) Received: from mail-qy0-f177.google.com (mail-qy0-f177.google.com [209.85.221.177]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Thawte Premium Server CA" (verified OK)) by hqmsaext01.ms.com (submission Postfix) with ESMTPS id 06828540EF for ; Fri, 9 Oct 2009 04:24:21 -0400 (EDT) Received: by qyk7 with SMTP id 7so6270767qyk.10 for ; Fri, 09 Oct 2009 01:24:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.79.22 with SMTP id n22mr2235327qak.230.1255076660697; Fri, 09 Oct 2009 01:24:20 -0700 (PDT) In-Reply-To: <00c901ca4835$9f5b7c80$de127580$@com> References: <61aa66f20910080743u454316fewb69470871cc61053@mail.gmail.com> <61aa66f20910080751gde073fetebb3460f3977e98a@mail.gmail.com> <00c901ca4835$9f5b7c80$de127580$@com> Date: Fri, 9 Oct 2009 09:24:20 +0100 Message-ID: <61aa66f20910090124yfa9608fv484cd9db809b0cce@mail.gmail.com> Subject: Re: How to programaticly gather all the artifacts from an ivy file. From: Alex Foreman To: ivy-user@ant.apache.org, tself@bbn.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.35/RELEASE, bases: 09102009 #2720607, status: clean X-Virus-Checked: Checked by ClamAV on apache.org Great place to start. If I find a nice solution I'll update here for knowledge purposes. Mitch: Yes indeed I only want the projects artifacts and not its dependencies, thanks. Many thanks, Alex 2009/10/8 Mitch Gitman : > The standard way to gather the artifacts for a given Ivy conf is to invok= e > the following Ant tasks in sequence: > 1. ivy:resolve > 2. ivy:cachefileset > > If you want to accomplish the same programmatically, I would suggest look= ing > into how you can leverage these existing tasks or the top-level APIs they > call. > > By the way, it sounds like you only want the artifacts within the module > itself, and not the artifacts belonging to its dependencies. In that case= , > ivy:resolve should have transitive=3D"false". > 2009/10/8 Troy Self : > There is an option when using ivy standalone to output the current classp= ath > from an ivy.xml file: > > java -jar ivy.jar -confs runtime -cachepath classpath.txt > > I would start there in the source code and see how it achieves it. There = are > probably methods there that you can call directly. > > -- tBs > >> -----Original Message----- >> From: Alex Foreman [mailto:Alexander.Foreman@morganstanley.com] >> Sent: Thursday, October 08, 2009 10:51 AM >> To: ivy-user@ant.apache.org >> Subject: How to programaticly gather all the artifacts from an ivy file. >> >> Hey Guys, >> >> I have a runscript generator which is driven by ivy. >> Currently however I am only including the main jar my build creates. >> >> If someone has a artifact list like this: >> >> >> >> >> >> >> >> >> >> I wish to be able to use Ivy to say for my ivy.xml tell me all >> artifacts that are in 'x' config. >> This way I can setup my classpath on the fly and be completely driven >> from Ivy.xml >> >> Is there any easy way to do this. =A0I'm not to keen on writing a >> separate xml parser to gather this information which I would presume I >> should have access to already. >> >> Many thanks in advance! >> >> >> -- >> Alex Foreman > > > --=20 Alex Foreman