You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by nk...@apache.org on 2016/02/09 00:07:43 UTC
[2/7] lucene-solr git commit: LUCENE-6938: Fix Lucene's src.tgz file;
remove svnkit stuff
LUCENE-6938: Fix Lucene's src.tgz file; remove svnkit stuff
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f4b228b3
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f4b228b3
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f4b228b3
Branch: refs/heads/branch_5_4
Commit: f4b228b34174e87b1ed43e330b500d8b795604ca
Parents: 7f9506c
Author: Uwe Schindler <us...@apache.org>
Authored: Sat Jan 23 13:47:14 2016 +0100
Committer: nknize <nk...@apache.org>
Committed: Mon Feb 8 17:03:24 2016 -0600
----------------------------------------------------------------------
build.xml | 121 +++-----------------------------------------------
lucene/build.xml | 11 +++--
solr/build.xml | 2 +-
3 files changed, 14 insertions(+), 120 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f4b228b3/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 486f793..4448841 100644
--- a/build.xml
+++ b/build.xml
@@ -20,8 +20,6 @@
<project name="lucene-solr" default="-projecthelp" basedir=".">
<import file="lucene/common-build.xml"/>
- <property name="svnkit.version" value="1.8.10"/>
-
<property name="tests.heap-dump-dir" location="heapdumps"/>
<property name="maven-build-dir" value="maven-build"/>
@@ -45,7 +43,7 @@
</target>
<target name="precommit" description="Run basic checks before committing"
- depends="check-svn-working-copy,validate,documentation-lint"/>
+ depends="check-working-copy,validate,documentation-lint"/>
<target name="test" description="Test both Lucene and Solr" depends="resolve-groovy">
<mkdir dir="lucene/build" />
@@ -561,115 +559,8 @@ File | Project Structure | Platform Settings | SDKs):
<delete dir="${smokeTestRelease.tmp}"/>
</target>
- <macrodef xmlns:ivy="antlib:org.apache.ivy.ant" name="svn-checker">
- <attribute name="failonmodifications" default="true"/> <!-- false if file modifications are allowed -->
- <sequential>
- <ivy:cachepath organisation="org.tmatesoft.svnkit" module="svnkit" revision="${svnkit.version}"
- inline="true" conf="default" transitive="true" pathid="svnkit.classpath"/>
- <local name="svn.checkprops.failed"/>
- <local name="svn.unversioned.failed"/>
- <local name="svn.keywords.failed"/>
- <local name="svn.changed.failed"/>
- <groovy taskname="svn" classpathref="svnkit.classpath"><![CDATA[
- import org.tmatesoft.svn.core.*;
- import org.tmatesoft.svn.core.wc.*;
- import org.apache.tools.ant.Project;
-
- SVNClientManager manager = SVNClientManager.newInstance();
- SVNStatusClient statusClient = manager.getStatusClient();
- SVNWCClient wcClient = manager.getWCClient();
-
- File basedir = new File(properties['basedir']).getAbsoluteFile();
- int baseLen = basedir.toString().length();
-
- // do some fake check, to verify if this is valid SVN working copy. If this fails ignore checks but log some useful message.
- task.log('Initializing working copy...');
- try {
- wcClient.doInfo(basedir, SVNRevision.WORKING);
- } catch (SVNException ex) {
- def ec = ex.getErrorMessage().getErrorCode();
- int code = ec.getCode();
- int category = ec.getCategory();
- if (code == SVNErrorCode.WC_NOT_DIRECTORY.getCode() || code == SVNErrorCode.WC_NOT_FILE.getCode()) {
- task.log('WARNING: Development directory is not an SVN checkout! Disabling checks...', Project.MSG_WARN);
- return;
- } else if (category == SVNErrorCode.WC_CATEGORY) {
- task.log('WARNING: Development directory is not a valid SVN checkout (' + ex.getErrorMessage() + '). Disabling checks...', Project.MSG_WARN);
- return;
- } else {
- throw ex;
- }
- }
-
- def convertRelative = {
- file -> '.' + file.getAbsolutePath().substring(baseLen).replace(File.separatorChar, (char)'/');
- }
-
- Set missingProps = new TreeSet(), withKeywords = new TreeSet(), unversioned = new TreeSet(), changed = new TreeSet();
-
- task.log('Getting all versioned and unversioned files...');
- statusClient.doStatus(basedir, SVNRevision.WORKING, SVNDepth.fromRecurse(true), false, true, false, false, {
- status ->
- SVNStatusType nodeStatus = status.getNodeStatus();
- if (nodeStatus == SVNStatusType.STATUS_UNVERSIONED || nodeStatus == SVNStatusType.STATUS_MISSING) {
- unversioned.add(convertRelative(status.getFile()));
- } else if (status.getKind() == SVNNodeKind.FILE && nodeStatus != SVNStatusType.STATUS_DELETED) {
- missingProps.add(convertRelative(status.getFile()));
- }
- if (nodeStatus == SVNStatusType.STATUS_MODIFIED || nodeStatus == SVNStatusType.STATUS_REPLACED ||
- nodeStatus == SVNStatusType.STATUS_DELETED || nodeStatus == SVNStatusType.STATUS_ADDED) {
- changed.add(convertRelative(status.getFile()));
- }
- } as ISVNStatusHandler, null);
-
- task.log('Filtering files with existing svn:eol-style...');
- wcClient.doGetProperty(basedir, 'svn:eol-style', SVNRevision.WORKING, SVNRevision.WORKING, true, {
- file, prop -> missingProps.remove(convertRelative(file));
- } as ISVNPropertyHandler);
-
- task.log('Filtering files with binary svn:mime-type...');
- wcClient.doGetProperty(basedir, 'svn:mime-type', SVNRevision.WORKING, SVNRevision.WORKING, true, {
- file, prop ->
- prop = SVNPropertyValue.getPropertyAsString(prop.getValue());
- if (prop.startsWith('application/') || prop.startsWith('image/')) {
- missingProps.remove(convertRelative(file));
- }
- } as ISVNPropertyHandler);
-
- task.log('Scanning for files with svn:keywords property...');
- wcClient.doGetProperty(basedir, 'svn:keywords', SVNRevision.WORKING, SVNRevision.WORKING, true, {
- file, prop -> withKeywords.add(convertRelative(file));
- } as ISVNPropertyHandler);
-
- def setProjectPropertyFromSet(prop, set) {
- if (set) {
- properties[prop] = '* ' + set.join(properties['line.separator'] + '* ');
- }
- };
- setProjectPropertyFromSet('svn.checkprops.failed', missingProps);
- setProjectPropertyFromSet('svn.keywords.failed', withKeywords);
- setProjectPropertyFromSet('svn.unversioned.failed', unversioned);
- setProjectPropertyFromSet('svn.changed.failed', changed);
- ]]></groovy>
- <fail if="svn.checkprops.failed"
- message="The following files are missing svn:eol-style (or binary svn:mime-type):${line.separator}${svn.checkprops.failed}"/>
- <fail if="svn.keywords.failed"
- message="The following files have the svn:keywords property set:${line.separator}${svn.keywords.failed}"/>
- <fail if="svn.unversioned.failed"
- message="Source checkout is dirty after running tests!!! Offending files:${line.separator}${svn.unversioned.failed}"/>
- <fail message="Source checkout is modified !!! Offending files:${line.separator}${svn.changed.failed}">
- <condition>
- <and>
- <istrue value="@{failonmodifications}"/>
- <isset property="svn.changed.failed"/>
- </and>
- </condition>
- </fail>
- </sequential>
- </macrodef>
-
- <target name="check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy">
- <svn-checker failonmodifications="false"/>
+ <target name="check-working-copy">
+ <echo>This task is currently disabled due to migration to GIT</echo>
</target>
<target name="run-clover" description="Runs all tests to measure coverage and generates report (pass "ANT_OPTS=-Xmx1536M" as environment)" depends="clean">
@@ -762,8 +653,8 @@ File | Project Structure | Platform Settings | SDKs):
</target>
<!-- should only be called by jenkins, not precommit! -->
- <target name="-check-after-regeneration" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy">
- <svn-checker failonmodifications="true"/>
+ <target name="-check-after-regeneration">
+ <!-- TODO -->
</target>
<!-- TODO: remove me when jenkins works -->
@@ -779,7 +670,7 @@ File | Project Structure | Platform Settings | SDKs):
</target>
<!-- Jenkins tasks -->
- <target name="-jenkins-base" depends="-print-java-info,clean,test-with-heapdumps,validate,documentation-lint,jar-checksums,check-svn-working-copy"/>
+ <target name="-jenkins-base" depends="-print-java-info,clean,test-with-heapdumps,validate,documentation-lint,jar-checksums,check-working-copy"/>
<target name="-print-java-info">
<echo level="info" taskname="java-info">java version "${java.version}"
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f4b228b3/lucene/build.xml
----------------------------------------------------------------------
diff --git a/lucene/build.xml b/lucene/build.xml
index 712e14b..e37c659 100644
--- a/lucene/build.xml
+++ b/lucene/build.xml
@@ -340,7 +340,7 @@
<target name="package-tgz-src" depends="init-dist"
description="--> Generates the Lucene source distribution as .tgz">
<property name="source.package.file"
- value="${dist.dir}/lucene-${version}-src.tgz"/>
+ location="${dist.dir}/lucene-${version}-src.tgz"/>
<delete file="${source.package.file}"/>
<export-source source.dir="."/>
@@ -349,11 +349,14 @@
<!-- Exclude clover license files incompatible with the ASL -->
<delete dir="${src.export.dir}/tools/clover"/>
- <build-changes changes.src.file="${src.export.dir}/CHANGES.txt"
- changes.target.dir="${src.export.dir}/docs/changes"
+ <!-- because we only package the "lucene/" folder, we have to adjust dir to work on: ->
+ <property name="local.src.export.dir" location="${src.export.dir}/lucene"/>
+
+ <build-changes changes.src.file="${local.src.export.dir}/CHANGES.txt"
+ changes.target.dir="${local.src.export.dir}/docs/changes"
changes.product="LUCENE"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
- <tarfileset prefix="lucene-${version}" dir="${src.export.dir}"/>
+ <tarfileset prefix="lucene-${version}" dir="${local.src.export.dir}"/>
</tar>
<make-checksums file="${source.package.file}"/>
</target>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f4b228b3/solr/build.xml
----------------------------------------------------------------------
diff --git a/solr/build.xml b/solr/build.xml
index 1b30dc9..c984243 100644
--- a/solr/build.xml
+++ b/solr/build.xml
@@ -452,7 +452,7 @@
<target name="package-src-tgz" depends="init-dist"
description="Packages the Solr Source Distribution">
<property name="source.package.file"
- value="${package.dir}/${fullnamever}-src.tgz"/>
+ location="${package.dir}/${fullnamever}-src.tgz"/>
<delete file="${source.package.file}" failonerror="false" />
<export-source source.dir=".."/>