From 2df42e4460fa5f0d87363672e305c88d9f30b093 Mon Sep 17 00:00:00 2001 From: mrsolo Date: Thu, 9 Jan 2014 13:44:04 -0800 Subject: [PATCH] Added licene-maven-plugin to build The plugin adds basic checks for license headers. At this stage we only enable checks for java source files. Other files are omitted at this point. --- dev-tools/elasticsearch_license_header.txt | 16 ++++++++++ dev-tools/license_header_definition.xml | 13 ++++++++ pom.xml | 35 +++++++++++++++++++++- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 dev-tools/elasticsearch_license_header.txt create mode 100644 dev-tools/license_header_definition.xml diff --git a/dev-tools/elasticsearch_license_header.txt b/dev-tools/elasticsearch_license_header.txt new file mode 100644 index 00000000000..ca943323401 --- /dev/null +++ b/dev-tools/elasticsearch_license_header.txt @@ -0,0 +1,16 @@ +Licensed to Elasticsearch under one or more contributor +license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright +ownership. Elasticsearch licenses this file to you under +the Apache License, Version 2.0 (the "License"); you may +not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. diff --git a/dev-tools/license_header_definition.xml b/dev-tools/license_header_definition.xml new file mode 100644 index 00000000000..cfe25e67bc2 --- /dev/null +++ b/dev-tools/license_header_definition.xml @@ -0,0 +1,13 @@ + + + + /* + * + */ + + (\s|\t)*/\*.*$ + .*\*/(\s|\t)*$ + false + true + + diff --git a/pom.xml b/pom.xml index 4776cbd67a5..f1c56bd4ac4 100644 --- a/pom.xml +++ b/pom.xml @@ -1073,7 +1073,40 @@ - + + com.mycila + license-maven-plugin + 2.5 + +
dev-tools/elasticsearch_license_header.txt
+ + dev-tools/license_header_definition.xml + + + src/main/java/org/elasticsearch/**/*.java + src/test/java/org/elasticsearch/**/*.java + + + src/main/java/org/elasticsearch/common/inject/** + src/main/java/org/elasticsearch/common/geo/GeoHashUtils.java + src/main/java/org/elasticsearch/common/lucene/search/XBooleanFilter.java + src/main/java/org/elasticsearch/common/lucene/search/XFilteredQuery.java + src/main/java/org/apache/lucene/queryparser/XSimpleQueryParser.java + src/main/java/org/apache/lucene/**/X*.java + +
+ +
+