You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Harsha Sri-Narayana <Ha...@tradingscreen.com> on 2010/04/27 16:26:21 UTC

2.2.1->3.x plugin migration

Hello Maven community, I have written a maven plugin which uses the
2.2.1 api to download artifacts.  I see the api's between 2.x and 3.x
have changed for plugins like this.  

 

Actually, it looks like I use 2 parts of the old api.

1)      Downloading artifacts using these deprecated classes.

org.apache.maven.artifact.factory.ArtifactFactory;

org.apache.maven.artifact.metadata.ArtifactMetadataSource;

org.apache.maven.artifact.repository.ArtifactRepositoryFactory;

org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;

org.apache.maven.artifact.resolver.ArtifactResolver;

 

2)      Getting the base directory of the project which is executing the
plugin.

org.apache.maven.project.MavenProject;

 

Question) Can somebody point me towards the classes in 3.x which I
should be migrating towards to achieve this functionality?

 

Cheers,

Harsha


Re: 2.2.1->3.x plugin migration

Posted by Benjamin Bentmann <be...@udo.edu>.
Harsha Sri-Narayana wrote:

> org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;

This is an implementation class/component, your plugin should not refer 
to this directly but rather use something like

   /** @component roleHint="default" */
   private ArtifactRepositoryLayout defaultLayout;

to get hold of it via the interface.

> Question) Can somebody point me towards the classes in 3.x which I
> should be migrating towards to achieve this functionality?

The classes you mentioned should still work in Maven 3.x, if not, please 
give more details about the actual problems.


Benjamin

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