You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2015/07/23 17:48:34 UTC
svn commit: r1692411 - in /lucene/dev/branches/branch_5x: build.xml
extra-targets.xml lucene/CHANGES.txt lucene/build.xml
lucene/common-build.xml solr/build.xml solr/common-build.xml
Author: uschindler
Date: Thu Jul 23 15:48:33 2015
New Revision: 1692411
URL: http://svn.apache.org/r1692411
Log:
LUCENE-6693: Updated Groovy to 2.4.4, Pegdown to 1.5, Svnkit to 1.8.10. Also fixed some PermGen errors while running full build caused by these updates: Tasks are now installed from root's build.xml
Removed:
lucene/dev/branches/branch_5x/extra-targets.xml
Modified:
lucene/dev/branches/branch_5x/build.xml
lucene/dev/branches/branch_5x/lucene/CHANGES.txt
lucene/dev/branches/branch_5x/lucene/build.xml
lucene/dev/branches/branch_5x/lucene/common-build.xml
lucene/dev/branches/branch_5x/solr/build.xml
lucene/dev/branches/branch_5x/solr/common-build.xml
Modified: lucene/dev/branches/branch_5x/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/build.xml?rev=1692411&r1=1692410&r2=1692411&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/build.xml (original)
+++ lucene/dev/branches/branch_5x/build.xml Thu Jul 23 15:48:33 2015
@@ -18,20 +18,10 @@
-->
<project name="lucene-solr" default="-projecthelp" basedir=".">
- <!-- Give user a chance to override without editing this file
- (and without typing -D each time it compiles it -->
- <property file="${user.home}/lucene.build.properties"/>
- <property file="${user.home}/build.properties"/>
- <property file="lucene/build.properties"/><!-- ${common.dir} -->
-
- <!-- include version number from property file (includes "version.*" properties) -->
- <loadproperties srcFile="lucene/version.properties"/>
-
- <!-- define here, as common-build is not included! TODO: maybe include into a property file like the version? -->
- <property name="python32.exe" value="python3" />
- <property name="args" value=""/>
+ <import file="lucene/common-build.xml"/>
+
+ <property name="svnkit.version" value="1.8.10"/>
- <!-- other settings: -->
<property name="tests.heap-dump-dir" location="heapdumps"/>
<property name="maven-build-dir" value="maven-build"/>
@@ -57,21 +47,41 @@
<target name="precommit" description="Run basic checks before committing"
depends="check-svn-working-copy,validate,documentation-lint"/>
- <target name="test" description="Test both Lucene and Solr">
- <subant buildpath="." antfile="extra-targets.xml" target="-run-test" inheritall="false" failonerror="true" />
+ <target name="test" description="Test both Lucene and Solr" depends="resolve-groovy">
+ <mkdir dir="lucene/build" />
+ <tempfile property="tests.totals.tmpfile"
+ destdir="lucene/build"
+ prefix=".test-totals-"
+ suffix=".tmp"
+ deleteonexit="true"
+ createfile="true" />
+
+ <subant target="test" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ <propertyset>
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ <propertyref name="tests.totals.tmpfile" />
+ </propertyset>
+ </subant>
+
+ <property name="tests.totals.toplevel" value="true" />
+ <antcall target="-check-totals" />
</target>
- <target name="jacoco" description="Generates JaCoCo code coverage reports">
+ <target name="jacoco" depends="resolve-groovy" description="Generates JaCoCo code coverage reports">
<subant target="jacoco" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
- <target name="pitest" description="Run PITest on both Lucene and Solr">
+ <target name="pitest" depends="resolve-groovy" description="Run PITest on both Lucene and Solr">
<subant target="pitest" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -79,26 +89,39 @@
<fail message="The Beast only works inside of individual modules"/>
</target>
- <target name="documentation" description="Generate Lucene and Solr Documentation">
+ <target name="documentation" depends="resolve-pegdown" description="Generate Lucene and Solr Documentation">
<subant target="documentation" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
- <target name="documentation-lint" description="Validates the generated documentation (HTML errors, broken links,...)">
+ <target name="documentation-lint" depends="resolve-pegdown,-ecj-javadoc-lint-unsupported,-ecj-resolve" description="Validates the generated documentation (HTML errors, broken links,...)">
<subant target="documentation-lint" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </subant>
+ </target>
+
+ <target name="check-forbidden-apis" depends="-install-forbidden-apis" description="Check forbidden API calls in compiled class files.">
+ <subant target="check-forbidden-apis" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
- <target name="validate" description="Validate dependencies, licenses, etc." depends="-validate-source-patterns">
+ <target name="validate" description="Validate dependencies, licenses, etc." depends="-validate-source-patterns,resolve-groovy,rat-sources-typedef,-install-forbidden-apis">
<subant target="validate" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </subant>
+ <subant buildpath="lucene" target="check-lib-versions" inheritall="false" failonerror="true">
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
- <subant buildpath="lucene" target="check-lib-versions" inheritall="false" failonerror="true"/>
</target>
<target name="-validate-source-patterns" unless="disable.source-patterns">
@@ -127,11 +150,11 @@
<fail if="validate.patternsFound">The following files contain @author tags, tabs, TOODs, svn keywords or nocommits:${line.separator}${validate.patternsFound}</fail>
</target>
- <target name="rat-sources" description="Runs rat across all sources and tests">
+ <target name="rat-sources" description="Runs rat across all sources and tests" depends="common.rat-sources">
<subant target="rat-sources" inheritall="false" failonerror="true">
- <fileset dir="." includes="extra-targets.xml" /><!-- run rat-sources also for root directory -->
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -139,6 +162,7 @@
<subant target="resolve" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -147,6 +171,14 @@
<subant target="compile" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </subant>
+ </target>
+
+ <target name="compile-core" description="Compile Lucene Core">
+ <subant target="compile-core" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -154,6 +186,7 @@
<subant target="compile-test" inheritAll="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -161,6 +194,7 @@
<subant target="jar" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml"/>
<fileset dir="solr" includes="build.xml"/>
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -168,6 +202,7 @@
<subant target="jar-src" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml"/>
<fileset dir="solr" includes="build.xml"/>
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -181,39 +216,61 @@
<delete failonerror="true" dir="${maven-build-dir}/"/>
</target>
- <target name="generate-maven-artifacts" depends="resolve"
+ <target name="generate-maven-artifacts" depends="resolve,resolve-groovy,resolve-pegdown,install-maven-tasks"
description="Generate Maven Artifacts for Lucene and Solr">
<property name="maven.dist.dir" location="dist/maven" />
<mkdir dir="${maven.dist.dir}" />
<ant dir="lucene" inheritall="false">
<target name="-unpack-lucene-tgz"/>
<target name="-filter-pom-templates"/>
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
+ <ant dir="solr" target="-unpack-solr-tgz" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
</ant>
- <ant dir="solr" target="-unpack-solr-tgz" inheritall="false"/>
<subant target="-dist-maven" inheritall="false" failonerror="true">
<property name="maven.dist.dir" location="${maven.dist.dir}" />
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
<target name="validate-maven-dependencies" depends="generate-maven-artifacts"
description="Validates maven dependencies, licenses, etc.">
- <sequential>
- <subant target="-validate-maven-dependencies" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml"/>
- <fileset dir="solr" includes="build.xml"/>
- </subant>
- </sequential>
+ <subant target="-validate-maven-dependencies" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml"/>
+ <fileset dir="solr" includes="build.xml"/>
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </subant>
</target>
- <target name="run-maven-build" depends="get-maven-poms" description="Runs the Maven build using automatically generated POMs">
- <subant buildpath="." antfile="extra-targets.xml" target="-run-maven-build" inheritall="false" failonerror="true">
- <propertyset>
- <propertyref prefix="maven-"/>
- <propertyref builtin="commandline"/>
- </propertyset>
- </subant>
+ <target name="run-maven-build" depends="get-maven-poms,install-maven-tasks,resolve-groovy" description="Runs the Maven build using automatically generated POMs">
+ <groovy><![CDATA[
+ import groovy.xml.NamespaceBuilder;
+ import org.apache.tools.ant.Project;
+ def userHome = properties['user.home'], commonDir = properties['common.dir'];
+ def propPrefix = '-mvn.inject.'; int propPrefixLen = propPrefix.length();
+ def subProject = project.createSubProject();
+ project.copyUserProperties(subProject);
+ subProject.initProperties();
+ new AntBuilder(subProject).sequential{
+ property(file: userHome+'/lucene.build.properties', prefix: propPrefix);
+ property(file: userHome+'/build.properties', prefix: propPrefix);
+ property(file: commonDir+'/build.properties', prefix: propPrefix);
+ };
+ def cmdlineProps = subProject.properties
+ .findAll{ k, v -> k.startsWith(propPrefix) }
+ .collectEntries{ k, v -> [k.substring(propPrefixLen), v] };
+ cmdlineProps << project.userProperties.findAll{ k, v -> !k.startsWith('ant.') };
+ def artifact = NamespaceBuilder.newInstance(ant, 'antlib:org.apache.maven.artifact.ant');
+ task.log('Running Maven with props: ' + cmdlineProps.toString(), Project.MSG_INFO);
+ artifact.mvn(pom: properties['maven-build-dir']+'/pom.xml', mavenVersion: properties['maven-version'], failonerror: true, fork: true) {
+ cmdlineProps.each{ k, v -> arg(value: '-D' + k + '=' + v) };
+ arg(value: '-fae');
+ arg(value: 'install');
+ };
+ ]]></groovy>
</target>
<target name="remove-maven-artifacts" description="Removes all Lucene/Solr Maven artifacts from the local repository">
@@ -358,6 +415,7 @@ File | Project Structure | Platform Sett
<subant target="clean" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -373,14 +431,11 @@ File | Project Structure | Platform Sett
</delete>
</target>
- <target name="ivy-bootstrap" description="Download and install Ivy in the users ant lib dir">
- <subant buildpath="lucene" target="ivy-bootstrap" inheritall="false" failonerror="true"/>
- </target>
-
<target name="jar-checksums" description="Recompute SHA1 checksums for all JAR files.">
<subant target="jar-checksums" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
<fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
@@ -393,7 +448,7 @@ File | Project Structure | Platform Sett
</target>
<target name="nightly-smoke" description="Builds an unsigned release and smoke tests it (pass '-DsmokeTestRelease.java8=/path/to/jdk1.8.0' to additionally test with Java 8)"
- depends="clean,-nightly-smoke-java8params">
+ depends="clean,resolve-groovy,-nightly-smoke-java8params">
<fail message="To run nightly smoke, the JDK must be exactly Java 1.7, was: ${java.specification.version}">
<condition>
<not><equals arg1="${java.specification.version}" arg2="1.7"/></not>
@@ -439,8 +494,115 @@ File | Project Structure | Platform Sett
<delete dir="${smokeTestRelease.tmp}"/>
</target>
- <target name="check-svn-working-copy" description="Checks the status of the SVN working copy">
- <subant buildpath="." antfile="extra-targets.xml" target="-check-svn-working-copy" inheritall="false" failonerror="true"/>
+ <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>
<target name="run-clover" description="Runs all tests to measure coverage and generates report (pass "ANT_OPTS=-Xmx1536M" as environment)" depends="clean">
@@ -461,8 +623,29 @@ File | Project Structure | Platform Sett
</antcall>
</target>
- <target name="-generate-clover-reports">
- <subant buildpath="." antfile="extra-targets.xml" target="-generate-clover-reports" inheritall="false" failonerror="true"/>
+ <!--
+ Run after Junit tests.
+
+ This target is in a separate file, as it needs to include common-build.xml,
+ but must run from top-level!
+ -->
+ <target name="-generate-clover-reports" depends="clover">
+ <fail unless="run.clover">Clover not enabled!</fail>
+ <mkdir dir="${clover.report.dir}"/>
+ <fileset dir="." id="clover.test.result.files">
+ <include name="*/build/**/test/TEST-*.xml"/>
+ </fileset>
+ <clover-report projectName="Apache Lucene/Solr">
+ <current outfile="${clover.report.dir}" title="Apache Lucene/Solr ${version}" numThreads="0">
+ <format type="html" filter="assert"/>
+ <testresults refid="clover.test.result.files"/>
+ </current>
+ <current outfile="${clover.report.dir}/clover.xml" title="Apache Lucene/Solr ${version}">
+ <format type="xml" filter="assert"/>
+ <testresults refid="clover.test.result.files"/>
+ </current>
+ </clover-report>
+ <echo>You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'.</echo>
</target>
<target name="test-with-heapdumps" depends="-test-with-heapdumps-enabled,-test-with-heapdumps-disabled" description="Runs tests with heap dumps on OOM enabled (if VM supports this)"/>
@@ -502,24 +685,25 @@ File | Project Structure | Platform Sett
<fileset dir="lucene" includes="build.xml" />
<!-- todo:
<fileset dir="solr" includes="build.xml" />-->
+ <propertyset refid="uptodate.and.compiled.properties"/>
</subant>
</target>
- <target name="-check-after-regeneration">
- <subant buildpath="." antfile="extra-targets.xml" target="-check-after-regeneration" inheritall="false" failonerror="true"/>
+ <!-- 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>
<!-- TODO: remove me when jenkins works -->
<target name="regenerateAndCheck" depends="regenerate,-check-after-regeneration"/>
<target name="-append-all-modules-dependencies-properties">
- <sequential>
- <delete file="lucene/build/module.dependencies.properties"/>
- <subant target="-append-module-dependencies-properties" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <delete file="lucene/build/module.dependencies.properties"/>
+ <subant target="-append-module-dependencies-properties" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </subant>
</target>
<!-- Jenkins tasks -->
@@ -570,4 +754,6 @@ Test args: [${args}]</echo>
</antcall>
</target>
+ <!-- useless targets (override common-build.xml): -->
+ <target name="generate-test-reports"/>
</project>
Modified: lucene/dev/branches/branch_5x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/CHANGES.txt?rev=1692411&r1=1692410&r2=1692411&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/lucene/CHANGES.txt Thu Jul 23 15:48:33 2015
@@ -334,6 +334,11 @@ Build
* LUCENE-6683: ivy-fail goal directs people to non-existent page
(Mike Drob via Steve Rowe)
+* LUCENE-6693: Updated Groovy to 2.4.4, Pegdown to 1.5, Svnkit to 1.8.10.
+ Also fixed some PermGen errors while running full build caused by
+ these updates: Tasks are now installed from root's build.xml.
+ (Uwe Schindler)
+
Test Framework
* LUCENE-6637: Fix FSTTester to not violate file permissions on
Modified: lucene/dev/branches/branch_5x/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/build.xml?rev=1692411&r1=1692410&r2=1692411&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/build.xml (original)
+++ lucene/dev/branches/branch_5x/lucene/build.xml Thu Jul 23 15:48:33 2015
@@ -201,7 +201,7 @@
<modules-crawl target="-ecj-javadoc-lint"/>
</target>
- <target name="process-webpages" depends="resolve-groovy,resolve-pegdown">
+ <target name="process-webpages" depends="resolve-pegdown">
<makeurl property="process-webpages.buildfiles" separator="|">
<fileset dir="." includes="**/build.xml" excludes="build.xml,analysis/*,build/**,tools/**,site/**"/>
</makeurl>
@@ -408,6 +408,7 @@
<m2-deploy pom.xml="${filtered.pom.templates.dir}/pom.xml"/> <!-- Lucene/Solr grandparent POM -->
<m2-deploy pom.xml="${filtered.pom.templates.dir}/lucene/pom.xml"/> <!-- Lucene parent POM -->
<subant target="-dist-maven" failonerror="true" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="${common.dir}/core" includes="build.xml"/>
<fileset dir="${common.dir}/test-framework" includes="build.xml"/>
</subant>
@@ -416,11 +417,11 @@
</target>
<target name="generate-maven-artifacts" depends="-unpack-lucene-tgz">
- <sequential>
- <ant dir=".." target="resolve" inheritall="false"/>
- <antcall target="-filter-pom-templates" inheritall="false"/>
- <antcall target="-dist-maven" inheritall="false"/>
- </sequential>
+ <ant dir=".." target="resolve" inheritall="false"/>
+ <antcall target="-filter-pom-templates" inheritall="false"/>
+ <antcall target="-dist-maven" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </antcall>
</target>
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
Modified: lucene/dev/branches/branch_5x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/common-build.xml?rev=1692411&r1=1692410&r2=1692411&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_5x/lucene/common-build.xml Thu Jul 23 15:48:33 2015
@@ -536,8 +536,7 @@
<!-- convenience target to compile core -->
</target>
- <target name="jar-core" depends="compile-core"
- description="Packages the JAR file">
+ <target name="jar-core" depends="compile-core">
<jarify/>
</target>
@@ -551,10 +550,14 @@
</patternset>
<available type="dir" file="${lucene.tgz.unpack.dir}" property="lucene.tgz.unpack.dir.exists"/>
<target name="-ensure-lucene-tgz-exists" unless="lucene.tgz.exists">
- <ant dir="${common.dir}" target="package-tgz" inheritall="false"/>
+ <ant dir="${common.dir}" target="package-tgz" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
</target>
<target name="-unpack-lucene-tgz" unless="lucene.tgz.unpack.dir.exists">
- <antcall target="-ensure-lucene-tgz-exists" inheritall="false"/>
+ <antcall target="-ensure-lucene-tgz-exists" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </antcall>
<mkdir dir="${lucene.tgz.unpack.dir}"/>
<untar compression="gzip" src="${lucene.tgz.file}" dest="${lucene.tgz.unpack.dir}">
<patternset refid="patternset.lucene.solr.jars"/>
@@ -1543,7 +1546,7 @@ ${tests-output}/junit4-*.suites - pe
<!--
See http://issues.apache.org/jira/browse/LUCENE-721
-->
- <target name="clover" depends="-clover.disable,-clover.load,-clover.classpath,-clover.setup" description="Instrument the Unit tests using Clover. To use, specify -Drun.clover=true on the command line."/>
+ <target name="clover" depends="-clover.disable,-clover.load,-clover.classpath,-clover.setup"/>
<target name="-clover.load" depends="ivy-availability-check,ivy-configure" if="run.clover" unless="clover.loaded">
<available file="${clover.license.path}" property="clover.license.available" />
@@ -2425,7 +2428,7 @@ ${ant.project.name}.test.dependencies=${
<!-- GROOVY scripting engine for ANT tasks -->
<target name="resolve-groovy" unless="groovy.loaded" depends="ivy-availability-check,ivy-configure">
- <ivy:cachepath organisation="org.codehaus.groovy" module="groovy-all" revision="2.3.11"
+ <ivy:cachepath organisation="org.codehaus.groovy" module="groovy-all" revision="2.4.4"
inline="true" conf="default" type="jar" transitive="true" pathid="groovy.classpath"/>
<taskdef name="groovy"
classname="org.codehaus.groovy.ant.Groovy"
@@ -2497,16 +2500,47 @@ ${ant.project.name}.test.dependencies=${
</forbidden-apis>
</target>
- <!-- PEGDOWN macro: Before using depend on the target "resolve-pegdown,resolve-groovy" -->
-
- <target name="resolve-pegdown" unless="pegdown.loaded" depends="ivy-availability-check,ivy-configure">
+ <target name="resolve-pegdown" unless="pegdown.loaded" depends="resolve-groovy">
<ivy:cachepath organisation="org.pegdown" module="pegdown" revision="1.5.0"
inline="true" conf="default" transitive="true" pathid="pegdown.classpath"/>
+ <groovy classpathref="pegdown.classpath"><![CDATA[
+ import org.apache.tools.ant.AntTypeDefinition;
+ import org.apache.tools.ant.ComponentHelper;
+ import org.apache.tools.ant.filters.TokenFilter.ChainableReaderFilter;
+ import org.pegdown.PegDownProcessor;
+ import org.pegdown.Extensions;
+ import org.pegdown.FastEncoder;
+
+ public final class PegDownFilter extends ChainableReaderFilter {
+ @Override
+ public String filter(String markdownSource) {
+ PegDownProcessor processor = new PegDownProcessor(
+ Extensions.ABBREVIATIONS | Extensions.AUTOLINKS |
+ Extensions.FENCED_CODE_BLOCKS | Extensions.SMARTS
+ );
+ StringBuilder html = new StringBuilder('<html>\n<head>\n');
+ // match the first heading in markdown and use as title:
+ markdownSource.find(~/(?m)^#+\s*(.+)$/) {
+ match, title -> html.append('<title>').append(FastEncoder.encode(title)).append('</title>\n');
+ }
+ html.append('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n')
+ .append('</head>\n<body>\n')
+ .append(processor.markdownToHtml(markdownSource))
+ .append('\n</body>\n</html>\n');
+ return html;
+ }
+ }
+
+ AntTypeDefinition t = new AntTypeDefinition();
+ t.setName('pegdownfilter');
+ t.setClass(PegDownFilter.class);
+ ComponentHelper.getComponentHelper(project).addDataTypeDefinition(t);
+ ]]></groovy>
<property name="pegdown.loaded" value="true"/>
</target>
- <target name="regenerate"/>
-
+ <!-- PEGDOWN macro: Before using depend on the target "resolve-pegdown" -->
+
<macrodef name="pegdown">
<attribute name="todir"/>
<attribute name="flatten" default="false"/>
@@ -2520,31 +2554,7 @@ ${ant.project.name}.test.dependencies=${
<tokenfilter>
<filetokenizer/>
<replaceregex pattern="\b(LUCENE|SOLR)\-\d+\b" replace="[\0](https://issues.apache.org/jira/browse/\0)" flags="gs"/>
- <scriptfilter language="groovy">
- <classpath>
- <path refid="groovy.classpath"/>
- <path refid="pegdown.classpath"/>
- </classpath><![CDATA[
- import org.pegdown.PegDownProcessor;
- import org.pegdown.Extensions;
- import org.pegdown.FastEncoder;
-
- String markdownSource = self.getToken();
- PegDownProcessor processor = new PegDownProcessor(
- Extensions.ABBREVIATIONS | Extensions.AUTOLINKS |
- Extensions.FENCED_CODE_BLOCKS | Extensions.SMARTS
- );
- StringBuilder html = new StringBuilder('<html>\n<head>\n');
- // match the first heading in markdown and use as title:
- markdownSource.find(~/(?m)^#+\s*(.+)$/) {
- match, title -> html.append('<title>').append(FastEncoder.encode(title)).append('</title>\n');
- }
- html.append('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n')
- .append('</head>\n<body>\n')
- .append(processor.markdownToHtml(markdownSource))
- .append('\n</body>\n</html>\n');
- self.setToken(html.toString());
- ]]></scriptfilter>
+ <pegdownfilter/>
</tokenfilter>
</filterchain>
<nested/>
@@ -2552,6 +2562,8 @@ ${ant.project.name}.test.dependencies=${
</sequential>
</macrodef>
+ <target name="regenerate"/>
+
<macrodef name="check-broken-links">
<attribute name="dir"/>
<sequential>
Modified: lucene/dev/branches/branch_5x/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/build.xml?rev=1692411&r1=1692410&r2=1692411&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/build.xml (original)
+++ lucene/dev/branches/branch_5x/solr/build.xml Thu Jul 23 15:48:33 2015
@@ -185,7 +185,7 @@
depends="javadocs,changes-to-html,process-webpages"/>
<target name="compile-core" depends="compile-solr-core" unless="solr.core.compiled"/>
- <target name="process-webpages" depends="define-lucene-javadoc-url,resolve-groovy,resolve-pegdown">
+ <target name="process-webpages" depends="define-lucene-javadoc-url,resolve-pegdown">
<makeurl property="process-webpages.buildfiles" separator="|">
<fileset dir="." includes="core/build.xml,test-framework/build.xml,solrj/build.xml,contrib/**/build.xml"/>
</makeurl>
@@ -509,6 +509,7 @@
description="Packages the Solr Binary Distribution">
<antcall inheritall="true">
<param name="called.from.create-package" value="true"/>
+ <propertyset refid="uptodate.and.compiled.properties"/>
<target name="init-dist"/>
<target name="dist"/>
<target name="server"/>
@@ -664,13 +665,11 @@
</target>
<target name="generate-maven-artifacts" depends="-unpack-solr-tgz">
- <sequential>
- <ant dir=".." target="resolve" inheritall="false"/>
- <antcall target="-filter-pom-templates" inheritall="false"/>
- <antcall target="-dist-maven" inheritall="false">
- <propertyset refid="uptodate.and.compiled.properties"/>
- </antcall>
- </sequential>
+ <ant dir=".." target="resolve" inheritall="false"/>
+ <antcall target="-filter-pom-templates" inheritall="false"/>
+ <antcall target="-dist-maven" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </antcall>
</target>
<target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
Modified: lucene/dev/branches/branch_5x/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/common-build.xml?rev=1692411&r1=1692410&r2=1692411&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/common-build.xml (original)
+++ lucene/dev/branches/branch_5x/solr/common-build.xml Thu Jul 23 15:48:33 2015
@@ -57,10 +57,14 @@
<available file="${solr.tgz.file}" property="solr.tgz.exists"/>
<available type="dir" file="${solr.tgz.unpack.dir}" property="solr.tgz.unpack.dir.exists"/>
<target name="-ensure-solr-tgz-exists" unless="solr.tgz.exists">
- <ant dir="${common-solr.dir}" target="create-package" inheritall="false"/>
+ <ant dir="${common-solr.dir}" target="create-package" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
</target>
<target name="-unpack-solr-tgz" unless="${solr.tgz.unpack.dir.exists}">
- <antcall target="-ensure-solr-tgz-exists"/>
+ <antcall target="-ensure-solr-tgz-exists">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </antcall>
<mkdir dir="${solr.tgz.unpack.dir}"/>
<untar compression="gzip" src="${solr.tgz.file}" dest="${solr.tgz.unpack.dir}">
<patternset refid="patternset.lucene.solr.jars"/>