You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by vo...@centrum.cz on 2007/10/15 11:46:26 UTC

Mojo: Best way to get all artifact versions from local repository

Hello,

I am developing plugin (mojo) and I need to determine latest version in local repository for group of plugins.
I tried org.apache.maven.artifact.resolver.ArtifactResolve.resolve but it needs org.apache.maven.artifact.Artifact with filled version.
I also tried org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager but it also didn't help because there is only class for whole group (GroupRepositoryMetadata) and then for concrete artifact version (ArtifactRepositoryMetadata) but there in no way to obtain all (or latest) artifact version(s).

What is the best way to obtain latest plugin version? Should I manually traverse artifact directory in local repository and then sort found versions? Disadvantage is that one cannot be sure if this method handles all cases.

Thanks
Vojta


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org