You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mike Lenner <mi...@gmail.com> on 2010/10/21 01:45:09 UTC

Shared Assembly With Additional Files

I'd like my shared assembly to be used to import additional files I'd
like to include in my final assembly.  Something like:

shared-assembly/pom.xml
shared-assembly/src/main/resources/assemblies/my-assembly.xml
shared-assembly/src/main/resources/common/README

my-assembly.xml:

...
<fileSet>
    <directory>common</directory>
    <includes>
        <include>README</include>
    </includes>
   <outputDirectory>/</outputDirectory>
</fileSet>
...

So, whatever project uses my-assembly.xml from shared-assemby will get
the README file as well.

I've seen this done alternatively by putting README in it's own
project, using dependency:unpack during the process-resources phase,
and then referencing that file in the assembly.  But, it seems like
the above is cleaner.

Thanks,
Mike

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


Re: Shared Assembly With Additional Files

Posted by Vincent Latombe <vi...@gmail.com>.
I had a similar requirement, and I ended up using dependency:unpack.
Otherwise, you could try using
http://maven.apache.org/plugins/maven-remote-resources-plugin/

2010/10/21 Mike Lenner <mi...@gmail.com>

> Seems no one's doing this.  Guess I'll go the route of
> dependency:unpack and just reference the target unpack directory in my
> shared assembly.
>
> On Wed, Oct 20, 2010 at 7:45 PM, Mike Lenner <mi...@gmail.com>
> wrote:
> > I'd like my shared assembly to be used to import additional files I'd
> > like to include in my final assembly.  Something like:
> >
> > shared-assembly/pom.xml
> > shared-assembly/src/main/resources/assemblies/my-assembly.xml
> > shared-assembly/src/main/resources/common/README
> >
> > my-assembly.xml:
> >
> > ...
> > <fileSet>
> >    <directory>common</directory>
> >    <includes>
> >        <include>README</include>
> >    </includes>
> >   <outputDirectory>/</outputDirectory>
> > </fileSet>
> > ...
> >
> > So, whatever project uses my-assembly.xml from shared-assemby will get
> > the README file as well.
> >
> > I've seen this done alternatively by putting README in it's own
> > project, using dependency:unpack during the process-resources phase,
> > and then referencing that file in the assembly.  But, it seems like
> > the above is cleaner.
> >
> > Thanks,
> > Mike
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Vincent

Re: Shared Assembly With Additional Files

Posted by Mike Lenner <mi...@gmail.com>.
Seems no one's doing this.  Guess I'll go the route of
dependency:unpack and just reference the target unpack directory in my
shared assembly.

On Wed, Oct 20, 2010 at 7:45 PM, Mike Lenner <mi...@gmail.com> wrote:
> I'd like my shared assembly to be used to import additional files I'd
> like to include in my final assembly.  Something like:
>
> shared-assembly/pom.xml
> shared-assembly/src/main/resources/assemblies/my-assembly.xml
> shared-assembly/src/main/resources/common/README
>
> my-assembly.xml:
>
> ...
> <fileSet>
>    <directory>common</directory>
>    <includes>
>        <include>README</include>
>    </includes>
>   <outputDirectory>/</outputDirectory>
> </fileSet>
> ...
>
> So, whatever project uses my-assembly.xml from shared-assemby will get
> the README file as well.
>
> I've seen this done alternatively by putting README in it's own
> project, using dependency:unpack during the process-resources phase,
> and then referencing that file in the assembly.  But, it seems like
> the above is cleaner.
>
> Thanks,
> Mike
>

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