You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Guillaume Durand <gd...@gillinfo.com> on 2008/02/27 18:51:21 UTC

How to set the classifier of an Artifact for install-plugin ?

Hello,

I wrote a packaging plugin replacing the jar-plugin and accepting a 
classifier as parameter to generate the proper artifact name. Once the 
artifact is created I use Artifact.setFile with the newly created artifact.
It works fine but the install-plugin copies the artifact into the 
repository without the classifier.
If the package plugin is jar-plugin the classifier is kept though.

How do I set in my plugin the classifier to use for the install-plugin?

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


Re: How to set the classifier of an Artifact for install-plugin ?

Posted by Paul Gier <pg...@redhat.com>.
Assuming you are creating a DefaultArtifact object, you have to set the 
classifier when you first call the constructor.  Does that work for you?

https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java


Guillaume Durand wrote:
> Hello,
> 
> I wrote a packaging plugin replacing the jar-plugin and accepting a 
> classifier as parameter to generate the proper artifact name. Once the 
> artifact is created I use Artifact.setFile with the newly created artifact.
> It works fine but the install-plugin copies the artifact into the 
> repository without the classifier.
> If the package plugin is jar-plugin the classifier is kept though.
> 
> How do I set in my plugin the classifier to use for the install-plugin?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


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