-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Packaging: Add LICENSE and NOTICE files for all core dependencies #11705
Conversation
Not sure if we need to include these files from the groovy JAR:
Also, would be good to update maven to execute this at build time:
/cc @dadoonet |
About checking at build time: maybe we don't want to do it quite yet? How long does it take the perl script to run? At least we want to start with it working via jenkins on linux... but I agree we want a way for a developer to manually check it before pushing (if that is running a perl script manually in both cases, fine for a start). We could later see if it could be made more portable, e.g. just doing some custom logic in maven-ant-run-plugin here (groovy script or something simple). Maybe it won't be so simple if its in groovy but it means it would work without 'shasum' (windows, etc). Also i couldnt tell if the verification logic will fail on extra license files that shouldn't be there. I see it definitely will for extra sha's: that is really good to see because it keeps everything tidy. Its just an idea for extra paranoia if its not tough to add. |
I think you need to fix you tabs vs. spaces in your editor :) |
@s1monw tabs removed from Lucene license ;) |
about 150ms :)
agreed - although That said, rewriting it in eg java would make it work wherever es works.
The only reason I didn't was because of the extra licensing files for groovy. |
I think you should move the script into the source folder that way it gets packaged and can be used by plugins etc.
if you do this then you can use this diff: diff --git a/pom.xml b/pom.xml
index 304a060..43ce99c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1148,6 +1148,26 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
<version>1.8</version>
<executions>
<execution>
+ <id>check-license</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <condition property="license.exists">
+ <available file="${basedir}/license" type="dir"/>
+ </condition>
+ <echo taskName="license check">Running license check</echo>
+ <exec failonerror="${license.exists}" executable="perl" dir="${elasticsearch.tools.directory}/license-check" >
+ <arg value="check_license_and_sha.pl"/>
+ <arg value="--check"/>
+ <arg value="${basedir}"/>
+ </exec>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
<id>print-jvm</id>
<phase>validate</phase>
<goals> and |
LGTM |
… dependencies Added a licenses/ directory to core which contains a sha1 file for each JAR dependency, and one or more LICENSE files and one NOTICE file for each project. Also adds dev-tools/src/main/resources/license-check/check_license_and_sha.pl which checks that the licenses/ dir is up to date during a mvn verify, and which can be used to update the sha1 files when upgrading dependencies. Closes #2794 Closes #10684 Closes #11705
Packaging: Add LICENSE and NOTICE files for all core dependencies
Also adds
dev-tools/check_license_and_sha.pl
which will ensure that thesha1 file in the licenses/ directory is the same as the sha1 of each
dependency shipped with Elasticsearch, and that each dependency has
a LICENSE file. Can also be used to update the sha1 file when upgrading
dependencies.
Closes #2794
Closes #10684