You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Simone Tripodi <si...@apache.org> on 2014/01/07 14:23:49 UTC

clarifications on ArtifactRepository#find(Artifact) and ArtifactRepository#findVersions(Artifact)

Hi all mates,

I am having some troubles about how the methods in subject should behave,
due to the not exhaustive javadoc: given the artifact

com.acme:mycomponent:1.0

when invoking ArtifactRepository#find(Artifact) it always return an
artifact, even if it doesn';t exist in the target repo; given the artifact

com.acme:mycomponent

when invoking ArtifactRepository#findVersions(Artifact) it always return an
empty list, even if there are versions deployed o the target repo.

Can you please explain me which is the right way to check if an artifact
exists on a repo?

Many thanks in advance and happy new year!
-Simo

http://people.apache.org/~simonetripodi/
http://twitter.com/simonetripodi