You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nicky Ramone <ni...@gmail.com> on 2012/07/19 17:40:18 UTC

Assembly Plugin: One descriptor to produce two assemblies, each with its own filter

Hello

I am finding a limitation with this plugin, and this post in Stack Overflow
describes the problem very well:
http://stackoverflow.com/questions/2753529/the-maven-assembly-plugin-is-not-using-the-finalname-for-installing-with-attach

Basically, I have an assembly descriptor that filters resources.
I would like to produce two different assemblies, where each one uses the
same descriptor but with a different filter.
Looks like the "appendAssemblyId" option puts a bit of a constraint because
the names collide when installing in the repo.

Is there any solution that I can take without having to hack a lot?
Are there any plans to deal with these cases?

Thanks a lot!
Cheers.

Re: Assembly Plugin: One descriptor to produce two assemblies, each with its own filter

Posted by Nicky Ramone <ni...@gmail.com>.
That wasn't my post at SO but it exactly describes my post.
What I wanted to avoid is the duplication of the assembly descriptor.

Creating 2 projects would add too much complexity. I would have to add one
project per filter that I want to apply (in this case, one per environment).
For now I decided to use a component descriptor describing the main
packaging, and let the assembly descriptors use the component.
It's not the best solution but at least I don't have to duplicate a lot.

Thanks for your help!


On Thu, Jul 19, 2012 at 1:05 PM, Wayne Fay <wa...@gmail.com> wrote:

> > Basically, I have an assembly descriptor that filters resources.
> > I would like to produce two different assemblies, where each one uses the
> > same descriptor but with a different filter.
> > Looks like the "appendAssemblyId" option puts a bit of a constraint
> because
> > the names collide when installing in the repo.
>
> Use the appendAssemblyId and specify different <id> for the two
> executions. Which is just what you're told to do in the SO post.
> Otherwise you will need to make 2 projects, duplicate the assembly
> plugin configuration, and specify different artifactIds.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Assembly Plugin: One descriptor to produce two assemblies, each with its own filter

Posted by Wayne Fay <wa...@gmail.com>.
> Basically, I have an assembly descriptor that filters resources.
> I would like to produce two different assemblies, where each one uses the
> same descriptor but with a different filter.
> Looks like the "appendAssemblyId" option puts a bit of a constraint because
> the names collide when installing in the repo.

Use the appendAssemblyId and specify different <id> for the two
executions. Which is just what you're told to do in the SO post.
Otherwise you will need to make 2 projects, duplicate the assembly
plugin configuration, and specify different artifactIds.

Wayne

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


Re: Assembly Plugin: One descriptor to produce two assemblies, each with its own filter

Posted by Ron Wheeler <rw...@artifact-software.com>.
2 artifacts - 2 projects is the best rule of thumb

Ron
On 19/07/2012 11:40 AM, Nicky Ramone wrote:
> Hello
>
> I am finding a limitation with this plugin, and this post in Stack Overflow
> describes the problem very well:
> http://stackoverflow.com/questions/2753529/the-maven-assembly-plugin-is-not-using-the-finalname-for-installing-with-attach
>
> Basically, I have an assembly descriptor that filters resources.
> I would like to produce two different assemblies, where each one uses the
> same descriptor but with a different filter.
> Looks like the "appendAssemblyId" option puts a bit of a constraint because
> the names collide when installing in the repo.
>
> Is there any solution that I can take without having to hack a lot?
> Are there any plans to deal with these cases?
>
> Thanks a lot!
> Cheers.
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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