Ok so I test it and it works now. Thank you! I'm so stupid I didn't check that I was importing the legacy one and not the maven api one!!! By the way, in maven 3 it seems that this interface is deprecated. How do you plan to provide this kind of service in the future?
Many thanks, Romain. 2013/10/30 Stuart McCulloch <[email protected]> > Looking at the *MetadataSource components in the Maven source they're only > bound under: > > org.apache.maven.artifact.metadata.ArtifactMetadataSource > > and not: > > org.apache.maven.repository.legacy.metadata.ArtifactMetadataSource > > For example in MavenMetadataSource.java: > > import org.apache.maven.artifact.metadata.ArtifactMetadataSource; > // ... > > @Component( role = ArtifactMetadataSource.class, hint = "maven" ) > public class MavenMetadataSource > implements ArtifactMetadataSource > { > // ... > > So if you change to use > org.apache.maven.artifact.metadata.ArtifactMetadataSource it should work > (this is the API supported by both Maven 2.x and 3.x) > > HTH > > On 30 Oct 2013, at 13:24, Romain Gilles wrote: > > > Hi all, > > I'm developing a maven plugin and I want to discover the last version of > a > > specific artifact. I had a look to the maven-vesions-plugin. But I don't > > know why when I try to get a (deprecated) ArtifacteMetadataSource as > follow: > > @Component > > private ArtifactMetadataSource artifactMetadataSource > > > > I get an exception: > > > > 1) No implementation for > > org.apache.maven.repository.legacy.metadata.ArtifactMetadataSource was > > bound. > > > > I'm usign Maven 3.0.5 as a model and runtime. > > Could somebody help me? > > > > Thanks, > > > > Romain. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
