Return-Path: Delivered-To: apmail-maven-dev-archive@www.apache.org Received: (qmail 24112 invoked from network); 5 Apr 2007 16:56:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Apr 2007 16:56:48 -0000 Received: (qmail 47480 invoked by uid 500); 5 Apr 2007 16:56:53 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 47420 invoked by uid 500); 5 Apr 2007 16:56:53 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 47409 invoked by uid 99); 5 Apr 2007 16:56:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2007 09:56:53 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of carlossg@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2007 09:56:45 -0700 Received: by ug-out-1314.google.com with SMTP id j40so1094545ugd for ; Thu, 05 Apr 2007 09:56:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=G/fH8RJmhi8W+/umJ/HNcC4UqQYFI/EAFDPubR5Y0DJ1LnEa9VAYbNUCIx8Y+X8yn3YfXL9XzlTi/peaRBZ4FFdAwet7jIhjO+iYsLuTR2Xs971n4N+RkFnAjy1bzEeWdc8GkBZ1jFrOZd2q6ju5nG7qtrsCxz/p/HZHvo3ltvU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=UU/ViI23fuUqV9a9sCbGrBbtoF6AJmZuaPXyFYhWt6xsj6NbdrJemaNVwaL7aWtcTDUUhnDgICVAMW0laV+DoUyvI43uDDCu1/7bDNZVH5SV7ZGE0+swGgCT5oJL9pQoJB941x/tmt8xBlZD4SyQ6lYaueaapJmmMJ628KVzHBM= Received: by 10.67.101.8 with SMTP id d8mr2323903ugm.1175792183974; Thu, 05 Apr 2007 09:56:23 -0700 (PDT) Received: by 10.66.241.13 with HTTP; Thu, 5 Apr 2007 09:56:23 -0700 (PDT) Message-ID: <1a5b6c410704050956h53ecf8ah71a3966245160ce2@mail.gmail.com> Date: Thu, 5 Apr 2007 09:56:23 -0700 From: "Carlos Sanchez" Sender: carlossg@gmail.com To: "Maven Developers List" Subject: Re: [embedder] Retrieving available versions of an artifact In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1a5b6c410704021722t37948c0fn7d3877286fbf3cb0@mail.gmail.com> <0E8F9605-37E7-4453-8C4A-36F5AA791D1A@maven.org> <1a5b6c410704031355h7b137826w3b45ab3bd606ffe7@mail.gmail.com> <1a5b6c410704050926n601561eal20f1914284770552@mail.gmail.com> X-Google-Sender-Auth: 5a83a1c9cc0730ea X-Virus-Checked: Checked by ClamAV on apache.org On 4/5/07, Jason van Zyl wrote: > > On 5 Apr 07, at 12:26 PM 5 Apr 07, Carlos Sanchez wrote: > > > I need it the same way the cli would do it, for version ranges, > > snapshots,... I need the metadatasource > > > > You still haven't answered the question as to the specific use case. it's a library that given group and artifact expects a list of versions. As it may later be used by maven i want to be consistent > > > It is already abstracted in ArtifactMetadataSource interface > > This interface cannot be exposed via the embedder, if you want to > return an ordered Set of versions that's fine. So you are suggesting adding this method from ArtifactMetadataSource to the embedder List retrieveAvailableVersions( Artifact artifact, ArtifactRepository localRepository, List remoteRepositories ) throws ArtifactMetadataRetrievalException; > > > , so if > > you want to add the index as another source right now you'd just need > > to make a new implementation. > > I expect anything you are working on will be put in a feature branch > in the sandbox for review so I will look at it as the embedder > interface already needs to slim down and I'm adamant about not > exposing any internal API or structures, in particular anything to do > with maven-artifact because anything dependency related has to move > to a graph structure as what is present is fraught with problems. I just need that method, nothing else. I don't actually need the metadata source exposed, what I need is it to be used as the cli does > > So in your particular case a query by groupId+artifact id should > yield a set of versions. So exposure of ResolutionGroup, > MetadataSources or anything else. > > Jason. > > > > > On 4/3/07, Jason van Zyl wrote: > >> On 3 Apr 07, at 4:55 PM 3 Apr 07, Carlos Sanchez wrote: > >> > >> > I need this to get a list of versions available for an artifact. I > >> > want to do it the same way maven does to avoid inconsistencies, > >> so the > >> > index is not an option. > >> > >> If this is for releases which is probably what the you want there are > >> no inconsistencies and the index is actually far more reliable. > >> > >> If you want up-to-date snapshots then that's a different story but I > >> can't see the vast majority of people doing production development > >> work being interested in that. > >> > >> If you want snapshot support then it would have to be dynamic as the > >> index is only updated on a daily basis. > >> > >> This should be abstracted anyway because in the future I think > >> leveraging the tiny index that can be pulled down locally would > >> provide an artifact resolution mechanism that is far more reliable > >> and an order of magnitude faster. > >> > >> Jason. > >> > >> > > >> > On 4/2/07, Jason van Zyl wrote: > >> >> > >> >> On 2 Apr 07, at 8:22 PM 2 Apr 07, Carlos Sanchez wrote: > >> >> > >> >> > I haven't found a direct way to retrieve the > >> ArtifactMetadataSource > >> >> > instance to retrieve the list of available versions in the > >> >> repository, > >> >> > I have to explicitly look it up in the plexus container. > >> >> > > >> >> > Did I miss something? if not it would be useful to expose the > >> >> > ArtifactMetadataSource or add a getAvailableVersions method > >> to the > >> >> > embedder > >> >> > >> >> What's the full use case? > >> >> > >> >> People typically use the search with the index to find all the > >> >> available versions to, say, select a specific version of commons- > >> >> logging. This is for the IDE and is specific to that environment. > >> >> > >> >> The indexing API will be exposed in a package at Mevenide and > >> not in > >> >> the embedder, but that is the way users have generally been seeing > >> >> all versions and that's how users interact with the artifact > >> >> selection process. It's far easier using the index which is 300k > >> >> zipped for the entire repository. > >> >> > >> >> Jason. > >> >> > >> >> > > >> >> > > >> >> > public List getAvailableVersions(Artifact > >> >> > artifact, List remoteRepositories, > >> >> > ArtifactRepository localRepository) > >> >> > { > >> >> > > >> >> > ArtifactMetadataSource artifactMetadataSource = > >> >> > (ArtifactMetadataSource) mavenEmbedder.getPlexusContainer > >> ().lookup( > >> >> > ArtifactMetadataSource.ROLE); > >> >> > > >> >> > return > >> >> > artifactMetadataSource.retrieveAvailableVersions(artifact, > >> >> > localRepository, remoteRepositories); > >> >> > } > >> >> > > >> >> > -- > >> >> > I could give you my word as a Spaniard. > >> >> > No good. I've known too many Spaniards. > >> >> > -- The Princess Bride > >> >> > > >> >> > > >> >> > >> --------------------------------------------------------------------- > >> >> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >> >> > For additional commands, e-mail: dev-help@maven.apache.org > >> >> > > >> >> > > >> >> > >> >> > >> >> > >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >> >> For additional commands, e-mail: dev-help@maven.apache.org > >> >> > >> >> > >> > > >> > > >> > -- > >> > I could give you my word as a Spaniard. > >> > No good. I've known too many Spaniards. > >> > -- The Princess Bride > >> > > >> > > >> --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >> > For additional commands, e-mail: dev-help@maven.apache.org > >> > > >> > > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >> For additional commands, e-mail: dev-help@maven.apache.org > >> > >> > > > > > > -- > > I could give you my word as a Spaniard. > > No good. I've known too many Spaniards. > > -- The Princess Bride > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > > For additional commands, e-mail: dev-help@maven.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > For additional commands, e-mail: dev-help@maven.apache.org > > -- I could give you my word as a Spaniard. No good. I've known too many Spaniards. -- The Princess Bride --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For additional commands, e-mail: dev-help@maven.apache.org