Return-Path: Delivered-To: apmail-incubator-general-archive@www.apache.org Received: (qmail 5380 invoked from network); 7 Dec 2006 15:20:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2006 15:20:11 -0000 Received: (qmail 89951 invoked by uid 500); 7 Dec 2006 15:20:16 -0000 Delivered-To: apmail-incubator-general-archive@incubator.apache.org Received: (qmail 89824 invoked by uid 500); 7 Dec 2006 15:20:16 -0000 Mailing-List: contact general-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@incubator.apache.org Delivered-To: mailing list general@incubator.apache.org Received: (qmail 89813 invoked by uid 99); 7 Dec 2006 15:20:16 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 07:20:16 -0800 X-ASF-Spam-Status: No, hits=4.3 required=10.0 tests=HTML_MESSAGE,MAILTO_TO_SPAM_ADDR,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of xavier.hanin@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 07:20:05 -0800 Received: by ug-out-1314.google.com with SMTP id y2so606987uge for ; Thu, 07 Dec 2006 07:19:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=VBO07DAs35yW47hPgtuBM3+tB8dr07GJe0AEiLsLNpz4qG495+o4miTVHQOMdbvYUtqy3rgw9cmmgAhnlrP9yzodwqPbSYTMHAY4y8Omk7WeN7pp0XUlmfBy3ESwu5k74pY5Z5gnAcloY96tPVQ3kpnMpiREd6t+1b4wQU7zmn4= Received: by 10.82.113.6 with SMTP id l6mr36741buc.1165504783022; Thu, 07 Dec 2006 07:19:43 -0800 (PST) Received: by 10.82.125.13 with HTTP; Thu, 7 Dec 2006 07:19:42 -0800 (PST) Message-ID: <635a05060612070719n2bdf81m56d603eefa983fde@mail.gmail.com> Date: Thu, 7 Dec 2006 16:19:42 +0100 From: "Xavier Hanin" To: general@incubator.apache.org Subject: Re: Ivy List modules with extra attributes In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_56623_9335709.1165504782952" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_56623_9335709.1165504782952 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/7/06, Eran Bartenstein wrote: > > Hello, > > I am trying to list a module for a specified organisation and revision > with > an extra attribute: kind. > However, it seems that Ivy ignores the extra attribute. > > Also when checking into the code I can see no use of the extra attrbute > specified in the passed ModuleReviosionId. > > I use the following: > > HashMap extraAttributes = new HashMap(); > extraAttributes.put("kind", "gsce"); > ModuleRevisionId currModuleRevisionId = > > ModuleRevisionId.newInstance(currOrganizationName, currModuleName, > currRevisionName, > extraAttributes); > PatternMatcher matcher = > _ivy.getMatcher(PatternMatcher.EXACT); > ModuleRevisionId[] moduleRevisionIds = > _ivy.listModules(currModuleRevisionId, matcher); The listModules method do not take extra attributes into account because it doesn't know if the extra attribute is mandatory or not, more important than another field, or things like that. As I write that I realise that the pattern could help to know that, and could be used to review the code to take extra attribute into account depending on the pattern. But this is not the case now. So what I suggest as workaround is to write your own listModules method, inspired by the existing one in Ivy code, but using your extra attribute. Xavier // Populate revisions array - with childs of type: > revision > RepositoryItem currRevisionRepositoryItem = > new RepositoryItem(currRevisionName, > currModuleRepositoryItem); > > revisionRepositoryItemsList.add(currRevisionRepositoryItem); > > > My main purpose is to try and list all modules under all organizations > that > match the specific extra attrbute. > > Does anyone know how I can do that ? > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: general-unsubscribe@incubator.apache.org > For additional commands, e-mail: general-help@incubator.apache.org > > ------=_Part_56623_9335709.1165504782952--