You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Carsten Ziegeler <cz...@apache.org> on 2007/12/17 09:38:23 UTC
Handling of LICENSE and NOTICE file
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.
WDYT?
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Handling of LICENSE and NOTICE file
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Whatever makes sense, is fine by me...
-> richard
On Mon, 17 Dec 2007 09:44:12 +0100
"Karl Pauls" <ka...@gmail.com> wrote:
> +1 - Good idea.
>
> regards,
>
> Karl
>
> On 12/17/07, Carsten Ziegeler <cz...@apache.org> 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.
> >
> > WDYT?
> > Carsten
> >
> > --
> > Carsten Ziegeler
> > cziegeler@apache.org
> >
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
Re: Handling of LICENSE and NOTICE file
Posted by Karl Pauls <ka...@gmail.com>.
+1 - Good idea.
regards,
Karl
On 12/17/07, Carsten Ziegeler <cz...@apache.org> 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.
>
> WDYT?
> Carsten
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Karl Pauls
karlpauls@gmail.com
Re: Handling of LICENSE and NOTICE file
Posted by Carsten Ziegeler <cz...@apache.org>.
Niall Pemberton wrote:
> On Dec 18, 2007 4:41 PM, Guillaume Nodet <gn...@gmail.com> wrote:
>> There is a way to add missing informations.
>> You just need to use a file like this one:
>>
>> http://svn.apache.org/repos/asf/incubator/cxf/trunk/buildtools/src/main/resources/notice-supplements.xml
>
> Seems to me that once you have to use this approach then its probably
> simpler to just "hand-craft" a Notice file and use the approach
> Carsten originally proposed.
>
:) Yes, same feeling here. The only advantage of the maven plugin is
that it also crawls transitive dependencies.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Handling of LICENSE and NOTICE file
Posted by Guillaume Nodet <gn...@gmail.com>.
Imho, it's easier to check for bad content that is generated (that you can
see) than to check for missing notices (that you can't see).
On Dec 18, 2007 5:47 PM, Niall Pemberton <ni...@gmail.com> wrote:
> On Dec 18, 2007 4:41 PM, Guillaume Nodet <gn...@gmail.com> wrote:
> > There is a way to add missing informations.
> > You just need to use a file like this one:
> >
> >
> http://svn.apache.org/repos/asf/incubator/cxf/trunk/buildtools/src/main/resources/notice-supplements.xml
>
> Seems to me that once you have to use this approach then its probably
> simpler to just "hand-craft" a Notice file and use the approach
> Carsten originally proposed.
>
> Niall
>
> > On Dec 18, 2007 5:39 PM, Carsten Ziegeler <cz...@apache.org> wrote:
> >
> > > Guillaume Nodet wrote:
> > > > I've just tried it on servicemix and it works fine, even when using
> the
> > > > maven bundle plugin :-)
> > >
> > > I just tried it for the scrplugin - now, the problem is that this
> relies
> > > on proper poms for the dependencies. And it seems that not all
> projects
> > > have this, so the resulting NOTICE looks like below.
> > > (It's funny that even the maven guys use a wrong organization name).
> > >
> > > So unless we have a way to add somehow the missing information, it's
> not
> > > that usable.
> > >
> > > // ------------------------------------------------------------------
> > > // NOTICE file corresponding to the section 4d of The Apache License,
> > > // Version 2.0, in this case for Maven SCR Plugin
> > > // ------------------------------------------------------------------
> > >
> > > Maven SCR Plugin
> > > Copyright 2006-2007 The Apache Software Foundation
> > >
> > > This product includes/uses software(s) developed by 'an unknown
> > > organization'
> > > - Unnamed - ant:ant:jar:1.5.1
> > > - QDox (http://qdox.codehaus.org)
> > > - Unnamed - jmock:jmock:jar:1.0.0
> > > - OSGi R4 compendium (http://www.osgi.org)
> > > - OSGi R4 core (http://www.osgi.org)
> > >
> > > This product includes/uses software(s) developed by 'Apache Software
> > > Foundation' (http://www.apache.org/)
> > > - Maven Archiver (http://maven.apache.org/shared/maven-archiver)
> > > - Maven Artifact (http://maven.apache.org/maven2/maven-artifact)
> > > - Maven Artifact Manager (http://maven.apache.org)
> > > - Maven Model (http://maven.apache.org/maven2/maven-model)
> > > - Maven Plugin API (http://maven.apache.org/maven-plugin-api)
> > > - Maven Profile Model (http://maven.apache.org/maven2/maven-profile)
> > > - Maven Project Builder (http://maven.apache.org/maven2/maven-project
> )
> > > - Maven Repository Metadata Model
> > > (http://maven.apache.org/maven2/maven-repository-metadata)
> > > - Maven Wagon API
> > >
> > > This product includes/uses software(s) developed by 'Codehaus'
> > > (http://www.codehaus.org/)
> > > - Plexus Archiver Component
> > > - Default Plexus Container
> > > - Plexus Common Utilities
> > >
> > > This product includes/uses software(s) developed by 'ObjectWeb'
> > > (http://www.objectweb.org/)
> > > - ASM All (http://asm.objectweb.org/asm-all)
> > >
> > > This product includes/uses software(s) developed by 'The Apache
> Software
> > > Foundation' (http://www.apache.org/)
> > > - Commons IO (http://jakarta.apache.org/commons/io/)
> > >
> > > This product includes/uses software(s) developed by 'The Codehaus'
> > > (http://codehaus.org/)
> > > - classworlds (http://classworlds.codehaus.org/)
> > >
> > > Carsten
> > >
> > >
> > > --
> > > Carsten Ziegeler
> > > cziegeler@apache.org
> > >
> >
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Re: Handling of LICENSE and NOTICE file
Posted by Niall Pemberton <ni...@gmail.com>.
On Dec 18, 2007 4:41 PM, Guillaume Nodet <gn...@gmail.com> wrote:
> There is a way to add missing informations.
> You just need to use a file like this one:
>
> http://svn.apache.org/repos/asf/incubator/cxf/trunk/buildtools/src/main/resources/notice-supplements.xml
Seems to me that once you have to use this approach then its probably
simpler to just "hand-craft" a Notice file and use the approach
Carsten originally proposed.
Niall
> On Dec 18, 2007 5:39 PM, Carsten Ziegeler <cz...@apache.org> wrote:
>
> > Guillaume Nodet wrote:
> > > I've just tried it on servicemix and it works fine, even when using the
> > > maven bundle plugin :-)
> >
> > I just tried it for the scrplugin - now, the problem is that this relies
> > on proper poms for the dependencies. And it seems that not all projects
> > have this, so the resulting NOTICE looks like below.
> > (It's funny that even the maven guys use a wrong organization name).
> >
> > So unless we have a way to add somehow the missing information, it's not
> > that usable.
> >
> > // ------------------------------------------------------------------
> > // NOTICE file corresponding to the section 4d of The Apache License,
> > // Version 2.0, in this case for Maven SCR Plugin
> > // ------------------------------------------------------------------
> >
> > Maven SCR Plugin
> > Copyright 2006-2007 The Apache Software Foundation
> >
> > This product includes/uses software(s) developed by 'an unknown
> > organization'
> > - Unnamed - ant:ant:jar:1.5.1
> > - QDox (http://qdox.codehaus.org)
> > - Unnamed - jmock:jmock:jar:1.0.0
> > - OSGi R4 compendium (http://www.osgi.org)
> > - OSGi R4 core (http://www.osgi.org)
> >
> > This product includes/uses software(s) developed by 'Apache Software
> > Foundation' (http://www.apache.org/)
> > - Maven Archiver (http://maven.apache.org/shared/maven-archiver)
> > - Maven Artifact (http://maven.apache.org/maven2/maven-artifact)
> > - Maven Artifact Manager (http://maven.apache.org)
> > - Maven Model (http://maven.apache.org/maven2/maven-model)
> > - Maven Plugin API (http://maven.apache.org/maven-plugin-api)
> > - Maven Profile Model (http://maven.apache.org/maven2/maven-profile)
> > - Maven Project Builder (http://maven.apache.org/maven2/maven-project)
> > - Maven Repository Metadata Model
> > (http://maven.apache.org/maven2/maven-repository-metadata)
> > - Maven Wagon API
> >
> > This product includes/uses software(s) developed by 'Codehaus'
> > (http://www.codehaus.org/)
> > - Plexus Archiver Component
> > - Default Plexus Container
> > - Plexus Common Utilities
> >
> > This product includes/uses software(s) developed by 'ObjectWeb'
> > (http://www.objectweb.org/)
> > - ASM All (http://asm.objectweb.org/asm-all)
> >
> > This product includes/uses software(s) developed by 'The Apache Software
> > Foundation' (http://www.apache.org/)
> > - Commons IO (http://jakarta.apache.org/commons/io/)
> >
> > This product includes/uses software(s) developed by 'The Codehaus'
> > (http://codehaus.org/)
> > - classworlds (http://classworlds.codehaus.org/)
> >
> > Carsten
> >
> >
> > --
> > Carsten Ziegeler
> > cziegeler@apache.org
> >
>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
>
Re: Handling of LICENSE and NOTICE file
Posted by Guillaume Nodet <gn...@gmail.com>.
There is a way to add missing informations.
You just need to use a file like this one:
http://svn.apache.org/repos/asf/incubator/cxf/trunk/buildtools/src/main/resources/notice-supplements.xml
On Dec 18, 2007 5:39 PM, Carsten Ziegeler <cz...@apache.org> wrote:
> Guillaume Nodet wrote:
> > I've just tried it on servicemix and it works fine, even when using the
> > maven bundle plugin :-)
>
> I just tried it for the scrplugin - now, the problem is that this relies
> on proper poms for the dependencies. And it seems that not all projects
> have this, so the resulting NOTICE looks like below.
> (It's funny that even the maven guys use a wrong organization name).
>
> So unless we have a way to add somehow the missing information, it's not
> that usable.
>
> // ------------------------------------------------------------------
> // NOTICE file corresponding to the section 4d of The Apache License,
> // Version 2.0, in this case for Maven SCR Plugin
> // ------------------------------------------------------------------
>
> Maven SCR Plugin
> Copyright 2006-2007 The Apache Software Foundation
>
> This product includes/uses software(s) developed by 'an unknown
> organization'
> - Unnamed - ant:ant:jar:1.5.1
> - QDox (http://qdox.codehaus.org)
> - Unnamed - jmock:jmock:jar:1.0.0
> - OSGi R4 compendium (http://www.osgi.org)
> - OSGi R4 core (http://www.osgi.org)
>
> This product includes/uses software(s) developed by 'Apache Software
> Foundation' (http://www.apache.org/)
> - Maven Archiver (http://maven.apache.org/shared/maven-archiver)
> - Maven Artifact (http://maven.apache.org/maven2/maven-artifact)
> - Maven Artifact Manager (http://maven.apache.org)
> - Maven Model (http://maven.apache.org/maven2/maven-model)
> - Maven Plugin API (http://maven.apache.org/maven-plugin-api)
> - Maven Profile Model (http://maven.apache.org/maven2/maven-profile)
> - Maven Project Builder (http://maven.apache.org/maven2/maven-project)
> - Maven Repository Metadata Model
> (http://maven.apache.org/maven2/maven-repository-metadata)
> - Maven Wagon API
>
> This product includes/uses software(s) developed by 'Codehaus'
> (http://www.codehaus.org/)
> - Plexus Archiver Component
> - Default Plexus Container
> - Plexus Common Utilities
>
> This product includes/uses software(s) developed by 'ObjectWeb'
> (http://www.objectweb.org/)
> - ASM All (http://asm.objectweb.org/asm-all)
>
> This product includes/uses software(s) developed by 'The Apache Software
> Foundation' (http://www.apache.org/)
> - Commons IO (http://jakarta.apache.org/commons/io/)
>
> This product includes/uses software(s) developed by 'The Codehaus'
> (http://codehaus.org/)
> - classworlds (http://classworlds.codehaus.org/)
>
> Carsten
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Re: Handling of LICENSE and NOTICE file
Posted by Carsten Ziegeler <cz...@apache.org>.
Guillaume Nodet wrote:
> I've just tried it on servicemix and it works fine, even when using the
> maven bundle plugin :-)
I just tried it for the scrplugin - now, the problem is that this relies
on proper poms for the dependencies. And it seems that not all projects
have this, so the resulting NOTICE looks like below.
(It's funny that even the maven guys use a wrong organization name).
So unless we have a way to add somehow the missing information, it's not
that usable.
// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for Maven SCR Plugin
// ------------------------------------------------------------------
Maven SCR Plugin
Copyright 2006-2007 The Apache Software Foundation
This product includes/uses software(s) developed by 'an unknown
organization'
- Unnamed - ant:ant:jar:1.5.1
- QDox (http://qdox.codehaus.org)
- Unnamed - jmock:jmock:jar:1.0.0
- OSGi R4 compendium (http://www.osgi.org)
- OSGi R4 core (http://www.osgi.org)
This product includes/uses software(s) developed by 'Apache Software
Foundation' (http://www.apache.org/)
- Maven Archiver (http://maven.apache.org/shared/maven-archiver)
- Maven Artifact (http://maven.apache.org/maven2/maven-artifact)
- Maven Artifact Manager (http://maven.apache.org)
- Maven Model (http://maven.apache.org/maven2/maven-model)
- Maven Plugin API (http://maven.apache.org/maven-plugin-api)
- Maven Profile Model (http://maven.apache.org/maven2/maven-profile)
- Maven Project Builder (http://maven.apache.org/maven2/maven-project)
- Maven Repository Metadata Model
(http://maven.apache.org/maven2/maven-repository-metadata)
- Maven Wagon API
This product includes/uses software(s) developed by 'Codehaus'
(http://www.codehaus.org/)
- Plexus Archiver Component
- Default Plexus Container
- Plexus Common Utilities
This product includes/uses software(s) developed by 'ObjectWeb'
(http://www.objectweb.org/)
- ASM All (http://asm.objectweb.org/asm-all)
This product includes/uses software(s) developed by 'The Apache Software
Foundation' (http://www.apache.org/)
- Commons IO (http://jakarta.apache.org/commons/io/)
This product includes/uses software(s) developed by 'The Codehaus'
(http://codehaus.org/)
- classworlds (http://classworlds.codehaus.org/)
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Handling of LICENSE and NOTICE file
Posted by Guillaume Nodet <gn...@gmail.com>.
I've just tried it on servicemix and it works fine, even when using the
maven bundle plugin :-)
On Dec 17, 2007 7:21 PM, Carsten Ziegeler <cz...@apache.org> wrote:
> Guillaume Nodet schrieb:
> > FYI, the benefits of using the maven-remote-resources-plugin IIRC is
> that
> > these NOTICE and LICENSE files are also included in the javadoc and
> source
> > jars generated by maven (which is a bit of a pain if you don't use it
> > afaik).
> >
> I looked briefly into it, and it seems that it might help us. I'll
> further investigate
>
> Thanks
> Carsten
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Re: Handling of LICENSE and NOTICE file
Posted by Carsten Ziegeler <cz...@apache.org>.
Guillaume Nodet schrieb:
> FYI, the benefits of using the maven-remote-resources-plugin IIRC is that
> these NOTICE and LICENSE files are also included in the javadoc and source
> jars generated by maven (which is a bit of a pain if you don't use it
> afaik).
>
I looked briefly into it, and it seems that it might help us. I'll
further investigate
Thanks
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Handling of LICENSE and NOTICE file
Posted by Guillaume Nodet <gn...@gmail.com>.
FYI, the benefits of using the maven-remote-resources-plugin IIRC is that
these NOTICE and LICENSE files are also included in the javadoc and source
jars generated by maven (which is a bit of a pain if you don't use it
afaik).
On Dec 17, 2007 9:45 AM, Guillaume Nodet <gn...@gmail.com> wrote:
> Maven does provide support for these files.
> The correct way is to use the maven-remote-resources-plugin and use the
> apache resource set for example.
> Unfortunately, this is incompatible with bundles because the BND tool
> won't include these easily
>
>
> On Dec 17, 2007 9:38 AM, Carsten Ziegeler <cz...@apache.org> 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.
> >
> > WDYT?
> > Carsten
> >
> > --
> > Carsten Ziegeler
> > cziegeler@apache.org
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Re: Handling of LICENSE and NOTICE file
Posted by Stuart McCulloch <st...@jayway.net>.
On 17/12/2007, Carsten Ziegeler <cz...@apache.org> wrote:
>
> Guillaume Nodet wrote:
> > Maven does provide support for these files.
> > The correct way is to use the maven-remote-resources-plugin and use the
> > apache resource set for example.
> Can you give an example? I thought that the
> maven-remote-resources-plugin is for "remote" resources which means
> resources I haven't locally in my sub project.
>
> > Unfortunately, this is incompatible with bundles because the BND tool
> won't
> > include these easily
> :) Ok, I think this is a show stopper for us.
well, the 1.1.0-SNAPSHOT bundleplugin shpuld happily include the files in
your initial example
wrt. remote resources - if they're copied to target/classes then they'd need
additional include
directives to get them into the final bundle
Carsten
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Cheers, Stuart
Re: Handling of LICENSE and NOTICE file
Posted by Guillaume Nodet <gn...@gmail.com>.
http://svn.apache.org/repos/asf/incubator/cxf/trunk/parent/pom.xml
On Dec 17, 2007 10:03 AM, Carsten Ziegeler <cz...@apache.org> wrote:
> Guillaume Nodet wrote:
> > Maven does provide support for these files.
> > The correct way is to use the maven-remote-resources-plugin and use the
> > apache resource set for example.
> Can you give an example? I thought that the
> maven-remote-resources-plugin is for "remote" resources which means
> resources I haven't locally in my sub project.
http://svn.apache.org/repos/asf/incubator/cxf/trunk/parent/pom.xml
You're right, you need to create a jar for these resources.
>
>
> > Unfortunately, this is incompatible with bundles because the BND tool
> won't
> > include these easily
> :) Ok, I think this is a show stopper for us.
I guess there are workarounds. Using the plugin to put the resources in a
folder and add these folders to the list of maven resources, so that the
bundle plugin will grab them. I haven't tested that yet, but this is on my
todo list.
I will investigate asap.
>
> Carsten
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Re: Handling of LICENSE and NOTICE file
Posted by Carsten Ziegeler <cz...@apache.org>.
Guillaume Nodet wrote:
> Maven does provide support for these files.
> The correct way is to use the maven-remote-resources-plugin and use the
> apache resource set for example.
Can you give an example? I thought that the
maven-remote-resources-plugin is for "remote" resources which means
resources I haven't locally in my sub project.
> Unfortunately, this is incompatible with bundles because the BND tool won't
> include these easily
:) Ok, I think this is a show stopper for us.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Handling of LICENSE and NOTICE file
Posted by Guillaume Nodet <gn...@gmail.com>.
Maven does provide support for these files.
The correct way is to use the maven-remote-resources-plugin and use the
apache resource set for example.
Unfortunately, this is incompatible with bundles because the BND tool won't
include these easily
On Dec 17, 2007 9:38 AM, Carsten Ziegeler <cz...@apache.org> 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.
>
> WDYT?
> Carsten
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Re: Handling of LICENSE and NOTICE file
Posted by Stuart McCulloch <st...@jayway.net>.
On 17/12/2007, Carsten Ziegeler <cz...@apache.org> 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
> cziegeler@apache.org
>
--
Cheers, Stuart