Apache Lucene open-source search software
LUCENE-4409: Improve ECJ-Linter (permgen, taskname) + fix whitespace bug
Uwe Schindlerc08962374ee8
diff --git a/lucene/build.xml b/lucene/build.xmlindex ecf40e58966..3b929dbf699 100644--- a/lucene/build.xml+++ b/lucene/build.xml@@ -225,9 +225,10 @@<target name="javadocs" description="Generate javadoc" depends="javadocs-lucene-core, javadocs-modules, javadocs-test-framework"/><!-- we check for broken links across all documentation -->- <target name="documentation-lint" depends="compile-test-framework,documentation">+ <target name="documentation-lint" depends="compile-test-framework,documentation,-ecj-resolve"><sequential><subant target="-ecj-javadoc-lint" failonerror="true" inheritall="false">+ <propertyset refid="uptodate.and.compiled.properties"/><fileset dir="core" includes="build.xml"/><fileset dir="test-framework" includes="build.xml"/></subant>diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 2e6cab6f5c6..0b145b212be 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -1478,17 +1478,25 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites<target name="-ecj-javadoc-lint" depends="-ecj-javadoc-lint-src,-ecj-javadoc-lint-tests"/>- <target name="-ecj-javadoc-lint-src">+ <target name="-ecj-javadoc-lint-src" depends="-ecj-resolve"><ecj-macro srcdir="${src.dir}" configuration="${common.dir}/tools/javadoc/ecj.javadocs.prefs"><classpath refid="classpath"/></ecj-macro></target>- <target name="-ecj-javadoc-lint-tests" if="module.has.tests">+ <target name="-ecj-javadoc-lint-tests" depends="-ecj-resolve" if="module.has.tests"><ecj-macro srcdir="${tests.src.dir}" configuration="${common.dir}/tools/javadoc/ecj.javadocs.prefs"><classpath refid="test.classpath"/></ecj-macro></target>++ <target name="-ecj-resolve" unless="ecj.loaded" depends="ivy-availability-check,ivy-fail,ivy-configure">+ <ivy:cachepath organisation="org.eclipse.jdt.core.compiler" module="ecj" revision="3.7.2"+ inline="true" conf="master" type="jar" pathid="ecj.classpath" />+ <componentdef classname="org.eclipse.jdt.core.JDTCompilerAdapter"+ classpathref="ecj.classpath" name="ecj-component"/>+ <property name="ecj.loaded" value="true"/>+ </target><macrodef name="ecj-macro"><attribute name="srcdir"/>@@ -1499,22 +1507,20 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites<element name="nested" implicit="yes" optional="yes"/><sequential>- <ivy:cachepath- organisation="org.eclipse.jdt.core.compiler" module="ecj"- revision="3.7.2" inline="true" conf="master" type="jar"- pathid="ecj.classpath" log="download-only" /><javac- compiler="org.eclipse.jdt.core.JDTCompilerAdapter"includeAntRuntime="@{includeantruntime}"encoding="${build.encoding}"srcdir="@{srcdir}"source="@{javac.source}"- target="@{javac.source}">+ target="@{javac.source}"+ taskname="ecj-lint">+ <ecj-component/><nested/>- <compilerclasspath>- <path refid="ecj.classpath"/>- </compilerclasspath>- <compilerarg line="-d none -enableJavadoc -properties @{configuration}"/>+ <compilerarg value="-d"/>+ <compilerarg value="none"/>+ <compilerarg value="-enableJavadoc"/>+ <compilerarg value="-properties"/>+ <compilerarg value="@{configuration}"/></javac></sequential></macrodef>diff --git a/solr/build.xml b/solr/build.xmlindex 197cbe75b8c..162b99e7d3a 100644--- a/solr/build.xml+++ b/solr/build.xml@@ -522,8 +522,9 @@<!-- TODO: does solr have any other docs we should check? --><!-- TODO: also integrate checkJavaDocs.py, which does more checks -->- <target name="documentation-lint" depends="compile-solr-test-framework,documentation">+ <target name="documentation-lint" depends="compile-solr-test-framework,documentation,-ecj-resolve"><subant target="-ecj-javadoc-lint" failonerror="true" inheritall="false">+ <propertyset refid="uptodate.and.compiled.properties"/><fileset dir="core" includes="build.xml"/><fileset dir="solrj" includes="build.xml"/><fileset dir="test-framework" includes="build.xml"/>diff --git a/solr/solrj/build.xml b/solr/solrj/build.xmlindex 758734a7f50..920b72a40de 100644--- a/solr/solrj/build.xml+++ b/solr/solrj/build.xml@@ -50,7 +50,7 @@(even though it doesnt compile with it)TODO: would be nice to fix this up better, but its hard because ofthe different ways solr links to lucene javadocs -->- <target name="-ecj-javadoc-lint-src">+ <target name="-ecj-javadoc-lint-src" depends="-ecj-resolve"><ecj-macro srcdir="${src.dir}" configuration="${common.dir}/tools/javadoc/ecj.javadocs.prefs"><classpath><path refid="classpath"/>