From 087f1e3126355e0829da43a7449ef694998a4939 Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Mon, 13 Feb 2012 14:12:59 +0000 Subject: [PATCH] LUCENE-3774: Optimized and streamlined license and notice file validation by refactoring the build task into an ANT task and modifying build scripts to perform top-level checks. (Dawid Weiss, Steve Rowe, Robert Muir) git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1243527 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 3 + lucene/CHANGES.txt | 4 + lucene/build.xml | 6 + lucene/common-build.xml | 56 ++-- lucene/contrib/contrib-build.xml | 2 +- .../contrib/misc/ant_lib/cpptasks-NOTICE.txt | 4 + lucene/lib/ant-junit-NOTICE.txt | 6 + lucene/tools/build.xml | 10 +- lucene/tools/custom-tasks.xml | 59 ++++ lucene/tools/src/java/lucene-solr.antlib.xml | 5 + .../lucene/validation/DependencyChecker.java | 282 ------------------ .../lucene/validation/LicenseCheckTask.java | 179 +++++++++++ .../apache/lucene/validation/LicenseType.java | 22 +- ...=> morfologik-polish-LICENSE-COMPOUND.txt} | 1 + .../lib/morfologik-polish-NOTICE.txt | 5 +- modules/build.xml | 110 ++----- solr/build.xml | 19 +- solr/common-build.xml | 42 +-- ...L.txt => jackson-core-asl-LICENSE-ASL.txt} | 0 ...NOTICE.txt => jackson-core-asl-NOTICE.txt} | 0 ...nic-LICENSE.txt => jsonic-LICENSE-ASL.txt} | 0 solr/contrib/langid/lib/jsonic-NOTICE.txt | 3 + ...LICENSE.txt => langdetect-LICENSE-ASL.txt} | 0 solr/contrib/langid/lib/langdetect-NOTICE.txt | 3 + solr/lib/slf4j-api-LICENSE-BSD_LIKE.txt | 21 -- solr/lib/slf4j-api-NOTICE.txt | 25 -- 26 files changed, 362 insertions(+), 505 deletions(-) create mode 100644 lucene/contrib/misc/ant_lib/cpptasks-NOTICE.txt create mode 100644 lucene/lib/ant-junit-NOTICE.txt create mode 100644 lucene/tools/custom-tasks.xml create mode 100644 lucene/tools/src/java/lucene-solr.antlib.xml delete mode 100644 lucene/tools/src/java/org/apache/lucene/validation/DependencyChecker.java create mode 100644 lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java rename modules/analysis/morfologik/lib/{morfologik-polish-LICENSE-MPL-BSD.txt => morfologik-polish-LICENSE-COMPOUND.txt} (99%) rename solr/contrib/clustering/lib/{jackson-core-LICENSE-ASL.txt => jackson-core-asl-LICENSE-ASL.txt} (100%) rename solr/contrib/clustering/lib/{jackson-core-NOTICE.txt => jackson-core-asl-NOTICE.txt} (100%) rename solr/contrib/langid/lib/{jsonic-LICENSE.txt => jsonic-LICENSE-ASL.txt} (100%) create mode 100644 solr/contrib/langid/lib/jsonic-NOTICE.txt rename solr/contrib/langid/lib/{langdetect-LICENSE.txt => langdetect-LICENSE-ASL.txt} (100%) create mode 100644 solr/contrib/langid/lib/langdetect-NOTICE.txt delete mode 100644 solr/lib/slf4j-api-LICENSE-BSD_LIKE.txt delete mode 100644 solr/lib/slf4j-api-NOTICE.txt diff --git a/build.xml b/build.xml index 262e480f143..4b3ab6e083e 100644 --- a/build.xml +++ b/build.xml @@ -27,6 +27,7 @@ + @@ -36,6 +37,7 @@ + @@ -43,6 +45,7 @@ + diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index a2909216e5e..0a08db54d69 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -641,6 +641,10 @@ New features Optimizations +* LUCENE-3774: Optimized and streamlined license and notice file validation + by refactoring the build task into an ANT task and modifying build scripts + to perform top-level checks. (Dawid Weiss, Steve Rowe, Robert Muir) + * LUCENE-2588: Don't store unnecessary suffixes when writing the terms index, saving RAM in IndexReader; change default terms index interval from 128 to 32, because the terms index now requires much diff --git a/lucene/build.xml b/lucene/build.xml index 1b8c569f6c2..6e5591adece 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -44,6 +44,7 @@ + @@ -172,6 +173,11 @@ + + + + + diff --git a/lucene/common-build.xml b/lucene/common-build.xml index ce77fd87466..8a9655f1a3c 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -62,10 +62,6 @@ - - - - @@ -204,16 +200,17 @@ - - - - - - - + /> + + + + + + + @@ -225,6 +222,9 @@ excludes="**/pom.xml,**/*.iml,site/build/" /> + + + @@ -678,11 +678,11 @@ Tests failed! - - + + - + @@ -820,12 +820,14 @@ + + - - - - - - - - - - - - - - - - - + + - diff --git a/lucene/contrib/contrib-build.xml b/lucene/contrib/contrib-build.xml index 5a9a2a088df..a64d9f2bfa5 100644 --- a/lucene/contrib/contrib-build.xml +++ b/lucene/contrib/contrib-build.xml @@ -24,7 +24,7 @@ - + diff --git a/lucene/contrib/misc/ant_lib/cpptasks-NOTICE.txt b/lucene/contrib/misc/ant_lib/cpptasks-NOTICE.txt new file mode 100644 index 00000000000..f2e411f2b4c --- /dev/null +++ b/lucene/contrib/misc/ant_lib/cpptasks-NOTICE.txt @@ -0,0 +1,4 @@ +cpptasks for Apache Ant + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). diff --git a/lucene/lib/ant-junit-NOTICE.txt b/lucene/lib/ant-junit-NOTICE.txt new file mode 100644 index 00000000000..203ed03c8b6 --- /dev/null +++ b/lucene/lib/ant-junit-NOTICE.txt @@ -0,0 +1,6 @@ +Apache Ant +Copyright 1999-2008 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/lucene/tools/build.xml b/lucene/tools/build.xml index 2b3c2bf0a1e..ab07276a069 100644 --- a/lucene/tools/build.xml +++ b/lucene/tools/build.xml @@ -31,9 +31,13 @@ classpath reference when compiling, and to not attempt to copy non-existent resource files to the build output directory. --> - - + + + + + - + diff --git a/lucene/tools/custom-tasks.xml b/lucene/tools/custom-tasks.xml new file mode 100644 index 00000000000..407f0075951 --- /dev/null +++ b/lucene/tools/custom-tasks.xml @@ -0,0 +1,59 @@ + + + + This file is designed for importing into a main build file, and not intended + for standalone use. + + + + + + + + + + + + + + + + License check under: @{dir} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lucene/tools/src/java/lucene-solr.antlib.xml b/lucene/tools/src/java/lucene-solr.antlib.xml new file mode 100644 index 00000000000..21ad34599ca --- /dev/null +++ b/lucene/tools/src/java/lucene-solr.antlib.xml @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/lucene/tools/src/java/org/apache/lucene/validation/DependencyChecker.java b/lucene/tools/src/java/org/apache/lucene/validation/DependencyChecker.java deleted file mode 100644 index a15de1109b8..00000000000 --- a/lucene/tools/src/java/org/apache/lucene/validation/DependencyChecker.java +++ /dev/null @@ -1,282 +0,0 @@ -package org.apache.lucene.validation; -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF 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. - */ - -import java.io.File; -import java.io.FileFilter; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * - * - **/ -public class DependencyChecker { - private static Set excludes = new HashSet(); - private static final String LINE_SEPARATOR = System.getProperty("line.separator"); - - static { - //Collections.addAll(excludes, ); - } - - public static void main(String[] args) throws IOException { - String dumpFile = null; - List dirs = new ArrayList(); - for (int i = 0; i < args.length; i++) { - if (args[i].equalsIgnoreCase("--dump") || args[i].equalsIgnoreCase("-d")) { - dumpFile = args[++i]; - - } else if (args[i].equalsIgnoreCase("--check") || args[i].equalsIgnoreCase("-c")) { - dirs.add(args[++i]); - } - } - - - FileWriter writer = null; - boolean dump = false; - if (dumpFile != null) { - File out = new File(dumpFile); - System.out.println("Dumping to " + out); - writer = new FileWriter(out); - dump = true; - } - //TODO: put in NOTICE checks - for (String checkDir : dirs) { - File dir = new File(checkDir); - if (dir.exists()) { - System.out.println("----------------------"); - System.out.println("Starting on dir: " + dir); - int numFailed = 0; - File[] list = dir.listFiles(); - File[] licFiles = dir.listFiles(new FileFilter() { - public boolean accept(File file) { - return file.getName().indexOf("-LICENSE") != -1 && file.getName().endsWith(".txt");//check for a consistent end, so that we aren't fooled by emacs ~ files or other temp files - } - }); - File[] noticeFiles = dir.listFiles(new FileFilter() { - public boolean accept(File file) { - return file.getName().indexOf("-NOTICE") != -1 && file.getName().endsWith(".txt"); - } - }); - File[] jarFiles = dir.listFiles(new FileFilter() { - public boolean accept(File file) { - return file.getName().endsWith(".jar"); - } - }); - if (licFiles.length == 0 && jarFiles.length != 0) { - System.out.println("No license files found: " + dir); - numFailed++; - } - if (jarFiles.length != licFiles.length) { - System.out.println("WARNING: There are missing LICENSE files in: " + dir + " Jar file count: " + jarFiles.length + " License Count: " + licFiles.length); - printDiffs(jarFiles, licFiles); - numFailed++; - } - if (jarFiles.length != noticeFiles.length) { - System.out.println("WARNING: There may be missing NOTICE files in: " + dir + ". Note, not all files require a NOTICE. Jar file count: " + jarFiles.length + " Notice Count: " + noticeFiles.length); - //printDiffs(jarFiles, noticeFiles); - } - Map licenseNames = new HashMap(); - for (int i = 0; i < licFiles.length; i++) { - licenseNames.put(licFiles[i].getName(), new UpdateableInt()); - } - Map noticeNames = new HashMap(); - for (int i = 0; i < noticeFiles.length; i++) { - noticeNames.put(noticeFiles[i].getName(), new UpdateableInt()); - } - - - for (int i = 0; i < list.length; i++) { - File file = list[i]; - String fileName = file.getName(); - if (fileName.endsWith(".jar") && excludes.contains(fileName) == false) { - File licFile = getLicenseFile(file, licenseNames); - if (licFile != null && licFile.exists()) { - String licName = licFile.getName(); - LicenseType[] types = getLicenseTypes(licName); - if (types != null && types.length > 0) { - for (int j = 0; j < types.length; j++) { - LicenseType type = types[j]; - if (dump == true) { - writer.write(file.getName() + "," + type.getDisplay() + LINE_SEPARATOR); - } - if (type.isNoticeRequired()) { - File noticeFile = getNoticeFile(file, noticeNames); - if (noticeFile != null && noticeFile.exists()) { - - } else { - System.out.println("!!!!!! Missing NOTICE file for " + file + " and license type: " + type.getDisplay()); - if (dump) { - writer.write("Missing NOTICE file for " + file + LINE_SEPARATOR); - } - numFailed++; - } - } - } - } else { - System.out.println("!!!!!! Couldn't determine license type for file: " + file); - if (dump == true) { - writer.write("Invalid license for file: " + file + LINE_SEPARATOR); - } - numFailed++; - } - } else { - System.out.println("!!!!!!! Couldn't get license file for " + file); - if (dump == true) { - writer.write("Couldn't get license file for " + file + LINE_SEPARATOR); - } - numFailed++; - } - } - } - if (dump == true) { - writer.write(LINE_SEPARATOR + LINE_SEPARATOR); - writer.write("Other Licenses (installer, javascript, etc." + LINE_SEPARATOR); - } - - if (dump == true) { - for (Map.Entry entry : licenseNames.entrySet()) { - if (entry.getValue().theInt == 0) { - LicenseType[] types = getLicenseTypes(entry.getKey()); - if (types != null && types.length > 0) { - for (int i = 0; i < types.length; i++) { - writer.write(entry.getKey() + "," + types[i].getDisplay() + LINE_SEPARATOR); - } - } else { - System.out.println("Couldn't determine license for: " + entry.getKey()); - } - } - } - } - if (writer != null) { - writer.close(); - } - if (numFailed > 0) { - System.out.println("At least one file does not have a license, or it's license name is not in the proper format. See the logs."); - System.exit(-1); - } else { - System.out.println("Found a license for every file in " + dir); - } - } else { - System.out.println("Could not find directory:" + dir); - } - } - } - - - /** - * Sort the two lists and then print them out for visual comparison - * - * @param left - * @param right - */ - - private static void printDiffs(File[] left, File[] right) { - Arrays.sort(left); - Arrays.sort(right); - System.out.println("Left\t\t\tRight"); - System.out.println("----------------"); - StringBuilder bldr = new StringBuilder(); - int i = 0; - for (; i < left.length; i++) { - bldr.append(left[i]).append("\t\t\t"); - if (i < right.length) { - bldr.append(right[i]); - } - bldr.append(LINE_SEPARATOR); - } - if (i < right.length) { - for (; i < right.length; i++) { - bldr.append("--- N/A ---\t\t\t").append(right[i]).append(LINE_SEPARATOR); - } - } - System.out.println(bldr.toString()); - System.out.println("----------------"); - } - - private static LicenseType[] getLicenseTypes(String licName) { - LicenseType[] result = new LicenseType[0]; - int idx = licName.lastIndexOf("-"); - if (idx != -1) { - String licAbbrev = licName.substring(idx + 1, licName.length() - ".txt".length()); - String[] lics = licAbbrev.split("__"); - result = new LicenseType[lics.length]; - for (int j = 0; j < lics.length; j++) { - try { - result[j] = LicenseType.valueOf(lics[j].toUpperCase()); - } catch (IllegalArgumentException e) { - System.out.println("Invalid license: " + lics[j].toUpperCase() + " for " + licName); - } - } - } - return result; - } - - private static File getLicenseFile(File file, Map licenseNames) { - File result = null; - String filename = file.getName(); - int length = 0; - for (String licName : licenseNames.keySet()) { - String prefix = licName.substring(0, licName.indexOf("-LICENSE")); - String name = null; - //System.out.println("prefix: " + prefix + " lic name: " + licName); - if (filename.toLowerCase().startsWith(prefix.toLowerCase())) { - result = new File(file.getParentFile(), licName); - UpdateableInt ui = licenseNames.get(licName); - ui.theInt++; - } else { - } - - } - //System.out.println("License File: " + result + " for file: " + file); - - return result; - } - - private static File getNoticeFile(File file, Map noticeNames) { - File result = null; - String filename = file.getName(); - int length = 0; - for (String noticeName : noticeNames.keySet()) { - String prefix = noticeName.substring(0, noticeName.indexOf("-NOTICE")); - String name = null; - //System.out.println("prefix: " + prefix + " lic name: " + licName); - if (filename.toLowerCase().startsWith(prefix.toLowerCase())) { - result = new File(file.getParentFile(), noticeName); - UpdateableInt ui = noticeNames.get(noticeName); - ui.theInt++; - } else { - } - - } - //System.out.println("License File: " + result + " for file: " + file); - - return result; - } - -} - -class UpdateableInt { - public int theInt; -} diff --git a/lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java b/lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java new file mode 100644 index 00000000000..f743e501323 --- /dev/null +++ b/lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java @@ -0,0 +1,179 @@ +package org.apache.lucene.validation; + +import java.io.File; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.types.Mapper; +import org.apache.tools.ant.types.Resource; +import org.apache.tools.ant.types.ResourceCollection; +import org.apache.tools.ant.types.resources.FileResource; +import org.apache.tools.ant.types.resources.Resources; +import org.apache.tools.ant.util.FileNameMapper; + +/** + * An ANT task that verifies if JAR file have associated LICENSE + * and NOTICE files. + */ +public class LicenseCheckTask extends Task { + /** + * All JAR files to check. + */ + private Resources jarResources = new Resources(); + + /** + * License file mapper. + */ + private FileNameMapper licenseMapper; + + /** + * A logging level associated with verbose logging. + */ + private int verboseLevel = Project.MSG_VERBOSE; + + /** + * Failure flag. + */ + private boolean failures; + + /** + * Adds a set of JAR resources to check. + */ + public void add(ResourceCollection rc) { + jarResources.add(rc); + } + + /** + * Adds a license mapper. + */ + public void addConfiguredLicenseMapper(Mapper mapper) { + if (licenseMapper != null) { + throw new BuildException("Only one license mapper is allowed."); + } + this.licenseMapper = mapper.getImplementation(); + } + + public void setVerbose(boolean verbose) { + verboseLevel = (verbose ? Project.MSG_INFO : Project.MSG_VERBOSE); + } + + /** + * Execute the task. + */ + @Override + public void execute() throws BuildException { + if (licenseMapper == null) { + throw new BuildException("Expected an embedded ."); + } + + jarResources.setProject(getProject()); + processJars(); + + if (failures) { + throw new BuildException("License check failed. Check the logs."); + } + } + + /** + * Process all JARs. + */ + private void processJars() { + log("Starting scan.", verboseLevel); + long start = System.currentTimeMillis(); + + @SuppressWarnings("unchecked") + Iterator iter = (Iterator) jarResources.iterator(); + int checked = 0; + int errors = 0; + while (iter.hasNext()) { + final Resource r = iter.next(); + if (!r.isExists()) { + throw new BuildException("JAR resource does not exist: " + r.getName()); + } + if (!(r instanceof FileResource)) { + throw new BuildException("Only filesystem resource are supported: " + r.getName() + + ", was: " + r.getClass().getName()); + } + + File jarFile = ((FileResource) r).getFile(); + if (!checkJarFile(jarFile)) { + errors++; + } + checked++; + } + + log(String.format(Locale.ENGLISH, + "Scanned %d JAR file(s) for licenses (in %.2fs.), %d error(s).", + checked, (System.currentTimeMillis() - start) / 1000.0, errors), + errors > 0 ? Project.MSG_ERR : Project.MSG_INFO); + } + + /** + * Check a single JAR file. + */ + private boolean checkJarFile(File jarFile) { + log("Scanning: " + jarFile.getPath(), verboseLevel); + + // Get the expected license path base from the mapper and search for license files. + Map foundLicenses = new LinkedHashMap(); + List expectedLocations = new ArrayList(); +outer: + for (String mappedPath : licenseMapper.mapFileName(jarFile.getPath())) { + for (LicenseType licenseType : LicenseType.values()) { + File licensePath = new File(mappedPath + licenseType.licenseFileSuffix()); + if (licensePath.exists()) { + foundLicenses.put(licensePath, licenseType); + log(" FOUND " + licenseType.name() + " license at " + licensePath.getPath(), + verboseLevel); + // We could continue scanning here to detect duplicate associations? + break outer; + } else { + expectedLocations.add(licensePath); + } + } + } + + // Check for NOTICE files. + for (Map.Entry e : foundLicenses.entrySet()) { + LicenseType license = e.getValue(); + String licensePath = e.getKey().getAbsolutePath(); + String baseName = licensePath.substring( + 0, licensePath.length() - license.licenseFileSuffix().length()); + File noticeFile = new File(baseName + license.noticeFileSuffix()); + + if (noticeFile.exists()) { + log(" FOUND NOTICE file at " + noticeFile.getAbsolutePath(), verboseLevel); + } else { + if (license.isNoticeRequired()) { + this.failures = true; + log("MISSING NOTICE for the license file:\n " + + licensePath + "\n Expected location below:\n " + + noticeFile.getAbsolutePath(), Project.MSG_ERR); + } + } + } + + // In case there is something missing, complain. + if (foundLicenses.isEmpty()) { + this.failures = true; + StringBuilder message = new StringBuilder(); + message.append( + "MISSING LICENSE for the following file:\n " + jarFile.getAbsolutePath() + + "\n Expected locations below:\n"); + for (File location : expectedLocations) { + message.append(" => ").append(location.getAbsolutePath()).append("\n"); + } + log(message.toString(), Project.MSG_ERR); + return false; + } + + return true; + } +} diff --git a/lucene/tools/src/java/org/apache/lucene/validation/LicenseType.java b/lucene/tools/src/java/org/apache/lucene/validation/LicenseType.java index 61f7eb793be..d0ae46dca7c 100644 --- a/lucene/tools/src/java/org/apache/lucene/validation/LicenseType.java +++ b/lucene/tools/src/java/org/apache/lucene/validation/LicenseType.java @@ -23,7 +23,6 @@ package org.apache.lucene.validation; * **/ public enum LicenseType { - ASL("Apache Software License 2.0", true), BSD("Berkeley Software Distribution", true), BSD_LIKE("BSD like license", true),//BSD like just means someone has taken the BSD license and put in their name, copyright, or it's a very similar license. @@ -35,14 +34,12 @@ public enum LicenseType { PD("Public Domain", false), //SUNBCLA("Sun Binary Code License Agreement"), SUN("Sun Open Source License", false), - FAKE("FAKE license - not needed", false) - ; + COMPOUND("Compound license (see NOTICE).", true), + FAKE("FAKE license - not needed", false); private String display; - private boolean noticeRequired; - LicenseType(String display, boolean noticeRequired) { this.display = display; this.noticeRequired = noticeRequired; @@ -56,11 +53,24 @@ public enum LicenseType { return display; } - public String toString() { return "LicenseType{" + "display='" + display + '\'' + '}'; } + + /** + * Expected license file suffix for a given license type. + */ + public String licenseFileSuffix() { + return "-LICENSE-" + this.name() + ".txt"; + } + + /** + * Expected notice file suffix for a given license type. + */ + public String noticeFileSuffix() { + return "-NOTICE.txt"; + } } diff --git a/modules/analysis/morfologik/lib/morfologik-polish-LICENSE-MPL-BSD.txt b/modules/analysis/morfologik/lib/morfologik-polish-LICENSE-COMPOUND.txt similarity index 99% rename from modules/analysis/morfologik/lib/morfologik-polish-LICENSE-MPL-BSD.txt rename to modules/analysis/morfologik/lib/morfologik-polish-LICENSE-COMPOUND.txt index b5887da2131..772cffe13d5 100644 --- a/modules/analysis/morfologik/lib/morfologik-polish-LICENSE-MPL-BSD.txt +++ b/modules/analysis/morfologik/lib/morfologik-polish-LICENSE-COMPOUND.txt @@ -7,6 +7,7 @@ licenced on the terms of (inter alia): GPL, LGPL, MPL or CC-SA licenses. Part-of-speech tags were added in Morfologik project and are not found in the data from sjp.pl. +----- BSD-licensed dictionary of Polish (SGJP) http://sgjp.pl/morfeusz/ diff --git a/modules/analysis/morfologik/lib/morfologik-polish-NOTICE.txt b/modules/analysis/morfologik/lib/morfologik-polish-NOTICE.txt index 6667b14220c..f4d3c6cc7d5 100644 --- a/modules/analysis/morfologik/lib/morfologik-polish-NOTICE.txt +++ b/modules/analysis/morfologik/lib/morfologik-polish-NOTICE.txt @@ -1,8 +1,9 @@ This product includes BSD-licensed software developed by Dawid Weiss and Marcin MiƂkowski (http://morfologik.blogspot.com/). -This product includes data from Polish ispell/myspell dictionary (http://www.sjp.pl/slownik/en/) -licenced on the terms of (inter alia) LGPL and Creative Commons ShareAlike. +This JAR contains and makes use of data from Polish ispell/myspell +dictionaries hosted at http://www.sjp.pl/slownik/en/ and is +licenced on the terms of (inter alia): GPL, LGPL, MPL or CC-SA licenses. This product includes data from BSD-licensed dictionary of Polish (SGJP) (http://sgjp.pl/morfeusz/) diff --git a/modules/build.xml b/modules/build.xml index 6e7dc8c4d43..12e7a69b357 100644 --- a/modules/build.xml +++ b/modules/build.xml @@ -18,111 +18,47 @@ --> - - + + + + + - - - - - - - - - + + + + + + - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - + + - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - + + - diff --git a/solr/build.xml b/solr/build.xml index f57db038d40..65782081c69 100644 --- a/solr/build.xml +++ b/solr/build.xml @@ -130,7 +130,7 @@ + depends="validate, test-jsp, test-core, test-contrib"/> + + + + + + + + + + + + + + + + + diff --git a/solr/common-build.xml b/solr/common-build.xml index a2dc753c7c5..40b325e6a41 100644 --- a/solr/common-build.xml +++ b/solr/common-build.xml @@ -122,48 +122,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - diff --git a/solr/contrib/clustering/lib/jackson-core-LICENSE-ASL.txt b/solr/contrib/clustering/lib/jackson-core-asl-LICENSE-ASL.txt similarity index 100% rename from solr/contrib/clustering/lib/jackson-core-LICENSE-ASL.txt rename to solr/contrib/clustering/lib/jackson-core-asl-LICENSE-ASL.txt diff --git a/solr/contrib/clustering/lib/jackson-core-NOTICE.txt b/solr/contrib/clustering/lib/jackson-core-asl-NOTICE.txt similarity index 100% rename from solr/contrib/clustering/lib/jackson-core-NOTICE.txt rename to solr/contrib/clustering/lib/jackson-core-asl-NOTICE.txt diff --git a/solr/contrib/langid/lib/jsonic-LICENSE.txt b/solr/contrib/langid/lib/jsonic-LICENSE-ASL.txt similarity index 100% rename from solr/contrib/langid/lib/jsonic-LICENSE.txt rename to solr/contrib/langid/lib/jsonic-LICENSE-ASL.txt diff --git a/solr/contrib/langid/lib/jsonic-NOTICE.txt b/solr/contrib/langid/lib/jsonic-NOTICE.txt new file mode 100644 index 00000000000..c34747257b1 --- /dev/null +++ b/solr/contrib/langid/lib/jsonic-NOTICE.txt @@ -0,0 +1,3 @@ + +jsonic - simple json encoder/decoder for java +http://jsonic.sourceforge.jp/ \ No newline at end of file diff --git a/solr/contrib/langid/lib/langdetect-LICENSE.txt b/solr/contrib/langid/lib/langdetect-LICENSE-ASL.txt similarity index 100% rename from solr/contrib/langid/lib/langdetect-LICENSE.txt rename to solr/contrib/langid/lib/langdetect-LICENSE-ASL.txt diff --git a/solr/contrib/langid/lib/langdetect-NOTICE.txt b/solr/contrib/langid/lib/langdetect-NOTICE.txt new file mode 100644 index 00000000000..22a4cff8f57 --- /dev/null +++ b/solr/contrib/langid/lib/langdetect-NOTICE.txt @@ -0,0 +1,3 @@ +langdetect + +http://code.google.com/p/language-detection/ \ No newline at end of file diff --git a/solr/lib/slf4j-api-LICENSE-BSD_LIKE.txt b/solr/lib/slf4j-api-LICENSE-BSD_LIKE.txt deleted file mode 100644 index f5ecafa0074..00000000000 --- a/solr/lib/slf4j-api-LICENSE-BSD_LIKE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2004-2008 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/solr/lib/slf4j-api-NOTICE.txt b/solr/lib/slf4j-api-NOTICE.txt deleted file mode 100644 index cf438946ad9..00000000000 --- a/solr/lib/slf4j-api-NOTICE.txt +++ /dev/null @@ -1,25 +0,0 @@ -========================================================================= -== SLF4J Notice -- http://www.slf4j.org/license.html == -========================================================================= - -Copyright (c) 2004-2008 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.