On 17/12/2007, Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
>
> To have correct releases we need to have the LICENSE and NOTICE file in
> each and every distribution. For source distributions these need to be
> in the root directory, for jars they should be in the META-INF dir.
>
> Now, as maven does not provide any support in this area, we currently
> have two sets of these files in our modules: on in the root directory of
> the module and one stored under src/main/resources/META-INF.
> Keeping duplicate information is of course not the best thing :)
>
> I think we could solve this easily by adding the folling resource
> definiton to our parent pom. This definition will require to have
> LICENSE and NOTICE in the root directory of the project and it will copy
> it during the build to the META-INF/ directory in the jar.
>
> Here is the snippet which we have to add to the <build> section:
>         <resources>
>           <resource>
>             <directory>src/main/resources</directory>
>           </resource>
>           <resource>
>             <directory>.</directory>
>             <targetPath>META-INF</targetPath>
>             <includes>
>               <include>LICENSE</include>
>               <include>NOTICE</include>
>             </includes>
>           </resource>
>         </resources>
>
> I did some tests and at least these worked for me.


FYI, artifacts with bundle packaging would need to use the 1.1.0-SNAPSHOT
bundleplugin because 1.0.0 doesn't handle the includes/excludes filtering of
resources - if you use 1.0.0 you'll probably find the entire directory
contents
appearing under META-INF in the final bundle file :(

WDYT?


apart from the issue above, I'm in favour of using this to reduce duplicates

Carsten
>
> --
> Carsten Ziegeler
> [EMAIL PROTECTED]
>



-- 
Cheers, Stuart

Reply via email to