You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gs...@apache.org on 2011/03/31 21:56:47 UTC
svn commit: r1087426 - in /lucene/dev/trunk: lucene/CHANGES.txt
lucene/build.xml lucene/common-build.xml solr/CHANGES.txt
solr/common-build.xml
Author: gsingers
Date: Thu Mar 31 19:56:47 2011
New Revision: 1087426
URL: http://svn.apache.org/viewvc?rev=1087426&view=rev
Log:
LUCENE-3006: fail on javadoc warnings
Modified:
lucene/dev/trunk/lucene/CHANGES.txt
lucene/dev/trunk/lucene/build.xml
lucene/dev/trunk/lucene/common-build.xml
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/common-build.xml
Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1087426&r1=1087425&r2=1087426&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Thu Mar 31 19:56:47 2011
@@ -379,6 +379,11 @@ Test Cases
stop iterating if at least 'tests.iter.min' ran and a failure occured.
(Shai Erera, Chris Hostetter)
+Build
+
+* LUCENE-3006: Building javadocs will fail on warnings by default. Override with -Dfailonjavadocwarning=false (sarowe, gsingers)
+
+
======================= Lucene 3.x (not yet released) =======================
Changes in backwards compatibility policy
Modified: lucene/dev/trunk/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/build.xml?rev=1087426&r1=1087425&r2=1087426&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/build.xml (original)
+++ lucene/dev/trunk/lucene/build.xml Thu Mar 31 19:56:47 2011
@@ -200,6 +200,7 @@
<path refid="classpath"/>
<pathelement location="${ant.home}/lib/ant.jar"/>
<fileset dir=".">
+ <exclude name="build/**/*.jar"/>
<include name="**/lib/*.jar"/>
</fileset>
<pathelement location="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"/>
Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1087426&r1=1087425&r2=1087426&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Thu Mar 31 19:56:47 2011
@@ -103,6 +103,7 @@
<path refid="classpath"/>
<pathelement location="${ant.home}/lib/ant.jar"/>
<fileset dir=".">
+ <exclude name="build/**/*.jar"/>
<include name="**/lib/*.jar"/>
</fileset>
</path>
@@ -762,7 +763,8 @@
</fixcrlf>
</sequential>
</macrodef>
-
+
+ <property name="failonjavadocwarning" value="true"/>
<macrodef name="invoke-javadoc">
<element name="sources" optional="yes"/>
<attribute name="destdir"/>
@@ -772,6 +774,7 @@
<copy todir="@{destdir}/../prettify" overwrite="false">
<fileset dir="${prettify.dir}"/>
</copy>
+ <record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>
<javadoc
overview="@{overview}"
packagenames="org.apache.lucene.*"
@@ -783,6 +786,7 @@
author="true"
version="true"
use="true"
+ failonerror="true"
source="${ant.java.version}"
link="${javadoc.link}"
windowtitle="${Name} ${version} API"
@@ -804,6 +808,26 @@
<classpath refid="javadoc.classpath"/>
</javadoc>
+ <record name="@{destdir}/log_javadoc.txt" action="stop"/>
+
+ <delete>
+ <fileset file="@{destdir}/log_javadoc.txt">
+ <not>
+ <containsregexp expression="\[javadoc\]\s*[1-9][0-9]*[\s]*warning"/>
+ </not>
+ </fileset>
+ </delete>
+
+ <fail message="Javadocs warnings were found!">
+ <condition>
+ <and>
+ <available file="@{destdir}/log_javadoc.txt"/>
+ <istrue value="${failonjavadocwarning}"/>
+ </and>
+ </condition>
+ </fail>
+
+
</sequential>
</macrodef>
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1087426&r1=1087425&r2=1087426&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Thu Mar 31 19:56:47 2011
@@ -211,6 +211,8 @@ Documentation
* SOLR-2232: Improved README info on solr.solr.home in examples
(Eric Pugh and hossman)
+* LUCENE-3006: Building javadocs will fail on warnings by default. Override with -Dfailonjavadocwarning=false (sarowe, gsingers)
+
================== 3.2.0-dev ==================
Versions of Major Components
---------------------
Modified: lucene/dev/trunk/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/common-build.xml?rev=1087426&r1=1087425&r2=1087426&view=diff
==============================================================================
--- lucene/dev/trunk/solr/common-build.xml (original)
+++ lucene/dev/trunk/solr/common-build.xml Thu Mar 31 19:56:47 2011
@@ -330,6 +330,7 @@
</sequential>
</macrodef>
+ <property name="failonjavadocwarning" value="true"/>
<macrodef name="invoke-javadoc">
<element name="sources" optional="yes"/>
<attribute name="destdir"/>
@@ -339,6 +340,7 @@
<copy todir="@{destdir}/prettify" overwrite="false">
<fileset dir="${prettify.dir}"/>
</copy>
+ <record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>
<javadoc
packagenames="org.apache.solr.*"
failonerror="true"
@@ -373,6 +375,24 @@
<classpath refid="javadoc.classpath"/>
</javadoc>
+ <record name="@{destdir}/log_javadoc.txt" action="stop"/>
+
+ <delete>
+ <fileset file="@{destdir}/log_javadoc.txt">
+ <not>
+ <containsregexp expression="\[javadoc\]\s*[1-9][0-9]*[\s]*warning"/>
+ </not>
+ </fileset>
+ </delete>
+
+ <fail message="Javadocs warnings were found!" >
+ <condition>
+ <and>
+ <available file="@{destdir}/log_javadoc.txt"/>
+ <istrue value="${failonjavadocwarning}"/>
+ </and>
+ </condition>
+ </fail>
</sequential>
</macrodef>