From 205262c737193d7fe29af3d97f410d7f5026dd15 Mon Sep 17 00:00:00 2001 From: Clinton Gormley Date: Sun, 9 Aug 2015 18:18:59 +0200 Subject: [PATCH] Enable the license checker over distribution/* and plugins/* Moved the license checker config into the parent pom, and overrede the license dir/target-to-check in distributions/pom. Disabled the license checker explicitly for projects which run integration tests but have no licenses dir: * core * distribution * qa * plugins/delete-by-query * plugins/mapper-size * plugins/site-example Closes #12752 Closes #12754 --- core/pom.xml | 11 +++++++ .../license-check/check_license_and_sha.pl | 3 ++ distribution/pom.xml | 30 +++---------------- plugins/delete-by-query/pom.xml | 11 +++++++ plugins/mapper-size/pom.xml | 11 +++++++ plugins/site-example/pom.xml | 11 +++++++ pom.xml | 25 ++++++++++++++++ qa/pom.xml | 11 +++++++ 8 files changed, 87 insertions(+), 26 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index d4fb7f95342..449ce50350f 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -320,6 +320,17 @@ + + org.apache.maven.plugins + maven-antrun-plugin + + + + check-license + none + + + diff --git a/dev-tools/src/main/resources/license-check/check_license_and_sha.pl b/dev-tools/src/main/resources/license-check/check_license_and_sha.pl index cc5f5b02773..553c7df0155 100755 --- a/dev-tools/src/main/resources/license-check/check_license_and_sha.pl +++ b/dev-tools/src/main/resources/license-check/check_license_and_sha.pl @@ -32,6 +32,9 @@ my $Source = shift(@ARGV) || die usage(); $License_Dir = File::Spec->rel2abs($License_Dir) . '/'; $Source = File::Spec->rel2abs($Source); +print "LICENSE DIR: $License_Dir\n"; +print "SOURCE: $Source\n"; + die "License dir is not a directory: $License_Dir\n" . usage() unless -d $License_Dir; diff --git a/distribution/pom.xml b/distribution/pom.xml index 80bbc98fe6e..cb3bdfc5275 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -29,6 +29,10 @@ /usr/lib/sysctl.d /usr/lib/tmpfiles.d + + ${project.basedir}/../licenses + ${integ.scratch} + /usr/bin/rpmbuild @@ -97,32 +101,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - check-license - verify - - run - - - ${skip.integ.tests} - - - - - Running license check - - - - - - - - - - - org.apache.maven.plugins diff --git a/plugins/delete-by-query/pom.xml b/plugins/delete-by-query/pom.xml index 62ee8fdb9b1..e478a501a2e 100644 --- a/plugins/delete-by-query/pom.xml +++ b/plugins/delete-by-query/pom.xml @@ -38,6 +38,17 @@ governing permissions and limitations under the License. --> org.apache.maven.plugins maven-assembly-plugin + + org.apache.maven.plugins + maven-antrun-plugin + + + + check-license + none + + + diff --git a/plugins/mapper-size/pom.xml b/plugins/mapper-size/pom.xml index cdbb869a702..83e3f84708e 100644 --- a/plugins/mapper-size/pom.xml +++ b/plugins/mapper-size/pom.xml @@ -37,6 +37,17 @@ governing permissions and limitations under the License. --> org.apache.maven.plugins maven-assembly-plugin + + org.apache.maven.plugins + maven-antrun-plugin + + + + check-license + none + + + diff --git a/plugins/site-example/pom.xml b/plugins/site-example/pom.xml index 15060e0bd52..f6b6c3cdb34 100644 --- a/plugins/site-example/pom.xml +++ b/plugins/site-example/pom.xml @@ -42,6 +42,17 @@ + + org.apache.maven.plugins + maven-antrun-plugin + + + + check-license + none + + + diff --git a/pom.xml b/pom.xml index 1e7ca1a6c75..a05f6599caa 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,10 @@ ${elasticsearch.tools.directory}/ant/integration-tests.xml ${elasticsearch.integ.antfile.default} + + ${project.basedir}/licenses + ${basedir}/target/releases/${project.build.finalName}.zip + auto true @@ -1191,6 +1195,27 @@ org.eclipse.jdt.ui.text.custom_code_templates=run + + check-license + verify + + run + + + ${skip.integ.tests} + + Running license check + + + + + + + + + + diff --git a/qa/pom.xml b/qa/pom.xml index c31dc04b456..61e7849a966 100644 --- a/qa/pom.xml +++ b/qa/pom.xml @@ -129,6 +129,17 @@ + + org.apache.maven.plugins + maven-antrun-plugin + + + + check-license + none + + +