You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Dehon <od...@gmail.com> on 2007/06/09 15:51:03 UTC

Deploying secondary artifacts alongside the main project artifact

Hi,

I am trying to understand best practices around how to achieve the
following:

Every time the artifact produced by the project is deployed, I would
like to deploy a secondary artifact (an XML file that has meta
information about the artifact that will be used when the artifact
is actually released onto the production platform).

Here's how I thought about achieving this:
- Create a Mojo that is linked to the package phase that creates an
  artifact out of the xml file (packaging/type TBD), and then uses
  projectHelper.attachArtifact() on the newly created artifact.
- When the Maven execution reaches the install and deploy phases, the
  XML file will be installed and deployed alongside the main artifact.

Before I start and attempt to write the "attach" plugin, I wanted to
get a feeling whether this would work at all and/or if there are better
ways of achieving the same thing?

Thanks in advance for sharing your experience.

-Olivier

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


Re: Deploying secondary artifacts alongside the main project artifact

Posted by Jason van Zyl <ja...@maven.org>.
http://mojo.codehaus.org/build-helper-maven-plugin/index.html

On 9 Jun 07, at 9:51 AM 9 Jun 07, Olivier Dehon wrote:

> Hi,
>
> I am trying to understand best practices around how to achieve the
> following:
>
> Every time the artifact produced by the project is deployed, I would
> like to deploy a secondary artifact (an XML file that has meta
> information about the artifact that will be used when the artifact
> is actually released onto the production platform).
>
> Here's how I thought about achieving this:
> - Create a Mojo that is linked to the package phase that creates an
>  artifact out of the xml file (packaging/type TBD), and then uses
>  projectHelper.attachArtifact() on the newly created artifact.
> - When the Maven execution reaches the install and deploy phases, the
>  XML file will be installed and deployed alongside the main artifact.
>
> Before I start and attempt to write the "attach" plugin, I wanted to
> get a feeling whether this would work at all and/or if there are  
> better
> ways of achieving the same thing?
>
> Thanks in advance for sharing your experience.
>
> -Olivier
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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