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.

On 4/2/07, Jason van Zyl <[EMAIL PROTECTED]> 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<ArtifactVersion> getAvailableVersions(Artifact
> artifact, List<ArtifactRepository> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                            -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to