You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2012/10/25 15:10:51 UTC
svn commit: r1402140 [2/17] - in /lucene/dev/branches/LUCENE-2878: ./
dev-tools/ dev-tools/eclipse/ dev-tools/eclipse/dot.settings/
dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/classification/
dev-tools/maven/ dev-tools/maven/lucene/classifica...
Modified: lucene/dev/branches/LUCENE-2878/.gitignore
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/.gitignore?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/.gitignore (original)
+++ lucene/dev/branches/LUCENE-2878/.gitignore Thu Oct 25 13:10:25 2012
@@ -2,6 +2,7 @@
*.jar
# .
+/eclipse-build
/classes
/build
/dist
Modified: lucene/dev/branches/LUCENE-2878/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/build.xml?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/build.xml (original)
+++ lucene/dev/branches/LUCENE-2878/build.xml Thu Oct 25 13:10:25 2012
@@ -17,50 +17,50 @@
limitations under the License.
-->
-<project name="lucene-solr" default="test" basedir=".">
+<project name="lucene-solr" default="-projecthelp" basedir=".">
+ <target name="-projecthelp">
+ <java fork="false" classname="org.apache.tools.ant.Main" taskname="-">
+ <arg value="-projecthelp"/>
+ <arg value="-f"/>
+ <arg value="${ant.file}"/>
+ </java>
+ </target>
+
<target name="test-help" description="Test runner help">
- <subant target="test-help" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- </subant>
+ <subant buildpath="lucene" target="test-help" inheritall="false" failonerror="true"/>
</target>
+ <property name="tests.heap-dump-dir" location="heapdumps"/>
+
<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">
- <sequential>
- <subant target="test" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <subant target="test" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
- <target name="pitest" description="Test both Lucene and Solr">
- <sequential>
- <subant target="pitest" inheritall="false" failonerror="false">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <target name="pitest" description="Run PITest on both Lucene and Solr">
+ <subant target="pitest" inheritall="false" failonerror="false">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
<target name="documentation" description="Generate Lucene and Solr Documentation">
- <sequential>
- <subant target="documentation" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <subant target="documentation" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
- <target name="documentation-lint">
- <sequential>
- <subant target="documentation-lint" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <target name="documentation-lint" 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" />
+ </subant>
</target>
<target name="validate" description="Validate dependencies, licenses, etc." depends="-validate-source-patterns">
@@ -89,27 +89,24 @@
</target>
<target name="rat-sources" description="Runs rat across all sources and tests">
- <sequential><subant target="rat-sources" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant></sequential>
+ <subant target="rat-sources" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
- <target name="resolve" depends="clean-jars" description="Resolves all dependencies">
- <sequential><subant target="resolve" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant></sequential>
+ <target name="resolve" description="Resolves all dependencies">
+ <subant target="resolve" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
<target name="compile" description="Compile Lucene and Solr">
- <sequential>
-
- <subant target="compile" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <subant target="compile" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
<property name="version" value="5.0-SNAPSHOT"/>
@@ -117,7 +114,7 @@
<property name="maven-version" value="2.2.1"/>
<target name="get-maven-poms"
- description="Copy Maven POMs from dev-tools/maven/ to ${maven-build-dir}/">
+ description="Copy Maven POMs from dev-tools/maven/ to the working copy root">
<copy todir="${maven-build-dir}" overwrite="true">
<fileset dir="${basedir}/dev-tools/maven"/>
<filterset begintoken="@" endtoken="@">
@@ -128,7 +125,7 @@
</target>
<target name="clean-maven-build"
- description="Remove ">
+ description="Clean up Maven POMs in working copy">
<delete failonerror="true" dir="${maven-build-dir}/"/>
</target>
@@ -136,19 +133,16 @@
description="Generate Maven Artifacts for Lucene and Solr">
<property name="maven.dist.dir" location="dist/maven" />
<mkdir dir="${maven.dist.dir}" />
-
- <sequential>
- <ant dir="lucene" target="filter-pom-templates"/>
- <subant target="generate-maven-artifacts" inheritall="false" failonerror="true">
- <property name="maven.dist.dir" location="${maven.dist.dir}" />
- <property name="filtered.pom.templates.uptodate" value="true"/>
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <ant dir="lucene" target="filter-pom-templates"/>
+ <subant target="generate-maven-artifacts" inheritall="false" failonerror="true">
+ <property name="maven.dist.dir" location="${maven.dist.dir}" />
+ <property name="filtered.pom.templates.uptodate" value="true"/>
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
- <target name="validate-maven-dependencies" depends="generate-maven-artifacts" description="Validates maven dependencies, licenses, etc">
+ <target name="validate-maven-dependencies" depends="generate-maven-artifacts" description="Validates maven dependencies, licenses, etc.">
<subant target="-validate-maven-dependencies" inheritall="false" failonerror="true">
<property name="filtered.pom.templates.uptodate" value="true"/>
<fileset dir="lucene" includes="build.xml"/>
@@ -157,11 +151,10 @@
</target>
<target name="run-maven-build" depends="get-maven-poms" description="Runs the Maven build using automatically generated POMs">
- <subant target="run-maven-build" inheritall="false" failonerror="true">
+ <subant buildpath="." antfile="extra-targets.xml" target="-run-maven-build" inheritall="false" failonerror="true">
<propertyset>
<propertyref prefix="maven-"/>
</propertyset>
- <fileset dir="." includes="extra-targets.xml" />
</subant>
</target>
@@ -175,7 +168,7 @@
</delete>
</target>
- <target name="eclipse" depends="clean-jars, resolve" description="Setup Eclipse configuration">
+ <target name="eclipse" depends="resolve" description="Setup Eclipse configuration">
<copy file="dev-tools/eclipse/dot.project" tofile=".project" overwrite="false"/>
<copy file="dev-tools/eclipse/dot.classpath" tofile=".classpath" overwrite="true"/>
<mkdir dir=".settings"/>
@@ -188,7 +181,15 @@
</echo>
</target>
- <target name="idea" depends="clean-jars, resolve" description="Setup IntelliJ IDEA configuration">
+ <target name="clean-eclipse" description="Removes all Eclipse configuration files">
+ <delete dir=".settings" failonerror="true"/>
+ <delete failonerror="true">
+ <fileset dir="." includes=".classpath,.project"/>
+ </delete>
+ <delete dir="eclipse-build" failonerror="true"/>
+ </target>
+
+ <target name="idea" depends="resolve" description="Setup IntelliJ IDEA configuration">
<copy todir=".">
<fileset dir="dev-tools/idea"/>
</copy>
@@ -209,127 +210,148 @@
<delete dir="idea-build" failonerror="true"/>
</target>
- <target name="clean" description="Clean Lucene and Solr">
+ <target name="clean" description="Clean Lucene and Solr build dirs">
<delete dir="dist" />
- <sequential>
- <subant target="clean" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- <delete dir="dist" failonerror="false" />
- </sequential>
- </target>
-
- <!-- TODO: in the future, we don't need to actually put
- jars in the lib/ folders, but can just put in classpath.
- only packaging tasks really need that (and could do it
- under build/ directories) -->
- <target name="clean-jars" description="Clean local jars">
- <delete>
- <fileset dir="." includes="**/*.jar"/>
- </delete>
+ <delete dir="${tests.heap-dump-dir}" />
+ <subant target="clean" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
<target name="ivy-bootstrap" description="Download and install Ivy in the users ant lib dir">
- <subant target="ivy-bootstrap" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- </subant>
+ <subant buildpath="lucene" target="ivy-bootstrap" inheritall="false" failonerror="true"/>
</target>
<target name="jar-checksums" description="Recompute SHA1 checksums for all JAR files.">
- <sequential>
- <subant target="jar-checksums" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- </subant>
- </sequential>
+ <subant target="jar-checksums" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ </subant>
</target>
<!-- define here, as common-build is not included! -->
<property name="python32.exe" value="python3.2" />
- <property name="fakeRelease" value="lucene/build/fakeRelease"/>
- <property name="fakeReleaseTmp" value="lucene/build/fakeReleaseTmp"/>
- <property name="fakeReleaseVersion" value="5.0"/> <!-- *not* -SNAPSHOT, the real version -->
-
- <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it" depends="clean">
- <sequential>
- <fail unless="JAVA6_HOME">JAVA6_HOME property is not defined.</fail>
- <fail unless="JAVA7_HOME">JAVA7_HOME property is not defined.</fail>
- <subant target="prepare-release-no-sign" inheritall="false" failonerror="true">
- <fileset dir="lucene" includes="build.xml" />
- <fileset dir="solr" includes="build.xml" />
- <property name="version" value="${fakeReleaseVersion}" />
- </subant>
- <delete dir="${fakeRelease}"/>
- <delete dir="${fakeReleaseTmp}"/>
- <mkdir dir="${fakeRelease}"/>
- <copy todir="${fakeRelease}/lucene">
- <fileset dir="lucene/dist"/>
- </copy>
- <copy todir="${fakeRelease}/lucene/changes">
- <fileset dir="lucene/build/docs/changes"/>
- </copy>
- <get src="http://people.apache.org/keys/group/lucene.asc"
- dest="${fakeRelease}/lucene/KEYS"/>
- <copy todir="${fakeRelease}/solr">
- <fileset dir="solr/package"/>
- </copy>
- <copy file="${fakeRelease}/lucene/KEYS" todir="${fakeRelease}/solr"/>
- <makeurl file="${fakeRelease}" validate="false" property="fakeRelease.uri"/>
- <exec executable="${python32.exe}" failonerror="true">
- <arg value="-u"/>
- <arg value="dev-tools/scripts/smokeTestRelease.py"/>
- <arg value="${fakeRelease.uri}"/>
- <arg value="${fakeReleaseVersion}"/>
- <arg value="${fakeReleaseTmp}"/>
- <arg value="false"/>
- <env key="JAVA6_HOME" value="${JAVA6_HOME}"/>
- <env key="JAVA7_HOME" value="${JAVA7_HOME}"/>
- </exec>
- <delete dir="${fakeRelease}"/>
- <delete dir="${fakeReleaseTmp}"/>
- </sequential>
- </target>
-
- <target name="check-svn-working-copy">
- <subant target="check-svn-working-copy" inheritall="false" failonerror="true">
- <fileset dir="." includes="extra-targets.xml" />
- </subant>
+ <property name="fakeRelease" location="lucene/build/fakeRelease"/>
+ <property name="fakeReleaseTmp" location="lucene/build/fakeReleaseTmp"/>
+ <property name="fakeReleaseVersion" value="5.0.0"/> <!-- *not* -SNAPSHOT, the real version -->
+
+ <target name="-load-env">
+ <!-- load the properties only here, so not on every invocation /usr/bin/env is called: -->
+ <property environment="env"/>
</target>
-
- <!-- Calls only generate-clover-reports on Lucene, as Solr's is just a clone with other target; the database itsself is fixed -->
- <target name="generate-clover-reports">
- <subant target="generate-clover-reports" inheritall="false" failonerror="true">
- <fileset dir="." includes="extra-targets.xml" />
- </subant>
+
+ <target name="-env-JAVA6_HOME" depends="-load-env" if="env.JAVA6_HOME">
+ <property name="JAVA6_HOME" value="${env.JAVA6_HOME}"/>
+ </target>
+
+ <target name="-env-JAVA7_HOME" depends="-load-env" if="env.JAVA7_HOME">
+ <property name="JAVA7_HOME" value="${env.JAVA7_HOME}"/>
</target>
-
- <!-- Jenkins tasks -->
- <target name="jenkins-hourly" depends="clean,test,validate,-jenkins-documentation-lint,jar-checksums,check-svn-working-copy" description="Runs the Jenkins hourly test runs"/>
- <target name="jenkins-clover" description="Runs nightly clover builds on Jenkins">
- <antcall target="-jenkins-clover">
+ <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it" depends="clean,-env-JAVA6_HOME,-env-JAVA7_HOME">
+ <fail unless="JAVA6_HOME">JAVA6_HOME property or environment variable is not defined.</fail>
+ <fail unless="JAVA7_HOME">JAVA7_HOME property or environment variable is not defined.</fail>
+ <subant target="prepare-release-no-sign" inheritall="false" failonerror="true">
+ <fileset dir="lucene" includes="build.xml" />
+ <fileset dir="solr" includes="build.xml" />
+ <property name="version" value="${fakeReleaseVersion}" />
+ </subant>
+ <delete dir="${fakeRelease}"/>
+ <delete dir="${fakeReleaseTmp}"/>
+ <mkdir dir="${fakeRelease}"/>
+ <copy todir="${fakeRelease}/lucene">
+ <fileset dir="lucene/dist"/>
+ </copy>
+ <copy todir="${fakeRelease}/lucene/changes">
+ <fileset dir="lucene/build/docs/changes"/>
+ </copy>
+ <get src="http://people.apache.org/keys/group/lucene.asc"
+ dest="${fakeRelease}/lucene/KEYS"/>
+ <copy todir="${fakeRelease}/solr">
+ <fileset dir="solr/package"/>
+ </copy>
+ <copy file="${fakeRelease}/lucene/KEYS" todir="${fakeRelease}/solr"/>
+ <copy todir="${fakeRelease}/solr/changes">
+ <fileset dir="solr/build/docs/changes"/>
+ </copy>
+ <makeurl file="${fakeRelease}" validate="false" property="fakeRelease.uri"/>
+ <exec executable="${python32.exe}" failonerror="true">
+ <arg value="-u"/>
+ <arg file="dev-tools/scripts/smokeTestRelease.py"/>
+ <arg value="${fakeRelease.uri}"/>
+ <arg value="${fakeReleaseVersion}"/>
+ <arg file="${fakeReleaseTmp}"/>
+ <arg value="false"/>
+ <env key="JAVA6_HOME" file="${JAVA6_HOME}"/>
+ <env key="JAVA7_HOME" file="${JAVA7_HOME}"/>
+ </exec>
+ <delete dir="${fakeRelease}"/>
+ <delete dir="${fakeReleaseTmp}"/>
+ </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"/>
+ </target>
+
+ <target name="run-clover" description="Runs all tests to measure coverage and generates report (pass "ANT_ARGS=-Xmx1536M" as environment)" depends="clean">
+ <antcall>
<param name="run.clover" value="true"/>
<!-- must be 1, as clover does not like parallel test runs: -->
<param name="tests.jvms" value="1"/>
- <!-- Also override some other props to be fast, ignoring what's set on command line: -->
+ <!-- Also override some other props to be fast: -->
<param name="tests.multiplier" value="1"/>
<param name="tests.nightly" value="false"/>
<param name="tests.weekly" value="false"/>
- <param name="tests.multiplier" value="1"/>
+ <param name="tests.badapples" value="true"/>
+ <!-- The idea behind Clover is to determine test coverage, so be immune to failing tests: -->
+ <param name="tests.haltonfailure" value="false"/>
+
+ <target name="test"/>
+ <target name="-generate-clover-reports"/>
</antcall>
</target>
- <target name="-jenkins-clover" depends="clean,test,generate-clover-reports"/>
- <target name="jenkins-maven-nightly" depends="clean,remove-maven-artifacts,run-maven-build,generate-maven-artifacts,validate-maven-dependencies"
- description="Runs the nightly Maven build on Jenkins, including artifact deployment"/>
+ <target name="-generate-clover-reports">
+ <subant buildpath="." antfile="extra-targets.xml" target="-generate-clover-reports" inheritall="false" failonerror="true"/>
+ </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)"/>
- <!-- we need this extra condition, as we want to match only on "true", not solely if property is set: -->
- <property name="disable.documentation-lint" value="false" />
- <condition property="-disable.documentation-lint">
- <istrue value="${disable.documentation-lint}"/>
+ <condition property="vm.supports.heapdumps">
+ <or>
+ <contains string="${java.vm.name}" substring="hotspot" casesensitive="false"/>
+ <contains string="${java.vm.name}" substring="openjdk" casesensitive="false"/>
+ <contains string="${java.vm.name}" substring="jrockit" casesensitive="false"/>
+ </or>
</condition>
- <target name="-jenkins-documentation-lint" unless="-disable.documentation-lint">
- <antcall target="documentation-lint"/>
+
+ <target name="-test-with-heapdumps-enabled" if="vm.supports.heapdumps">
+ <echo level="info" message="${java.vm.name}: Enabling heap dumps on OutOfMemoryError to dir '${tests.heap-dump-dir}'."/>
+ <mkdir dir="${tests.heap-dump-dir}"/>
+ <delete includeEmptyDirs="true">
+ <fileset dir="${tests.heap-dump-dir}" includes="**/*"/>
+ </delete>
+ <antcall inheritAll="false" target="test">
+ <param name="tests.heapdump.args" value="-XX:+HeapDumpOnOutOfMemoryError "-XX:HeapDumpPath=${tests.heap-dump-dir}""/>
+ </antcall>
+ <pathconvert property="heapdumps.list" setonempty="false" pathsep="${line.separator}">
+ <fileset dir="${tests.heap-dump-dir}"/>
+ <map from="${tests.heap-dump-dir}${file.separator}" to="* "/>
+ </pathconvert>
+ <fail if="heapdumps.list" message="Some of the tests produced a heap dump, but did not fail. Maybe a suppressed OutOfMemoryError? Dumps created:${line.separator}${heapdumps.list}"/>
+ <delete dir="${tests.heap-dump-dir}"/>
+ </target>
+
+ <target name="-test-with-heapdumps-disabled" unless="vm.supports.heapdumps">
+ <echo level="warning" message="WARN: The used JVM (${java.vm.name}) does not support HPROF heap dumps on OutOfMemoryError."/>
+ <antcall target="test"/>
</target>
+
+ <!-- Jenkins tasks -->
+ <target name="jenkins-hourly" depends="clean,test-with-heapdumps,validate,documentation-lint,jar-checksums,check-svn-working-copy"/>
+
+ <target name="jenkins-maven-nightly" depends="clean,remove-maven-artifacts,run-maven-build,generate-maven-artifacts,validate-maven-dependencies"/>
+
+ <target name="jenkins-clover" depends="run-clover"/>
</project>
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.classpath
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.classpath?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.classpath (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.classpath Thu Oct 25 13:10:25 2012
@@ -168,7 +168,7 @@
<classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-collections-3.2.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="lucene/test-framework/lib/randomizedtesting-runner-2.0.1.jar"/>
+ <classpathentry kind="lib" path="lucene/test-framework/lib/randomizedtesting-runner-2.0.3.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/fontbox-1.7.0.jar"/>
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs Thu Oct 25 13:10:25 2012
@@ -1,4 +1,4 @@
-#Wed Sep 19 20:37:34 EDT 2012
+#Sun Sep 23 13:02:27 EDT 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
@@ -13,7 +13,7 @@ org.eclipse.jdt.core.compiler.problem.in
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/idea/.idea/libraries/JUnit.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/idea/.idea/libraries/JUnit.xml?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/idea/.idea/libraries/JUnit.xml (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/idea/.idea/libraries/JUnit.xml Thu Oct 25 13:10:25 2012
@@ -2,7 +2,7 @@
<library name="JUnit">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lucene/test-framework/lib/junit-4.10.jar!/" />
- <root url="jar://$PROJECT_DIR$/lucene/test-framework/lib/randomizedtesting-runner-2.0.1.jar!/" />
+ <root url="jar://$PROJECT_DIR$/lucene/test-framework/lib/randomizedtesting-runner-2.0.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/idea/lucene/classification/classification.iml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/idea/lucene/classification/classification.iml?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/idea/lucene/classification/classification.iml (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/idea/lucene/classification/classification.iml Thu Oct 25 13:10:25 2012
@@ -15,5 +15,7 @@
<orderEntry type="library" scope="TEST" name="JUnit" level="project" />
<orderEntry type="module" scope="TEST" module-name="lucene-test-framework" />
<orderEntry type="module" module-name="lucene-core" />
+ <orderEntry type="module" module-name="queries" />
+ <orderEntry type="module" scope="TEST" module-name="analysis-common" />
</component>
</module>
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/classification/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/classification/pom.xml.template?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/classification/pom.xml.template (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/classification/pom.xml.template Thu Oct 25 13:10:25 2012
@@ -54,6 +54,17 @@
<artifactId>lucene-core</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>lucene-queries</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>lucene-analyzers-common</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<sourceDirectory>${module-path}/src/java</sourceDirectory>
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/core/src/java/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/core/src/java/pom.xml.template?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/core/src/java/pom.xml.template (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/maven/lucene/core/src/java/pom.xml.template Thu Oct 25 13:10:25 2012
@@ -24,7 +24,7 @@
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-parent</artifactId>
<version>@version@</version>
- <relativePath>../pom.xml</relativePath>
+ <relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/maven/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/maven/pom.xml.template?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/maven/pom.xml.template (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/maven/pom.xml.template Thu Oct 25 13:10:25 2012
@@ -434,7 +434,7 @@
<dependency>
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
- <version>2.0.1</version>
+ <version>2.0.3</version>
</dependency>
</dependencies>
</dependencyManagement>
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/scripts/checkJavadocLinks.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/scripts/checkJavadocLinks.py?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/scripts/checkJavadocLinks.py (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/scripts/checkJavadocLinks.py Thu Oct 25 13:10:25 2012
@@ -32,12 +32,17 @@ class FindHyperlinks(HTMLParser):
def __init__(self, baseURL):
HTMLParser.__init__(self)
+ self.stack = []
self.anchors = set()
self.links = []
self.baseURL = baseURL
self.printed = False
def handle_starttag(self, tag, attrs):
+ # NOTE: I don't think 'a' should be in here. But try debugging
+ # NumericRangeQuery.html. (Could be javadocs bug, its a generic type...)
+ if tag not in ('link', 'meta', 'frame', 'br', 'hr', 'p', 'li', 'img', 'col', 'a'):
+ self.stack.append(tag)
if tag == 'a':
name = None
href = None
@@ -74,6 +79,18 @@ class FindHyperlinks(HTMLParser):
else:
raise RuntimeError('couldn\'t find an href nor name in link in %s: only got these attrs: %s' % (self.baseURL, attrs))
+ def handle_endtag(self, tag):
+ if tag in ('link', 'meta', 'frame', 'br', 'hr', 'p', 'li', 'img', 'col', 'a'):
+ return
+
+ if len(self.stack) == 0:
+ raise RuntimeError('%s %s:%s: saw </%s> no opening <%s>' % (self.baseURL, self.getpos()[0], self.getpos()[1], tag, self.stack[-1]))
+
+ if self.stack[-1] == tag:
+ self.stack.pop()
+ else:
+ raise RuntimeError('%s %s:%s: saw </%s> but expected </%s>' % (self.baseURL, self.getpos()[0], self.getpos()[1], tag, self.stack[-1]))
+
def printFile(self):
if not self.printed:
print()
Modified: lucene/dev/branches/LUCENE-2878/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/dev-tools/scripts/smokeTestRelease.py?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/branches/LUCENE-2878/dev-tools/scripts/smokeTestRelease.py Thu Oct 25 13:10:25 2012
@@ -14,8 +14,11 @@
# limitations under the License.
import os
+import codecs
import tarfile
+import zipfile
import threading
+import traceback
import subprocess
import signal
import shutil
@@ -32,18 +35,23 @@ import filecmp
import platform
import checkJavaDocs
import checkJavadocLinks
+import io
+import codecs
# This tool expects to find /lucene and /solr off the base URL. You
# must have a working gpg, tar, unzip in your path. This has been
# tested on Linux and on Cygwin under Windows 7.
+cygwin = platform.system().lower().startswith('cygwin')
+cygwinWindowsRoot = os.popen('cygpath -w /').read().strip().replace('\\','/') if cygwin else ''
+
def unshortenURL(url):
parsed = urllib.parse.urlparse(url)
if parsed[0] in ('http', 'https'):
h = http.client.HTTPConnection(parsed.netloc)
h.request('HEAD', parsed.path)
response = h.getresponse()
- if response.status/100 == 3 and response.getheader('Location'):
+ if int(response.status/100) == 3 and response.getheader('Location'):
return response.getheader('Location')
return url
@@ -54,6 +62,8 @@ def javaExe(version):
path = JAVA7_HOME
else:
raise RuntimeError("unknown Java version '%s'" % version)
+ if cygwin:
+ path = os.popen('cygpath -u "%s"' % path).read().strip()
return 'export JAVA_HOME="%s" PATH="%s/bin:$PATH"' % (path, path)
def verifyJavaVersion(version):
@@ -76,9 +86,6 @@ except KeyError:
verifyJavaVersion('1.6')
verifyJavaVersion('1.7')
-cygwin = platform.system().lower().startswith('cygwin')
-cygwinWindowsRoot = os.popen('cygpath -w /').read().strip().replace('\\','/') if cygwin else ''
-
# TODO
# + verify KEYS contains key that signed the release
# + make sure changes HTML looks ok
@@ -94,8 +101,8 @@ cygwinWindowsRoot = os.popen('cygpath -w
reHREF = re.compile('<a href="(.*?)">(.*?)</a>')
-# Set to True to avoid re-downloading the packages...
-DEBUG = False
+# Set to False to avoid re-downloading the packages...
+FORCE_CLEAN = True
def getHREFs(urlString):
@@ -112,14 +119,21 @@ def getHREFs(urlString):
break
links = []
- for subUrl, text in reHREF.findall(urllib.request.urlopen(urlString).read().decode('UTF-8')):
+ try:
+ html = urllib.request.urlopen(urlString).read().decode('UTF-8')
+ except:
+ print('\nFAILED to open url %s' % urlString)
+ traceback.print_exc()
+ raise
+
+ for subUrl, text in reHREF.findall(html):
fullURL = urllib.parse.urljoin(urlString, subUrl)
links.append((text, fullURL))
return links
def download(name, urlString, tmpDir, quiet=False):
fileName = '%s/%s' % (tmpDir, name)
- if DEBUG and os.path.exists(fileName):
+ if not FORCE_CLEAN and os.path.exists(fileName):
if not quiet and fileName.find('.asc') == -1:
print(' already done: %.1f MB' % (os.path.getsize(fileName)/1024./1024.))
return
@@ -145,7 +159,126 @@ def download(name, urlString, tmpDir, qu
def load(urlString):
return urllib.request.urlopen(urlString).read().decode('utf-8')
+
+def noJavaPackageClasses(desc, file):
+ with zipfile.ZipFile(file) as z2:
+ for name2 in z2.namelist():
+ if name2.endswith('.class') and (name2.startswith('java/') or name2.startswith('javax/')):
+ raise RuntimeError('%s contains sheisty class "%s"' % (desc, name2))
+
+def decodeUTF8(bytes):
+ return codecs.getdecoder('UTF-8')(bytes)[0]
+
+MANIFEST_FILE_NAME = 'META-INF/MANIFEST.MF'
+NOTICE_FILE_NAME = 'META-INF/NOTICE.txt'
+LICENSE_FILE_NAME = 'META-INF/LICENSE.txt'
+
+def checkJARMetaData(desc, jarFile, version):
+
+ with zipfile.ZipFile(jarFile, 'r') as z:
+ for name in (MANIFEST_FILE_NAME, NOTICE_FILE_NAME, LICENSE_FILE_NAME):
+ try:
+ # The Python docs state a KeyError is raised ... so this None
+ # check is just defensive:
+ if z.getinfo(name) is None:
+ raise RuntimeError('%s is missing %s' % (desc, name))
+ except KeyError:
+ raise RuntimeError('%s is missing %s' % (desc, name))
+
+ s = decodeUTF8(z.read(MANIFEST_FILE_NAME))
+
+ for verify in (
+ 'Implementation-Vendor: The Apache Software Foundation',
+ # Make sure 1.6 compiler was used to build release bits:
+ 'X-Compile-Source-JDK: 1.6',
+ # Make sure .class files are 1.6 format:
+ 'X-Compile-Target-JDK: 1.6',
+ # Make sure this matches the version we think we are releasing:
+ 'Specification-Version: %s' % version):
+ if s.find(verify) == -1:
+ raise RuntimeError('%s is missing "%s" inside its META-INF/MANIFES.MF' % \
+ (desc, verify))
+
+ notice = decodeUTF8(z.read(NOTICE_FILE_NAME))
+ license = decodeUTF8(z.read(LICENSE_FILE_NAME))
+
+ idx = desc.find('inside WAR file')
+ if idx != -1:
+ desc2 = desc[:idx]
+ else:
+ desc2 = desc
+
+ justFileName = os.path.split(desc2)[1]
+
+ if justFileName.lower().find('solr') != -1:
+ if SOLR_LICENSE is None:
+ raise RuntimeError('BUG in smokeTestRelease!')
+ if SOLR_NOTICE is None:
+ raise RuntimeError('BUG in smokeTestRelease!')
+ if notice != SOLR_NOTICE:
+ raise RuntimeError('%s: %s contents doesn\'t match main NOTICE.txt' % \
+ (desc, NOTICE_FILE_NAME))
+ if license != SOLR_LICENSE:
+ raise RuntimeError('%s: %s contents doesn\'t match main LICENSE.txt' % \
+ (desc, LICENSE_FILE_NAME))
+ else:
+ if LUCENE_LICENSE is None:
+ raise RuntimeError('BUG in smokeTestRelease!')
+ if LUCENE_NOTICE is None:
+ raise RuntimeError('BUG in smokeTestRelease!')
+ if notice != LUCENE_NOTICE:
+ raise RuntimeError('%s: %s contents doesn\'t match main NOTICE.txt' % \
+ (desc, NOTICE_FILE_NAME))
+ if license != LUCENE_LICENSE:
+ raise RuntimeError('%s: %s contents doesn\'t match main LICENSE.txt' % \
+ (desc, LICENSE_FILE_NAME))
+
+def normSlashes(path):
+ return path.replace(os.sep, '/')
+
+def checkAllJARs(topDir, project, version):
+ print(' verify JAR/WAR metadata...')
+ for root, dirs, files in os.walk(topDir):
+
+ normRoot = normSlashes(root)
+
+ if project == 'solr' and normRoot.endswith('/example/lib'):
+ # Solr's example intentionally ships servlet JAR:
+ continue
+
+ for file in files:
+ if file.lower().endswith('.jar'):
+ if project == 'solr':
+ if normRoot.endswith('/contrib/dataimporthandler/lib') and (file.startswith('mail-') or file.startswith('activation-')):
+ print(' **WARNING**: skipping check of %s/%s: it has javax.* classes' % (root, file))
+ continue
+ fullPath = '%s/%s' % (root, file)
+ noJavaPackageClasses('JAR file "%s"' % fullPath, fullPath)
+ if file.lower().find('lucene') != -1 or file.lower().find('solr') != -1:
+ checkJARMetaData('JAR file "%s"' % fullPath, fullPath, version)
+
+def checkSolrWAR(warFileName, version):
+
+ """
+ Crawls for JARs inside the WAR and ensures there are no classes
+ under java.* or javax.* namespace.
+ """
+
+ print(' make sure WAR file has no javax.* or java.* classes...')
+
+ checkJARMetaData(warFileName, warFileName, version)
+
+ with zipfile.ZipFile(warFileName, 'r') as z:
+ for name in z.namelist():
+ if name.endswith('.jar'):
+ noJavaPackageClasses('JAR file %s inside WAR file %s' % (name, warFileName),
+ io.BytesIO(z.read(name)))
+ if name.lower().find('lucene') != -1 or name.lower().find('solr') != -1:
+ checkJARMetaData('JAR file %s inside WAR file %s' % (name, warFileName),
+ io.BytesIO(z.read(name)),
+ version)
+
def checkSigs(project, urlString, version, tmpDir, isSigned):
print(' test basics...')
@@ -226,10 +359,9 @@ def checkSigs(project, urlString, versio
if mavenURL is None:
raise RuntimeError('%s is missing maven' % project)
- if project == 'lucene':
- if changesURL is None:
- raise RuntimeError('%s is missing changes-%s' % (project, version))
- testChanges(project, version, changesURL)
+ if changesURL is None:
+ raise RuntimeError('%s is missing changes-%s' % (project, version))
+ testChanges(project, version, changesURL)
for artifact, urlString in artifacts:
print(' download %s...' % artifact)
@@ -333,6 +465,23 @@ def run(command, logFile):
if cygwin: command = cygwinifyPaths(command)
if os.system('%s > %s 2>&1' % (command, logFile)):
logPath = os.path.abspath(logFile)
+ print('\ncommand "%s" failed:' % command)
+
+ # Assume log file was written in system's default encoding, but
+ # even if we are wrong, we replace errors ... the ASCII chars
+ # (which is what we mostly care about eg for the test seed) should
+ # still survive:
+ txt = codecs.open(logPath, 'r', encoding=sys.getdefaultencoding(), errors='replace').read()
+
+ # Encode to our output encoding (likely also system's default
+ # encoding):
+ bytes = txt.encode(sys.stdout.encoding, errors='replace')
+
+ # Decode back to string and print... we should hit no exception here
+ # since all errors have been replaced:
+ print(codecs.getdecoder(sys.stdout.encoding)(bytes)[0])
+ print()
+
raise RuntimeError('command "%s" failed; see log file %s' % (command, logPath))
def verifyDigests(artifact, urlString, tmpDir):
@@ -371,6 +520,8 @@ def getDirEntries(urlString):
path = urlString[7:]
if path.endswith('/'):
path = path[:-1]
+ if cygwin: # Convert Windows path to Cygwin path
+ path = re.sub(r'^/([A-Za-z]):/', r'/cygdrive/\1/', path)
l = []
for ent in os.listdir(path):
entPath = '%s/%s' % (path, ent)
@@ -386,13 +537,13 @@ def getDirEntries(urlString):
if text == 'Parent Directory' or text == '..':
return links[(i+1):]
-def unpack(project, tmpDir, artifact, version):
+def unpackAndVerify(project, tmpDir, artifact, version):
destDir = '%s/unpack' % tmpDir
if os.path.exists(destDir):
shutil.rmtree(destDir)
os.makedirs(destDir)
os.chdir(destDir)
- print(' unpack %s...' % artifact)
+ print(' unpack %s...' % artifact)
unpackLogFile = '%s/%s-unpack-%s.log' % (tmpDir, project, artifact)
if artifact.endswith('.tar.gz') or artifact.endswith('.tgz'):
run('tar xzf %s/%s' % (tmpDir, artifact), unpackLogFile)
@@ -411,21 +562,45 @@ def unpack(project, tmpDir, artifact, ve
unpackPath = '%s/%s' % (destDir, expected)
verifyUnpacked(project, artifact, unpackPath, version, tmpDir)
+LUCENE_NOTICE = None
+LUCENE_LICENSE = None
+SOLR_NOTICE = None
+SOLR_LICENSE = None
+
def verifyUnpacked(project, artifact, unpackPath, version, tmpDir):
+ global LUCENE_NOTICE
+ global LUCENE_LICENSE
+ global SOLR_NOTICE
+ global SOLR_LICENSE
+
os.chdir(unpackPath)
isSrc = artifact.find('-src') != -1
l = os.listdir(unpackPath)
textFiles = ['LICENSE', 'NOTICE', 'README']
if project == 'lucene':
- textFiles.extend(('JRE_VERSION_MIGRATION', 'CHANGES', 'MIGRATE'))
+ textFiles.extend(('JRE_VERSION_MIGRATION', 'CHANGES', 'MIGRATE', 'SYSTEM_REQUIREMENTS'))
if isSrc:
textFiles.append('BUILD')
+ elif not isSrc:
+ textFiles.append('SYSTEM_REQUIREMENTS')
+
for fileName in textFiles:
fileName += '.txt'
if fileName not in l:
raise RuntimeError('file "%s" is missing from artifact %s' % (fileName, artifact))
l.remove(fileName)
+ if project == 'lucene':
+ if LUCENE_NOTICE is None:
+ LUCENE_NOTICE = open('%s/NOTICE.txt' % unpackPath, encoding='UTF-8').read()
+ if LUCENE_LICENSE is None:
+ LUCENE_LICENSE = open('%s/LICENSE.txt' % unpackPath, encoding='UTF-8').read()
+ else:
+ if SOLR_NOTICE is None:
+ SOLR_NOTICE = open('%s/NOTICE.txt' % unpackPath, encoding='UTF-8').read()
+ if SOLR_LICENSE is None:
+ SOLR_LICENSE = open('%s/LICENSE.txt' % unpackPath, encoding='UTF-8').read()
+
if not isSrc:
# TODO: we should add verifyModule/verifySubmodule (e.g. analysis) here and recurse through
if project == 'lucene':
@@ -457,6 +632,8 @@ def verifyUnpacked(project, artifact, un
if project == 'lucene':
if len(l) > 0:
raise RuntimeError('%s: unexpected files/dirs in artifact %s: %s' % (project, artifact, l))
+ elif isSrc and not os.path.exists('%s/solr/SYSTEM_REQUIREMENTS.txt' % unpackPath):
+ raise RuntimeError('%s: solr/SYSTEM_REQUIREMENTS.txt does not exist in artifact %s' % (project, artifact))
if isSrc:
print(' make sure no JARs/WARs in src dist...')
@@ -487,16 +664,18 @@ def verifyUnpacked(project, artifact, un
checkJavadocpath('%s/build/docs' % unpackPath)
else:
os.chdir('solr')
- print(' run tests w/ Java 6...')
- run('%s; ant test' % javaExe('1.6'), '%s/test.log' % unpackPath)
+ # DISABLED until solr tests consistently pass
+ #print(' run tests w/ Java 6...')
+ #run('%s; ant test' % javaExe('1.6'), '%s/test.log' % unpackPath)
# test javadocs
print(' generate javadocs w/ Java 6...')
run('%s; ant javadocs' % javaExe('1.6'), '%s/javadocs.log' % unpackPath)
checkJavadocpath('%s/solr/build/docs' % unpackPath, False)
- print(' run tests w/ Java 7...')
- run('%s; ant test' % javaExe('1.7'), '%s/test.log' % unpackPath)
+ # DISABLED until solr tests consistently pass
+ #print(' run tests w/ Java 7...')
+ #run('%s; ant test' % javaExe('1.7'), '%s/test.log' % unpackPath)
# test javadocs
print(' generate javadocs w/ Java 7...')
@@ -516,14 +695,34 @@ def verifyUnpacked(project, artifact, un
testNotice(unpackPath)
else:
+
+ checkAllJARs(os.getcwd(), project, version)
+
if project == 'lucene':
testDemo(isSrc, version)
+
else:
+ checkSolrWAR('%s/example/webapps/solr.war' % unpackPath, version)
+
+ print(' copying unpacked distribution for Java 6 ...')
+ java6UnpackPath = '%s-java6' %unpackPath
+ if os.path.exists(java6UnpackPath):
+ shutil.rmtree(java6UnpackPath)
+ shutil.copytree(unpackPath, java6UnpackPath)
+ os.chdir(java6UnpackPath)
print(' test solr example w/ Java 6...')
- testSolrExample(unpackPath, JAVA6_HOME, False)
+ testSolrExample(java6UnpackPath, JAVA6_HOME, False)
+ print(' copying unpacked distribution for Java 7 ...')
+ java7UnpackPath = '%s-java7' %unpackPath
+ if os.path.exists(java7UnpackPath):
+ shutil.rmtree(java7UnpackPath)
+ shutil.copytree(unpackPath, java7UnpackPath)
+ os.chdir(java7UnpackPath)
print(' test solr example w/ Java 7...')
- testSolrExample(unpackPath, JAVA7_HOME, False)
+ testSolrExample(java7UnpackPath, JAVA7_HOME, False)
+
+ os.chdir(unpackPath)
testChangesText('.', version, project)
@@ -705,6 +904,9 @@ def checkMaven(baseURL, tmpDir, version,
print(' verify that Maven artifacts are same as in the binary distribution...')
checkIdenticalMavenArtifacts(distributionFiles, nonMavenizedDeps, artifacts, version)
+ checkAllJARs('%s/maven/org/apache/lucene' % tmpDir, 'lucene', version)
+ checkAllJARs('%s/maven/org/apache/solr' % tmpDir, 'solr', version)
+
def getDistributionsForMavenChecks(tmpDir, version, baseURL):
distributionFiles = defaultdict()
for project in ('lucene', 'solr'):
@@ -1011,12 +1213,14 @@ def getPOMtemplates(POMtemplates, tmpDir
targetDir = '%s/dev-tools/maven' % tmpDir
if not os.path.exists(targetDir):
os.makedirs(targetDir)
- crawl(allPOMtemplates, sourceLocation, targetDir, set(['Apache Subversion'])) # Ignore "Apache Subversion" links
+ crawl(allPOMtemplates, sourceLocation, targetDir, set(['Apache Subversion', 'maven.testlogging.properties']))
- POMtemplates['lucene'] = [p for p in allPOMtemplates if '/maven/lucene/' in p]
+ reLucenePOMtemplate = re.compile(r'.*/maven/lucene.*/pom\.xml\.template$')
+ POMtemplates['lucene'] = [p for p in allPOMtemplates if reLucenePOMtemplate.search(p)]
if POMtemplates['lucene'] is None:
raise RuntimeError('No Lucene POMs found at %s' % sourceLocation)
- POMtemplates['solr'] = [p for p in allPOMtemplates if '/maven/solr/' in p]
+ reSolrPOMtemplate = re.compile(r'.*/maven/solr.*/pom\.xml\.template$')
+ POMtemplates['solr'] = [p for p in allPOMtemplates if reSolrPOMtemplate.search(p)]
if POMtemplates['solr'] is None:
raise RuntimeError('No Solr POMs found at %s' % sourceLocation)
POMtemplates['grandfather'] = [p for p in allPOMtemplates if '/maven/pom.xml.template' in p]
@@ -1032,11 +1236,13 @@ def crawl(downloadedFiles, urlString, ta
os.makedirs(path)
crawl(downloadedFiles, subURL, path, exclusions)
else:
- if not os.path.exists(path) or not DEBUG:
+ if not os.path.exists(path) or FORCE_CLEAN:
download(text, subURL, targetDir, quiet=True)
downloadedFiles.append(path)
sys.stdout.write('.')
+reAllowedVersion = re.compile(r'^\d+\.\d+\.\d+(-ALPHA|-BETA)?$')
+
def main():
if len(sys.argv) < 4:
@@ -1047,6 +1253,10 @@ def main():
baseURL = sys.argv[1]
version = sys.argv[2]
+
+ if not reAllowedVersion.match(version):
+ raise RuntimeError('version "%s" does not match format X.Y.Z[-ALPHA|-BETA]' % version)
+
tmpDir = os.path.abspath(sys.argv[3])
isSigned = True
if len(sys.argv) == 5:
@@ -1056,7 +1266,7 @@ def main():
def smokeTest(baseURL, version, tmpDir, isSigned):
- if not DEBUG:
+ if FORCE_CLEAN:
if os.path.exists(tmpDir):
raise RuntimeError('temp dir %s exists; please remove first' % tmpDir)
@@ -1087,24 +1297,27 @@ def smokeTest(baseURL, version, tmpDir,
print('Test Lucene...')
checkSigs('lucene', lucenePath, version, tmpDir, isSigned)
for artifact in ('lucene-%s.tgz' % version, 'lucene-%s.zip' % version):
- unpack('lucene', tmpDir, artifact, version)
- unpack('lucene', tmpDir, 'lucene-%s-src.tgz' % version, version)
+ unpackAndVerify('lucene', tmpDir, artifact, version)
+ unpackAndVerify('lucene', tmpDir, 'lucene-%s-src.tgz' % version, version)
print()
print('Test Solr...')
checkSigs('solr', solrPath, version, tmpDir, isSigned)
for artifact in ('apache-solr-%s.tgz' % version, 'apache-solr-%s.zip' % version):
- unpack('solr', tmpDir, artifact, version)
- unpack('solr', tmpDir, 'apache-solr-%s-src.tgz' % version, version)
+ unpackAndVerify('solr', tmpDir, artifact, version)
+ unpackAndVerify('solr', tmpDir, 'apache-solr-%s-src.tgz' % version, version)
+ print()
print('Test Maven artifacts for Lucene and Solr...')
checkMaven(baseURL, tmpDir, version, isSigned)
+ print('\nSUCCESS!\n')
+
if __name__ == '__main__':
+ print('NOTE: output encoding is %s' % sys.stdout.encoding)
try:
main()
except:
- import traceback
traceback.print_exc()
sys.exit(1)
sys.exit(0)
Modified: lucene/dev/branches/LUCENE-2878/extra-targets.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/extra-targets.xml?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/extra-targets.xml (original)
+++ lucene/dev/branches/LUCENE-2878/extra-targets.xml Thu Oct 25 13:10:25 2012
@@ -31,7 +31,7 @@
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">
+ <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">
@@ -51,7 +51,7 @@
<echo>You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'.</echo>
</target>
- <target name="run-maven-build" depends="install-maven-tasks">
+ <target name="-run-maven-build" depends="install-maven-tasks">
<mvn xmlns="antlib:org.apache.maven.artifact.ant" pom="${maven-build-dir}/pom.xml"
mavenVersion="${maven-version}" failonerror="true" fork="true">
<arg value="-fae"/>
@@ -59,60 +59,59 @@
</mvn>
</target>
- <target xmlns:ivy="antlib:org.apache.ivy.ant" name="check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure">
+ <target xmlns:ivy="antlib:org.apache.ivy.ant" name="-check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy">
<ivy:cachepath organisation="org.tmatesoft.svnkit" module="svnkit" revision="1.7.5-v1"
inline="true" conf="default" type="jar" transitive="true" pathid="svnkit.classpath"/>
- <script language="javascript" classpathref="svnkit.classpath" taskname="svn"><![CDATA[
- importClass(java.io.File);
- importClass(java.util.TreeSet);
- importPackage(org.tmatesoft.svn.core);
- importPackage(org.tmatesoft.svn.core.wc);
- var manager = SVNClientManager.newInstance();
- var statusClient = manager.getStatusClient();
- var wcClient = manager.getWCClient();
+ <script language="groovy" taskname="svn">
+ <classpath>
+ <path refid="groovy.classpath"/>
+ <path refid="svnkit.classpath"/>
+ </classpath><![CDATA[
+ import org.tmatesoft.svn.core.*;
+ import org.tmatesoft.svn.core.wc.*;
- var basedir = new File(project.getProperty("basedir")).getAbsoluteFile();
- var baseLen = basedir.toString().length();
- var convertRelative = function(file) {
- return file.getAbsolutePath().substring(baseLen + 1).replace(File.separatorChar, '/');
+ SVNClientManager manager = SVNClientManager.newInstance();
+ SVNStatusClient statusClient = manager.getStatusClient();
+ SVNWCClient wcClient = manager.getWCClient();
+
+ File basedir = new File(project.getProperty('basedir')).getAbsoluteFile();
+ int baseLen = basedir.toString().length();
+ def convertRelative = {
+ file -> file.getAbsolutePath().substring(baseLen + 1).replace(File.separatorChar, (char)'/');
}
- var missingProps = new TreeSet(), unversioned = new TreeSet();
+ Set missingProps = new TreeSet(), unversioned = new TreeSet();
- self.log("Getting all versioned and unversioned files...");
- statusClient.doStatus(basedir, SVNRevision.WORKING, SVNDepth.fromRecurse(true), false, true, false, false, new ISVNStatusHandler({
- handleStatus: function(status) {
- var nodeStatus = status.getNodeStatus();
- if (nodeStatus == SVNStatusType.STATUS_UNVERSIONED) {
- unversioned.add(convertRelative(status.getFile()));
- } else if (status.getKind() == SVNNodeKind.FILE && nodeStatus != SVNStatusType.STATUS_DELETED) {
- missingProps.add(convertRelative(status.getFile()));
- }
+ self.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) {
+ unversioned.add(convertRelative(status.getFile()));
+ } else if (status.getKind() == SVNNodeKind.FILE && nodeStatus != SVNStatusType.STATUS_DELETED) {
+ missingProps.add(convertRelative(status.getFile()));
}
- }), null);
+ } as ISVNStatusHandler, null);
- self.log("Filtering files with existing svn:eol-style...");
- wcClient.doGetProperty(basedir, "svn:eol-style", SVNRevision.WORKING, SVNRevision.WORKING, true, new ISVNPropertyHandler({
- handleProperty: function(file, prop) {
- missingProps.remove(convertRelative(file));
- }
- }));
+ self.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);
- self.log("Filtering files with binary svn:mime-type...");
- wcClient.doGetProperty(basedir, "svn:mime-type", SVNRevision.WORKING, SVNRevision.WORKING, true, new ISVNPropertyHandler({
- handleProperty: function(file, prop) {
- prop = SVNPropertyValue.getPropertyAsString(prop.getValue());
- if (prop.startsWith("application/") || prop.startsWith("image/")) {
- missingProps.remove(convertRelative(file));
- }
+ self.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);
- var convertSet2String = function(set) {
- return set.isEmpty() ? null : ("* " + set.toArray().join(project.getProperty("line.separator") + "* "))
+ def convertSet2String = {
+ set -> set ? ('* ' + set.join(project.getProperty('line.separator') + '* ')) : null
};
- project.setProperty("svn.checkprops.failed", convertSet2String(missingProps));
- project.setProperty("svn.unversioned.failed", convertSet2String(unversioned));
+ project.setProperty('svn.checkprops.failed', convertSet2String(missingProps));
+ project.setProperty('svn.unversioned.failed', convertSet2String(unversioned));
]]></script>
<fail if="svn.checkprops.failed"
message="The following files are missing svn:eol-style (or binary svn:mime-type):${line.separator}${svn.checkprops.failed}"/>
Modified: lucene/dev/branches/LUCENE-2878/lucene/BUILD.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/BUILD.txt?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/BUILD.txt (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/BUILD.txt Thu Oct 25 13:10:25 2012
@@ -73,6 +73,8 @@ location of your ant installation, typin
and command prompt should run ant. Ant will by default look for the
"build.xml" file in your current directory, and compile Lucene.
+If you want to build the documentation, type "ant documentation".
+
For further information on Lucene, go to:
http://lucene.apache.org/
Modified: lucene/dev/branches/LUCENE-2878/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/CHANGES.txt?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/CHANGES.txt Thu Oct 25 13:10:25 2012
@@ -5,10 +5,6 @@ For more information on past and future
http://s.apache.org/luceneversions
======================= Lucene 5.0.0 =======================
-New Features
-
-* LUCENE-4410: FilteredQuery now exposes a FilterStrategy that exposes
- how filters are applied during query execution. (Simon Willnauer)
Changes in backwards compatibility policy
@@ -20,6 +16,109 @@ Changes in backwards compatibility polic
(Nikola Tanković, Uwe Schindler, Chris Male, Mike McCandless,
Robert Muir)
+======================= Lucene 4.1.0 =======================
+
+New Features
+
+* LUCENE-4226: New experimental StoredFieldsFormat (in lucene/codecs) that
+ compresses chunks of documents together in order to improve the compression
+ ratio. (Adrien Grand)
+
+* LUCENE-4426: New ValueSource implementations (in lucene/queries) for
+ DocValues fields. (Adrien Grand)
+
+* LUCENE-4410: FilteredQuery now exposes a FilterStrategy that exposes
+ how filters are applied during query execution. (Simon Willnauer)
+
+* LUCENE-4404: New ListOfOutputs (in lucene/misc) for FSTs wraps
+ another Outputs implementation, allowing you to store more than one
+ output for a single input. UpToTwoPositiveIntsOutputs was moved
+ from lucene/core to lucene/misc. (Mike McCandless)
+
+* LUCENE-3842: New AnalyzingCompletionLookup, for doing auto-suggest
+ using an analyzer. This can create powerful suggesters: if the analyzer
+ remove stop words then "ghost chr..." could suggest "The Ghost of
+ Christmas Past"; if SynonymFilter is used to map wifi and wireless
+ network to hotspot, then "wirele..." could suggest "wifi router";
+ token normalization likes stemmers, accent removel, etc. would allow
+ the suggester to ignore such variations. (Robert Muir, Sudarshan
+ Gaikaiwari, Mike McCandless)
+
+* LUCENE-4446: Lucene 4.1 has a new default index format (Lucene41Codec)
+ that incorporates the previously experimental "Block" postings format
+ for better search performance.
+ (Han Jiang, Adrien Grand, Robert Muir, Mike McCandless)
+
+API Changes
+
+* LUCENE-4399: Deprecated AppendingCodec. Lucene's term dictionaries
+ no longer seek when writing. (Adrien Grand, Robert Muir)
+
+* LUCENE-4479: Rename TokenStream.getTokenStream(IndexReader, int, String)
+ to TokenStream.getTokenStreamWithOffsets, and return null on failure
+ rather than throwing IllegalArgumentException. (Alan Woodward)
+
+* LUCENE-4472: MergePolicy now accepts a MergeTrigger that provides
+ information about the trigger of the merge ie. merge triggered due
+ to a segment merge or a full flush etc. (Simon Willnauer)
+
+Bug Fixes
+
+* LUCENE-1822: BaseFragListBuilder hard-coded 6 char margin is too naive.
+ (Alex Vigdor, Arcadius Ahouansou, Koji Sekiguchi)
+
+* LUCENE-4468: Fix rareish integer overflows in Lucene41 postings
+ format. (Robert Muir)
+
+* LUCENE-4486: Add support for ConstantScoreQuery in Highlighter.
+ (Simon Willnauer)
+
+* LUCENE-4485: When CheckIndex terms, terms/docs pairs and tokens,
+ these counts now all exclude deleted documents. (Mike McCandless)
+
+* LUCENE-4479: Highlighter works correctly for fields with term vector
+ positions, but no offsets. (Alan Woodward)
+
+* SOLR-3906: JapaneseReadingFormFilter in romaji mode will return
+ romaji even for out-of-vocabulary kana cases (e.g. half-width forms).
+ (Robert Muir)
+
+Optimizations
+
+* LUCENE-4443: Lucene41PostingsFormat no longer writes unnecessary offsets
+ into the skipdata. (Robert Muir)
+
+* LUCENE-4459: Improve WeakIdentityMap.keyIterator() to remove GCed keys
+ from backing map early instead of waiting for reap(). This makes test
+ failures in TestWeakIdentityMap disappear, too.
+ (Uwe Schindler, Mike McCandless, Robert Muir)
+
+* LUCENE-4473: Lucene41PostingsFormat encodes offsets more efficiently
+ for low frequency terms (< 128 occurrences). (Robert Muir)
+
+* LUCENE-4462: DocumentsWriter now flushes deletes, segment infos and builds
+ CFS files if necessary during segment flush and not during publishing. The latter
+ was a single threaded process while now all IO and CPU heavy computation is done
+ concurrently in DocumentsWriterPerThread. (Simon Willnauer)
+
+* LUCENE-4496: Optimize Lucene41PostingsFormat when requesting a subset of
+ the postings data (via flags to TermsEnum.docs/docsAndPositions) to use
+ ForUtil.skipBlock. (Robert Muir)
+
+* LUCENE-4497: Don't write PosVIntCount to the positions file in
+ Lucene41PostingsFormat, as its always totalTermFreq % BLOCK_SIZE. (Robert Muir)
+
+* LUCENE-4498: In Lucene41PostingsFormat, when a term appears in only one document,
+ Instead of writing a file pointer to a VIntBlock containing the doc id, just
+ write the doc id. (Mike McCandless, Robert Muir)
+
+Build
+
+* LUCENE-4451: Memory leak per unique thread caused by
+ RandomizedContext.contexts static map. Upgrade randomized testing
+ to version 2.0.2 (Mike McCandless, Dawid Weiss)
+
+
======================= Lucene 4.0.0 =======================
Changes in backwards compatibility policy
@@ -56,9 +155,11 @@ New Features
API Changes
-* LUCENE-4391: All methods of Lucene40Codec but getPostingsFormatForField are
- now final. To reuse functionality of Lucene40, you should extend FilterCodec
- and delegate to Lucene40 instead of extending Lucene40Codec. (Adrien Grand)
+* LUCENE-4391, LUCENE-4440: All methods of Lucene40Codec but
+ getPostingsFormatForField are now final. To reuse functionality
+ of Lucene40, you should extend FilterCodec and delegate to Lucene40
+ instead of extending Lucene40Codec. (Adrien Grand, Shai Erea,
+ Robert Muir, Uwe Schindler)
* LUCENE-4299: Added Terms.hasPositions() and Terms.hasOffsets().
Previously you had no real way to know that a term vector field
@@ -125,8 +226,15 @@ API Changes
Bits as liveDocs, then use the flex apis (fields(), terms(), etc) directly.
(Mike McCandless, Robert Muir)
+* LUCENE-4425: clarify documentation of StoredFieldVisitor.binaryValue
+ and simplify the api to binaryField(FieldInfo, byte[]).
+ (Adrien Grand, Robert Muir)
+
Bug Fixes
+* LUCENE-4423: DocumentStoredFieldVisitor.binaryField ignored offset and
+ length. (Adrien Grand)
+
* LUCENE-4297: BooleanScorer2 would multiply the coord() factor
twice for conjunctions: for most users this is no problem, but
if you had a customized Similarity that returned something other
@@ -178,6 +286,23 @@ Bug Fixes
* LUCENE-4401: Fix bug where DisjunctionSumScorer would sometimes call score()
on a subscorer that had already returned NO_MORE_DOCS. (Liu Chao, Robert Muir)
+* LUCENE-4411: when sampling is enabled for a FacetRequest, its depth
+ parameter is reset to the default (1), even if set otherwise.
+ (Gilad Barkai via Shai Erera)
+
+* LUCENE-4455: Fix bug in SegmentInfoPerCommit.sizeInBytes() that was
+ returning 2X the true size, inefficiently. Also fixed bug in
+ CheckIndex that would report no deletions when a segment has
+ deletions, and vice/versa. (Uwe Schindler, Robert Muir, Mike McCandless)
+
+* LUCENE-4456: Fixed double-counting sizeInBytes for a segment
+ (affects how merge policies pick merges); fixed CheckIndex's
+ incorrect reporting of whether a segment has deletions; fixed case
+ where on abort Lucene could remove files it didn't create; fixed
+ many cases where IndexWriter could leave leftover files (on
+ exception in various places, on reuse of a segment name after crash
+ and recovery. (Uwe Schindler, Robert Muir, Mike McCandless)
+
Optimizations
* LUCENE-4322: Decrease lucene-core JAR size. The core JAR size had increased a
Modified: lucene/dev/branches/LUCENE-2878/lucene/NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/NOTICE.txt?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/NOTICE.txt (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/NOTICE.txt Thu Oct 25 13:10:25 2012
@@ -109,6 +109,9 @@ LGPL and Creative Commons ShareAlike.
Morfologic includes data from BSD-licensed dictionary of Polish (SGJP)
(http://sgjp.pl/morfeusz/)
+Servlet-api.jar is under the CDDL license, the original source
+code for this can be found at http://www.eclipse.org/jetty/downloads.php
+
===========================================================================
Kuromoji Japanese Morphological Analyzer - Apache Lucene Integration
===========================================================================
Modified: lucene/dev/branches/LUCENE-2878/lucene/README.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/README.txt?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/README.txt (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/README.txt Thu Oct 25 13:10:25 2012
@@ -19,3 +19,5 @@ Files are organized by module, for examp
To review the documentation, read the main documentation page, located at:
`docs/index.html`
+
+To build Lucene or its documentation for a source distribution, see BUILD.txt
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/build.xml?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/build.xml (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/build.xml Thu Oct 25 13:10:25 2012
@@ -126,5 +126,9 @@
<target name="rat-sources">
<forall-analyzers target="rat-sources"/>
</target>
+
+ <target name="-ecj-javadoc-lint">
+ <forall-analyzers target="-ecj-javadoc-lint"/>
+ </target>
</project>
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java Thu Oct 25 13:10:25 2012
@@ -30792,7 +30792,8 @@ public final class HTMLStripCharFilter e
private TextSegment entitySegment = new TextSegment(2);
/**
- * @param source
+ * Creates a new HTMLStripCharFilter over the provided Reader.
+ * @param source Reader to strip html tags from.
*/
public HTMLStripCharFilter(Reader source) {
super(source);
@@ -30800,7 +30801,9 @@ public final class HTMLStripCharFilter e
}
/**
- * @param source
+ * Creates a new HTMLStripCharFilter over the provided Reader
+ * with the specified start and end tags.
+ * @param source Reader to strip html tags from.
* @param escapedTags Tags in this set (both start and end tags)
* will not be filtered out.
*/
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex Thu Oct 25 13:10:25 2012
@@ -171,7 +171,8 @@ InlineElment = ( [aAbBiIqQsSuU]
private TextSegment entitySegment = new TextSegment(2);
/**
- * @param source
+ * Creates a new HTMLStripCharFilter over the provided Reader.
+ * @param source Reader to strip html tags from.
*/
public HTMLStripCharFilter(Reader source) {
super(source);
@@ -179,7 +180,9 @@ InlineElment = ( [aAbBiIqQsSuU]
}
/**
- * @param source
+ * Creates a new HTMLStripCharFilter over the provided Reader
+ * with the specified start and end tags.
+ * @param source Reader to strip html tags from.
* @param escapedTags Tags in this set (both start and end tags)
* will not be filtered out.
*/
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java Thu Oct 25 13:10:25 2012
@@ -132,7 +132,7 @@ public class HyphenationCompoundWordToke
*
* @param hyphenationFilename the filename of the XML grammar to load
* @return An object representing the hyphenation patterns
- * @throws IOException
+ * @throws IOException If there is a low-level I/O error.
*/
public static HyphenationTree getHyphenationTree(String hyphenationFilename)
throws IOException {
@@ -144,7 +144,7 @@ public class HyphenationCompoundWordToke
*
* @param hyphenationFile the file of the XML grammar to load
* @return An object representing the hyphenation patterns
- * @throws IOException
+ * @throws IOException If there is a low-level I/O error.
*/
public static HyphenationTree getHyphenationTree(File hyphenationFile)
throws IOException {
@@ -156,7 +156,7 @@ public class HyphenationCompoundWordToke
*
* @param hyphenationSource the InputSource pointing to the XML grammar
* @return An object representing the hyphenation patterns
- * @throws IOException
+ * @throws IOException If there is a low-level I/O error.
*/
public static HyphenationTree getHyphenationTree(InputSource hyphenationSource)
throws IOException {
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/en/KStemFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/en/KStemFilter.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/en/KStemFilter.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/en/KStemFilter.java Thu Oct 25 13:10:25 2012
@@ -44,8 +44,8 @@ public final class KStemFilter extends T
}
/** Returns the next, stemmed, input Token.
- * @return The stemed form of a token.
- * @throws IOException
+ * @return The stemmed form of a token.
+ * @throws IOException If there is a low-level I/O error.
*/
@Override
public boolean incrementToken() throws IOException {
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilterFactory.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilterFactory.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilterFactory.java Thu Oct 25 13:10:25 2012
@@ -36,16 +36,13 @@ import org.apache.lucene.analysis.util.T
*/
public class LimitTokenCountFilterFactory extends TokenFilterFactory {
+ public static final String MAX_TOKEN_COUNT_KEY = "maxTokenCount";
int maxTokenCount;
@Override
public void init(Map<String, String> args) {
super.init( args );
- String maxTokenCountArg = args.get("maxTokenCount");
- if (maxTokenCountArg == null) {
- throw new IllegalArgumentException("maxTokenCount is mandatory.");
- }
- maxTokenCount = Integer.parseInt(args.get(maxTokenCountArg));
+ maxTokenCount = getInt(MAX_TOKEN_COUNT_KEY);
}
@Override
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilter.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilter.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilter.java Thu Oct 25 13:10:25 2012
@@ -351,7 +351,7 @@ public final class WordDelimiterFilter e
* Flushes the given WordDelimiterConcatenation by either writing its concat and then clearing, or just clearing.
*
* @param concatenation WordDelimiterConcatenation that will be flushed
- * @return {@code true} if the concatenation was written before it was cleared, {@code} false otherwise
+ * @return {@code true} if the concatenation was written before it was cleared, {@code false} otherwise
*/
private boolean flushConcatenation(WordDelimiterConcatenation concatenation) {
lastConcatCount = concatenation.subwordCount;
@@ -493,7 +493,7 @@ public final class WordDelimiterFilter e
* Determines whether the given flag is set
*
* @param flag Flag to see if set
- * @return {@code} true if flag is set
+ * @return {@code true} if flag is set
*/
private boolean has(int flag) {
return (flags & flag) != 0;
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadEncoder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadEncoder.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadEncoder.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadEncoder.java Thu Oct 25 13:10:25 2012
@@ -33,9 +33,6 @@ public interface PayloadEncoder {
/**
* Convert a char array to a {@link BytesRef}
- * @param buffer
- * @param offset
- * @param length
* @return encoded {@link BytesRef}
*/
BytesRef encode(char [] buffer, int offset, int length);
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadHelper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadHelper.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadHelper.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/PayloadHelper.java Thu Oct 25 13:10:25 2012
@@ -44,7 +44,6 @@ public class PayloadHelper {
}
/**
- * @param bytes
* @see #decodeFloat(byte[], int)
* @see #encodeFloat(float)
* @return the decoded float
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/package.html?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/package.html (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/payloads/package.html Thu Oct 25 13:10:25 2012
@@ -20,11 +20,6 @@
<TITLE>org.apache.lucene.analysis.payloads</TITLE>
</HEAD>
<BODY>
-<DIV>Provides various convenience classes for creating payloads on Tokens.
-</DIV>
-<DIV> </DIV>
-<DIV align="center">
-Copyright © 2007 <A HREF="http://www.apache.org">Apache Software Foundation</A>
-</DIV>
+Provides various convenience classes for creating payloads on Tokens.
</BODY>
</HTML>
\ No newline at end of file
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/sinks/package.html Thu Oct 25 13:10:25 2012
@@ -16,32 +16,10 @@
limitations under the License.
-->
<HTML>
- <!--
-/**
- * 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.
- */
- --><HEAD>
- <TITLE>org.apache.lucene.analysis.sinks</TITLE>
+<HEAD>
+ <TITLE>org.apache.lucene.analysis.sinks</TITLE>
</HEAD>
<BODY>
-<DIV>Implementations of the SinkTokenizer that might be useful.
-</DIV>
-<DIV> </DIV>
-<DIV align="center">
-Copyright © 2007 <A HREF="http://www.apache.org">Apache Software Foundation</A>
-</DIV>
+Implementations of the SinkTokenizer that might be useful.
</BODY>
</HTML>
\ No newline at end of file
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java Thu Oct 25 13:10:25 2012
@@ -120,7 +120,7 @@ public final class ClassicTokenizer exte
}
private void init(Version matchVersion) {
- this.scanner = new ClassicTokenizerImpl(input);
+ this.scanner = new ClassicTokenizerImpl(null); // best effort NPE if you dont call reset
}
// this tokenizer generates three attributes:
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java Thu Oct 25 13:10:25 2012
@@ -134,7 +134,7 @@ public final class StandardTokenizer ext
}
private final void init(Version matchVersion) {
- this.scanner = new StandardTokenizerImpl(input);
+ this.scanner = new StandardTokenizerImpl(null); // best effort NPE if you dont call reset
}
// this tokenizer generates three attributes:
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java Thu Oct 25 13:10:25 2012
@@ -98,7 +98,7 @@ public final class UAX29URLEmailTokenize
*/
public UAX29URLEmailTokenizer(Version matchVersion, Reader input) {
super(input);
- this.scanner = getScannerFor(matchVersion, input);
+ this.scanner = getScannerFor(matchVersion);
}
/**
@@ -106,7 +106,7 @@ public final class UAX29URLEmailTokenize
*/
public UAX29URLEmailTokenizer(Version matchVersion, AttributeSource source, Reader input) {
super(source, input);
- this.scanner = getScannerFor(matchVersion, input);
+ this.scanner = getScannerFor(matchVersion);
}
/**
@@ -114,11 +114,11 @@ public final class UAX29URLEmailTokenize
*/
public UAX29URLEmailTokenizer(Version matchVersion, AttributeFactory factory, Reader input) {
super(factory, input);
- this.scanner = getScannerFor(matchVersion, input);
+ this.scanner = getScannerFor(matchVersion);
}
- private static StandardTokenizerInterface getScannerFor(Version matchVersion, Reader input) {
- return new UAX29URLEmailTokenizerImpl(input);
+ private static StandardTokenizerInterface getScannerFor(Version matchVersion) {
+ return new UAX29URLEmailTokenizerImpl(null); // best effort NPE if you dont call reset
}
// this tokenizer generates three attributes:
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java Thu Oct 25 13:10:25 2012
@@ -480,7 +480,7 @@ public final class SynonymFilter extends
// endOffset (ie, endOffset of the last input
// token it matched):
endOffset = matchEndOffset;
- posLen = matchInputLength;
+ posLen = keepOrig ? matchInputLength : 1;
} else {
// This rule has more than one output token; we
// can't pick any particular endOffset for this
Modified: lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java?rev=1402140&r1=1402139&r2=1402140&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java Thu Oct 25 13:10:25 2012
@@ -184,7 +184,7 @@ public class WordlistLoader {
* (i.e. two tab separated words)
*
* @return stem dictionary that overrules the stemming algorithm
- * @throws IOException
+ * @throws IOException If there is a low-level I/O error.
*/
public static CharArrayMap<String> getStemDict(Reader reader, CharArrayMap<String> result) throws IOException {
BufferedReader br = null;
@@ -210,7 +210,7 @@ public class WordlistLoader {
* </p>
*
* @return a list of non-blank non-comment lines with whitespace trimmed
- * @throws IOException
+ * @throws IOException If there is a low-level I/O error.
*/
public static List<String> getLines(InputStream stream, Charset charset) throws IOException{
BufferedReader input = null;