maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: Get last version of a artifact
Date Wed, 30 Oct 2013 14:54:04 GMT
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message