LUCENE-3336: Speed up javadocs-all builds by minimizing compile costs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1150486 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-07-24 21:19:42 +00:00
parent 589bd811c6
commit 9c73f9d03b
3 changed files with 20 additions and 10 deletions

View File

@ -214,9 +214,16 @@
failonerror="false"/>
</target>
<target name="javadocs-all" description="Generate javadoc for core and contrib classes" depends="build-contrib">
<target name="javadocs-all" description="Generate javadoc for core and contrib classes">
<sequential>
<mkdir dir="${javadoc.dir}/all"/>
<!-- TODO: remove these dependencies: -->
<subant target="default">
<fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>
<fileset dir="${common.dir}/../modules/analysis/common" includes="build.xml"/>
<fileset dir="${common.dir}/../modules/queries" includes="build.xml"/>
</subant>
<path id="javadoc.classpath">
<path refid="classpath"/>

View File

@ -49,6 +49,8 @@ import java.io.InputStream;
import java.io.FileInputStream;
import static org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_CHAR;
import org.apache.lucene.analysis.util.StemmerUtil;
import org.apache.lucene.util.ArrayUtil;
/**
@ -207,15 +209,12 @@ class PorterStemmer
}
private final boolean ends(String s) {
int l = s.length();
int o = k-l+1;
if (o < k0)
if (StemmerUtil.endsWith(b, k+1, s)) {
j = k-s.length();
return true;
} else {
return false;
for (int i = 0; i < l; i++)
if (b[o+i] != s.charAt(i))
return false;
j = k-l;
return true;
}
}
/* setto(s) sets (j+1),...k to the characters in the string s, readjusting

View File

@ -379,11 +379,15 @@
</copy>
</target>
<target name="javadocs-all" depends="compile,javadocs-dep"
<target name="javadocs-all" depends="prep-lucene-jars,javadocs-dep"
description="Generate javadoc for core, java client and contrib">
<sequential>
<mkdir dir="${dest}/docs/api"/>
<subant target="module-jars-to-solr">
<fileset dir="contrib/analysis-extras" includes="build.xml"/>
</subant>
<path id="javadoc.classpath">
<path refid="classpath"/>
<fileset dir="${dest}/contrib">