You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jason Winnebeck <jp...@rit.edu> on 2010/05/13 18:44:56 UTC

Deployment of non-jar artifacts

What is the best way to deploy a non-jar file built with a plugin?

I have a jar project I build in Maven, which works nicely to build and deploy jar, javadocs, and sources artifacts. I've written my own plugin that generates a deb into target directory (I'm aware of existing deb plugins, but they didn't meet my needs).

But when I install or deploy, the deb doesn't go with the jar files I made. What is the most appropriate way to do this? I've used install:file and deploy:file from command line with 3rd party jars, but I'm really afraid that using the plugins in this way isn't appropriate for this -- it seems to create new metadata/pom files in the actual repository that don't seem right.

I think I'm attaching the artifact properly in my plugin code, although it doesn't cause Maven to do anything with it:

File output = ...; //the deb file I made
projectHelper.attachArtifact( getProject(), "deb-archive", output );

Jason

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


Re: Deployment of non-jar artifacts

Posted by Jason Winnebeck <jp...@rit.edu>.
I took a look at the source code for the build-helper-maven-plugin execution 
you showed me. It's basically just a shell around attachArtifact, but with one 
small difference. It calls attach artifact on the project and not the 
"execution project." I modified my plugin to do it that exact way and it works 
now!

So essentially I did what you suggested but just in my deb plugin code.

Thanks!

Jason

On 5/13/2010 12:48 PM, Kalle Korhonen wrote:
> So the deb is a secondary artifact in the same module? Use the
> buildhelper plugin, see the last example at
> http://mojo.codehaus.org/build-helper-maven-plugin/usage.html
>
> Kalle

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


Re: Deployment of non-jar artifacts

Posted by Kalle Korhonen <ka...@gmail.com>.
So the deb is a secondary artifact in the same module? Use the
buildhelper plugin, see the last example at
http://mojo.codehaus.org/build-helper-maven-plugin/usage.html

Kalle


On Thu, May 13, 2010 at 9:44 AM, Jason Winnebeck <jp...@rit.edu> wrote:
> What is the best way to deploy a non-jar file built with a plugin?
>
> I have a jar project I build in Maven, which works nicely to build and deploy jar, javadocs, and sources artifacts. I've written my own plugin that generates a deb into target directory (I'm aware of existing deb plugins, but they didn't meet my needs).
>
> But when I install or deploy, the deb doesn't go with the jar files I made. What is the most appropriate way to do this? I've used install:file and deploy:file from command line with 3rd party jars, but I'm really afraid that using the plugins in this way isn't appropriate for this -- it seems to create new metadata/pom files in the actual repository that don't seem right.
>
> I think I'm attaching the artifact properly in my plugin code, although it doesn't cause Maven to do anything with it:
>
> File output = ...; //the deb file I made
> projectHelper.attachArtifact( getProject(), "deb-archive", output );
>
> Jason
>
> ---------------------------------------------------------------------
> 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