Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update about html's. #829

Merged
merged 1 commit into from Jan 21, 2019
Merged

Conversation

boaks
Copy link
Contributor

@boaks boaks commented Dec 17, 2018

Introduce license-maven-plugin.
Rename license of netty to include netty in the name.

Signed-off-by: Achim Kraus achim.kraus@bosch-si.com

@boaks boaks added this to the 2.0.0-M13 milestone Dec 17, 2018
@boaks boaks mentioned this pull request Dec 17, 2018
@boaks boaks force-pushed the license_update branch 2 times, most recently from 6c66a9e to 62fdfbe Compare December 20, 2018 13:58
Copy link
Contributor

@sbernard31 sbernard31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I well understand with this PR, "default build" will now generate a list of license dependencies for each project ?
Why do we need to do that ?

I tried to run the build on my side and I get those warning :

[WARNING] The assembly descriptor contains a filesystem-root relative reference, which is not cross platform compatible /licenses
[WARNING] POM for dependency org.apache.httpcomponents:httpasyncclient has an invalid license URL: LICENSE.txt
[WARNING] Unable to retrieve license for dependency: com.upokecenter:cbor
[WARNING] http://www.creativecommons.org/publicdomain/zero/1.0/
[WARNING] Server returned HTTP response code: 403 for URL: http://www.creativecommons.org/publicdomain/zero/1.0/
[WARNING] Unable to retrieve license for dependency: com.github.peteroupc:numbers
[WARNING] http://www.creativecommons.org/publicdomain/zero/1.0/
[WARNING] Server returned HTTP response code: 403 for URL: http://www.creativecommons.org/publicdomain/zero/1.0/

(Curiosity question : Why do we embed LICENSE-2.0-netty.txt too ?)

@@ -0,0 +1,72 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding the slf4j licence ?

@boaks
Copy link
Contributor Author

boaks commented Jan 7, 2019

The main idea of the PR was to clean up the referred licenses, because some components (e.g. serial execution) has changed. The idea to use the plugin was to verify, that we have the correct list.

@boaks
Copy link
Contributor Author

boaks commented Jan 7, 2019

I stick to the pattern I found in the "abouts" and available license files,
I'm not sure, what the best practice is.

@sbernard31
Copy link
Contributor

So we generate a list of license and check manually, if information in "abouts" are OK ?

@boaks
Copy link
Contributor Author

boaks commented Jan 7, 2019

That was my idea. The list is short, I just want to ensure, that we don't miss too much ...

@sbernard31
Copy link
Contributor

Ok so we don't need to generate this at each build, but just when we need to check it ?

@boaks
Copy link
Contributor Author

boaks commented Jan 7, 2019

Yes, that would be a good improvement.

@sbernard31
Copy link
Contributor

I create a branch based on this PR with only 2 commits.

One commit to remove the license of project dependencies.
Another one to remove the "license download" by default.

When we need to get license of project dependencies to update "abouts" manually we can use :

mvn license:download-licenses 

Just cherry-picks (and squash in this PR), commits which makes sense to you.

@boaks
Copy link
Contributor Author

boaks commented Jan 10, 2019

Thanks! I will have a look on that, if other tasks are finished :-).

@boaks
Copy link
Contributor Author

boaks commented Jan 11, 2019

I moved the optional "download-licenses" into a profile. Using mvn license:download-licenses seems to ignore the configuration, which excludes test and californium-own licenses. As profile, the excludes works.

@boaks
Copy link
Contributor Author

boaks commented Jan 11, 2019

I think, using 3rd-party stuff comes mostly with a licenses, which instructs you to copy the licenses, if you use it. Therefore, I think keeping the MIT and APACHE licenses should be the right way. Now the about mentions precise, which 3rd-party component uses which license, so the 3rd-party-component name in the licenses (introduced prior to me) seems to be obsolete. Therefore I removed the name from the license files.

@boaks
Copy link
Contributor Author

boaks commented Jan 11, 2019

I would like to keep the

		<fileSet>
			<directory>${project.build.directory}/generated-resources</directory>
			<outputDirectory>/licenses</outputDirectory>
			<useDefaultExcludes>false</useDefaultExcludes>
			<!--includes/>
			<excludes/-->
		</fileSet>

may be in the future "some apps" can use that dowloaded licenses to display them.
If the download-licenses is not active, nothing is included in the jar, so it doesn't harm.

@boaks
Copy link
Contributor Author

boaks commented Jan 11, 2019

Would it be possible, to copy the from the modules "resources" also from a parents "resources"? Then only one copy of the about.html, edl-v10.html, epl-v10.html, and notice.html would be required and only on "about.html" need to be maintained.

@sbernard31
Copy link
Contributor

My feeling on this below but feel free to do as you prefer.

I think, using 3rd-party stuff comes mostly with a licenses, which instructs you to copy the licenses, if you use it.

AFAIK, including license is generally not about using it but more about redistribution or modification. Here I'm not sure we should consider we redistribute it. We just depend on it.

Another point, Eclipse Foundation is pretty meticulous with license and since years I work with them, I never get a remark about this point (I mean including license of dependencies).

So, personally I would not to integrate it.

may be in the future "some apps" can use that dowloaded licenses to display them.

Personally, I would wait those "apps" exist before to integrate modification for them.

Would it be possible, to copy the from the modules "resources" also from a parents "resources"?

I'm not sure if I get the point correctly but I suppose you could add resources which references files or folders in parent directory ?

  1. Put your license files in a parent/licences directory, then add this folder to resources of child project like this :
<build>
  <resources>
    <!-- re-add the defaul directory if you need it, or just in case someone expects it was configured as usual -->
    <resource>
	<directory>src/main/resources</directory>
    </resource>
    <resource>
      <directory>../licenses</directory>
    </resource>
  </resources>
  <plugins>
   ... ...
  1. another solution, more verbose but without creating a licences folder using includes instead of directory
<build>
  <resources>
    <!-- it seems to me you need to put again the default resource directory -->
    <resource>
	<directory>src/main/resources</directory>
    </resource>
    <resource>
      <directory>..</directory>
        <includes>
             <include>yourlicensefile.html</include>
       	     <include>anotherlicensefile.html</include></includes>
        </resource>
    </resource>
  </resources>
  <plugins>
  ... ...

But here also I feel this a bit overkill.
Having :

  • license file at the source code root folder.
  • for binary jar we deliver, generally there is a MANIFEST.MF which is generated and contains :
Bundle-License: http://www.eclipse.org/org/documents/epl-v10.php, http
 ://www.eclipse.org/org/documents/edl-v10.php

(Eventually you can add header to the pom.xml which contains the license too)

<!--
Copyright (c) 201? Institute for Pervasive Computing, ETH Zurich and others.

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
and Eclipse Distribution License v1.0 which accompany this distribution.

The Eclipse Public License is available at
   http://www.eclipse.org/legal/epl-v10.html
and the Eclipse Distribution License is available at
   http://www.eclipse.org/org/documents/edl-v10.html.
-->
  • for source jar we deliver, almost all files have the copyright/license hearder.

That sounds enough for me.

@sophokles73
Copy link
Contributor

In Hono we use a separate module legal which contains the about, licenses etc. in a central place. In the other modules we use the maven dependency plugin to copy the content of the legal module to the local build folder. This way we maintain all of the relevant legal docs in one place only.

BTW Simon is right in that the obligation to include license and other notice files only affects dependencies that we re-distribute. This includes all third party dependencies that are required during runtime and their transitive deps. We do not need to include dependencies that are used during build and test only.

@sbernard31
Copy link
Contributor

Using a legal module which will be unpack by maven-dependency-plugin sounds a good idea too. (maybe better than adding a simple resource)

About having a list of licenses, I discover recently maven-project-info-reports-plugin plug-in which generates reports.
E.g. : Just run : mvn project-info-reports:dependencies
And look at : target/site/dependencies.html

This includes all third party dependencies that are required during runtime and their transitive deps.

It's hard to find clear information about that but as I understand "dependency" does not mean "distribution". For me there is distribution only if we provide an archive which contain the third party code.

So for example, californium-core depends on org.slf4j but does not include it in it jar => so no need to add the MIT licence in this jar.
For project where we include it like demo-apps, here license should be include. Generally this should be done automatically as all jars are merged in one and so all licenses should be added (except if there is a file name conflict).

(Here some source about that : https://www.apache.org/dev/licensing-howto.html)

@boaks
Copy link
Contributor Author

boaks commented Jan 15, 2019

So:

  • build a legal module with the update about.html, the eclipse, apache and mit license files and notice.html.
  • keep the license downloader optional, so that the verification is a little easier.
  • for the demos I didn't check the license right now, but I will do that to complete this PR.

FMPOV, I would prefer to include the licenses in all jars. It's for me not only about the "letters in the license", it's also about appreciate the used work of others. And with a common legal module and the license downloader to required time seem to be fair for me.

@boaks boaks force-pushed the license_update branch 2 times, most recently from b512468 to 1097370 Compare January 17, 2019 10:14
@boaks
Copy link
Contributor Author

boaks commented Jan 17, 2019

OK, I'm done.

  • the about.html is update
  • the legal module is added
  • other modules depend on that and their legal is removed.

Introduce license-maven-plugin. Add legal module. Remove legals from
other modules and include the legal module as dependency.

Signed-off-by: Achim Kraus <achim.kraus@bosch-si.com>
@boaks boaks merged commit 96fba6c into eclipse-californium:2.0.x Jan 21, 2019
@boaks boaks deleted the license_update branch April 5, 2019 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants