mirror of https://github.com/apache/lucene.git
LUCENE-4262: add ivy sync=true, so when resolve runs, only jars that should be there are there
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1366509 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6e91227797
commit
6d2a288be3
|
@ -167,7 +167,7 @@
|
||||||
<target name="validate" depends="check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />
|
<target name="validate" depends="check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />
|
||||||
|
|
||||||
<target name="check-licenses" depends="compile-tools,resolve,load-custom-tasks" description="Validate license stuff.">
|
<target name="check-licenses" depends="compile-tools,resolve,load-custom-tasks" description="Validate license stuff.">
|
||||||
<license-check-macro dir="${basedir}" />
|
<license-check-macro dir="${basedir}" licensedir="${common.dir}/licenses" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="check-forbidden-apis" depends="compile-tools,compile-test,load-custom-tasks,-check-forbidden-jdk-apis,-check-forbidden-test-apis,-check-system-out" description="Check forbidden API calls in compiled class files"/>
|
<target name="check-forbidden-apis" depends="compile-tools,compile-test,load-custom-tasks,-check-forbidden-jdk-apis,-check-forbidden-test-apis,-check-system-out" description="Check forbidden API calls in compiled class files"/>
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
<property name="ivy.resource" value="org/apache/ivy/ant/antlib.xml" />
|
<property name="ivy.resource" value="org/apache/ivy/ant/antlib.xml" />
|
||||||
<available resource="${ivy.resource}" property="ivy.available" />
|
<available resource="${ivy.resource}" property="ivy.available" />
|
||||||
<property name="ivy.default.configuration" value="*"/>
|
<property name="ivy.default.configuration" value="*"/>
|
||||||
|
<property name="ivy.sync" value="true"/>
|
||||||
|
|
||||||
<property name="junit.jar" value="junit-4.10.jar"/>
|
<property name="junit.jar" value="junit-4.10.jar"/>
|
||||||
<property name="junit-location.jar" value="${common.dir}/test-framework/lib/${junit.jar}"/>
|
<property name="junit-location.jar" value="${common.dir}/test-framework/lib/${junit.jar}"/>
|
||||||
|
@ -294,7 +295,7 @@
|
||||||
<!-- todo, make this a property or something.
|
<!-- todo, make this a property or something.
|
||||||
only special cases need bundles -->
|
only special cases need bundles -->
|
||||||
<ivy:retrieve type="jar,bundle" log="download-only"
|
<ivy:retrieve type="jar,bundle" log="download-only"
|
||||||
conf="${ivy.default.configuration}"/>
|
conf="${ivy.default.configuration}" sync="${ivy.sync}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<property name="ivy_install_path" location="${user.home}/.ant/lib" />
|
<property name="ivy_install_path" location="${user.home}/.ant/lib" />
|
||||||
|
|
|
@ -18,12 +18,13 @@
|
||||||
|
|
||||||
<macrodef name="license-check-macro">
|
<macrodef name="license-check-macro">
|
||||||
<attribute name="dir" />
|
<attribute name="dir" />
|
||||||
|
<attribute name="licensedir" />
|
||||||
<element name="additional-excludes" optional="true" />
|
<element name="additional-excludes" optional="true" />
|
||||||
<element name="additional-filters" optional="true" />
|
<element name="additional-filters" optional="true" />
|
||||||
<sequential>
|
<sequential>
|
||||||
<!-- LICENSE and NOTICE verification macro. -->
|
<!-- LICENSE and NOTICE verification macro. -->
|
||||||
<echo>License check under: @{dir}</echo>
|
<echo>License check under: @{dir}</echo>
|
||||||
<licenses>
|
<licenses licenseDirectory="@{licensedir}">
|
||||||
<fileset dir="@{dir}">
|
<fileset dir="@{dir}">
|
||||||
<include name="**/*.jar" />
|
<include name="**/*.jar" />
|
||||||
<!-- Speed up scanning a bit. -->
|
<!-- Speed up scanning a bit. -->
|
||||||
|
|
|
@ -58,6 +58,11 @@ public class LicenseCheckTask extends Task {
|
||||||
* All JAR files to check.
|
* All JAR files to check.
|
||||||
*/
|
*/
|
||||||
private Resources jarResources = new Resources();
|
private Resources jarResources = new Resources();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Directory containing licenses
|
||||||
|
*/
|
||||||
|
private File licenseDirectory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* License file mapper.
|
* License file mapper.
|
||||||
|
@ -94,6 +99,10 @@ public class LicenseCheckTask extends Task {
|
||||||
public void setVerbose(boolean verbose) {
|
public void setVerbose(boolean verbose) {
|
||||||
verboseLevel = (verbose ? Project.MSG_INFO : Project.MSG_VERBOSE);
|
verboseLevel = (verbose ? Project.MSG_INFO : Project.MSG_VERBOSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLicenseDirectory(File file) {
|
||||||
|
licenseDirectory = file;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the task.
|
* Execute the task.
|
||||||
|
@ -153,7 +162,7 @@ public class LicenseCheckTask extends Task {
|
||||||
log("Scanning: " + jarFile.getPath(), verboseLevel);
|
log("Scanning: " + jarFile.getPath(), verboseLevel);
|
||||||
|
|
||||||
// validate the jar matches against our expected hash
|
// validate the jar matches against our expected hash
|
||||||
final File checksumFile = new File(jarFile.getParent(),
|
final File checksumFile = new File(licenseDirectory,
|
||||||
jarFile.getName() + "." + CHECKSUM_TYPE);
|
jarFile.getName() + "." + CHECKSUM_TYPE);
|
||||||
if (! (checksumFile.exists() && checksumFile.canRead()) ) {
|
if (! (checksumFile.exists() && checksumFile.canRead()) ) {
|
||||||
log("MISSING " +CHECKSUM_TYPE+ " checksum file for: " + jarFile.getPath(), Project.MSG_ERR);
|
log("MISSING " +CHECKSUM_TYPE+ " checksum file for: " + jarFile.getPath(), Project.MSG_ERR);
|
||||||
|
@ -200,9 +209,9 @@ public class LicenseCheckTask extends Task {
|
||||||
Map<File, LicenseType> foundLicenses = new LinkedHashMap<File, LicenseType>();
|
Map<File, LicenseType> foundLicenses = new LinkedHashMap<File, LicenseType>();
|
||||||
List<File> expectedLocations = new ArrayList<File>();
|
List<File> expectedLocations = new ArrayList<File>();
|
||||||
outer:
|
outer:
|
||||||
for (String mappedPath : licenseMapper.mapFileName(jarFile.getPath())) {
|
for (String mappedPath : licenseMapper.mapFileName(jarFile.getName())) {
|
||||||
for (LicenseType licenseType : LicenseType.values()) {
|
for (LicenseType licenseType : LicenseType.values()) {
|
||||||
File licensePath = new File(mappedPath + licenseType.licenseFileSuffix());
|
File licensePath = new File(licenseDirectory, mappedPath + licenseType.licenseFileSuffix());
|
||||||
if (licensePath.exists()) {
|
if (licensePath.exists()) {
|
||||||
foundLicenses.put(licensePath, licenseType);
|
foundLicenses.put(licensePath, licenseType);
|
||||||
log(" FOUND " + licenseType.name() + " license at " + licensePath.getPath(),
|
log(" FOUND " + licenseType.name() + " license at " + licensePath.getPath(),
|
||||||
|
@ -218,10 +227,10 @@ outer:
|
||||||
// Check for NOTICE files.
|
// Check for NOTICE files.
|
||||||
for (Map.Entry<File, LicenseType> e : foundLicenses.entrySet()) {
|
for (Map.Entry<File, LicenseType> e : foundLicenses.entrySet()) {
|
||||||
LicenseType license = e.getValue();
|
LicenseType license = e.getValue();
|
||||||
String licensePath = e.getKey().getAbsolutePath();
|
String licensePath = e.getKey().getName();
|
||||||
String baseName = licensePath.substring(
|
String baseName = licensePath.substring(
|
||||||
0, licensePath.length() - license.licenseFileSuffix().length());
|
0, licensePath.length() - license.licenseFileSuffix().length());
|
||||||
File noticeFile = new File(baseName + license.noticeFileSuffix());
|
File noticeFile = new File(licenseDirectory, baseName + license.noticeFileSuffix());
|
||||||
|
|
||||||
if (noticeFile.exists()) {
|
if (noticeFile.exists()) {
|
||||||
log(" FOUND NOTICE file at " + noticeFile.getAbsolutePath(), verboseLevel);
|
log(" FOUND NOTICE file at " + noticeFile.getAbsolutePath(), verboseLevel);
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
<target name="validate" depends="check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />
|
<target name="validate" depends="check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />
|
||||||
|
|
||||||
<target name="check-licenses" depends="compile-tools,resolve,load-custom-tasks" description="Validate license stuff.">
|
<target name="check-licenses" depends="compile-tools,resolve,load-custom-tasks" description="Validate license stuff.">
|
||||||
<license-check-macro dir="${basedir}">
|
<license-check-macro dir="${basedir}" licensedir="${common-solr.dir}/licenses">
|
||||||
<additional-excludes>
|
<additional-excludes>
|
||||||
<!-- Exclude start.jar only (it'd be weird to have a license file there?) -->
|
<!-- Exclude start.jar only (it'd be weird to have a license file there?) -->
|
||||||
<exclude name="example/start.jar" />
|
<exclude name="example/start.jar" />
|
||||||
|
@ -182,10 +182,10 @@
|
||||||
<exclude name="example/solr-webapp/**" />
|
<exclude name="example/solr-webapp/**" />
|
||||||
</additional-excludes>
|
</additional-excludes>
|
||||||
<additional-filters>
|
<additional-filters>
|
||||||
<replaceregex pattern="/jetty([^/]+)$" replace="/jetty" flags="gi" />
|
<replaceregex pattern="jetty([^/]+)$" replace="jetty" flags="gi" />
|
||||||
<replaceregex pattern="/apache-solr-commons-csv-([^/]+)$" replace="/apache-solr-commons-csv" flags="gi" />
|
<replaceregex pattern="apache-solr-commons-csv-([^/]+)$" replace="apache-solr-commons-csv" flags="gi" />
|
||||||
<replaceregex pattern="/slf4j-([^/]+)$" replace="/slf4j" flags="gi" />
|
<replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
|
||||||
<replaceregex pattern="/(bcmail|bcprov)-([^/]+)$" replace="/\1" flags="gi" />
|
<replaceregex pattern="(bcmail|bcprov)-([^/]+)$" replace="\1" flags="gi" />
|
||||||
</additional-filters>
|
</additional-filters>
|
||||||
</license-check-macro>
|
</license-check-macro>
|
||||||
</target>
|
</target>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
fbf7a438e6bf3660e0da2fd77dd1df1635fe503c
|
|
|
@ -1,33 +0,0 @@
|
||||||
ICU License - ICU 1.8.1 and later
|
|
||||||
|
|
||||||
COPYRIGHT AND PERMISSION NOTICE
|
|
||||||
|
|
||||||
Copyright (c) 1995-2012 International Business Machines Corporation and others
|
|
||||||
|
|
||||||
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, and/or sell copies of the
|
|
||||||
Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
provided that the above copyright notice(s) and this permission notice appear
|
|
||||||
in all copies of the Software and that both the above copyright notice(s) and
|
|
||||||
this permission notice appear in supporting documentation.
|
|
||||||
|
|
||||||
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 OF THIRD PARTY RIGHTS.
|
|
||||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
|
|
||||||
LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR
|
|
||||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
|
|
||||||
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
||||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of a copyright holder shall not
|
|
||||||
be used in advertising or otherwise to promote the sale, use or other
|
|
||||||
dealings in this Software without prior written authorization of the
|
|
||||||
copyright holder.
|
|
||||||
|
|
||||||
All trademarks and registered trademarks mentioned herein are the property of
|
|
||||||
their respective owners.
|
|
|
@ -1,3 +0,0 @@
|
||||||
ICU4J, (under modules/analysis/icu) is licensed under an MIT style license
|
|
||||||
(modules/analysis/icu/lib/icu4j-LICENSE-BSD_LIKE.txt) and Copyright (c) 1995-2012
|
|
||||||
International Business Machines Corporation and others
|
|
|
@ -21,6 +21,8 @@
|
||||||
<!-- hackidty-hack-hack -->
|
<!-- hackidty-hack-hack -->
|
||||||
|
|
||||||
<property name="ivy.retrieve.pattern" value="${common-solr.dir}/lib/[artifact]-[revision].[ext]"/>
|
<property name="ivy.retrieve.pattern" value="${common-solr.dir}/lib/[artifact]-[revision].[ext]"/>
|
||||||
|
<!-- we cannot sync because solr/core and solr/solrj share the same lib/... clean this up! -->
|
||||||
|
<property name="ivy.sync" value="false"/>
|
||||||
|
|
||||||
<!-- html file for testing -->
|
<!-- html file for testing -->
|
||||||
<property name="rat.excludes" value="**/htmlStripReaderTest.html"/>
|
<property name="rat.excludes" value="**/htmlStripReaderTest.html"/>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue