mirror of https://github.com/apache/lucene.git
LUCENE-4409: Improve ECJ-Linter (permgen, taskname) + fix whitespace bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1389491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2957201208
commit
c08962374e
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
(even though it doesnt compile with it)
|
||||
TODO: would be nice to fix this up better, but its hard because of
|
||||
the 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"/>
|
||||
|
|
Loading…
Reference in New Issue