lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r1087458 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/CHANGES.txt lucene/build.xml lucene/common-build.xml solr/ solr/CHANGES.txt solr/build.xml solr/common-build.xml
Date Thu, 31 Mar 2011 22:06:31 GMT
Author: gsingers
Date: Thu Mar 31 22:06:31 2011
New Revision: 1087458

URL: http://svn.apache.org/viewvc?rev=1087458&view=rev
Log:
LUCENE-3006: backport

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/CHANGES.txt
    lucene/dev/branches/branch_3x/lucene/build.xml
    lucene/dev/branches/branch_3x/lucene/common-build.xml
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/CHANGES.txt
    lucene/dev/branches/branch_3x/solr/build.xml
    lucene/dev/branches/branch_3x/solr/common-build.xml

Modified: lucene/dev/branches/branch_3x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/CHANGES.txt?rev=1087458&r1=1087457&r2=1087458&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/CHANGES.txt Thu Mar 31 22:06:31 2011
@@ -1,5 +1,10 @@
 Lucene Change Log
 
+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/branches/branch_3x/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/build.xml?rev=1087458&r1=1087457&r2=1087458&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/build.xml Thu Mar 31 22:06:31 2011
@@ -159,6 +159,7 @@
       <echo>DEPRECATED - Doing Nothing.  See http://wiki.apache.org/lucene-java/HowToUpdateTheWebsite</echo>
   </target>
 
+  <target name="javadoc" depends="javadocs"/>
   <target name="javadocs" description="Generate javadoc" 
           depends="javadocs-all, javadocs-core, javadocs-contrib, javadocs-test-framework">
     <echo file="${javadoc.dir}/index.html" append="false">
@@ -201,6 +202,17 @@
   <target name="javadocs-all" description="Generate javadoc for core and contrib classes"
depends="build-contrib">
   	<sequential>
       <mkdir dir="${javadoc.dir}/all"/>
+
+      <path id="javadoc.classpath">
+        <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"/>
+      </path>
+
       <invoke-javadoc
         destdir="${javadoc.dir}/all">
         <sources>

Modified: lucene/dev/branches/branch_3x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/common-build.xml?rev=1087458&r1=1087457&r2=1087458&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/common-build.xml Thu Mar 31 22:06:31 2011
@@ -102,6 +102,7 @@
     <path refid="classpath"/>
     <pathelement location="${ant.home}/lib/ant.jar"/>
     <fileset dir=".">
+      <exclude name="build/**/*.jar"/>
       <include name="**/lib/*.jar"/>
     </fileset>
   </path>
@@ -754,7 +755,8 @@
       </fixcrlf>
     </sequential>
   </macrodef>
-	
+
+  <property name="failonjavadocwarning" value="true"/>
   <macrodef name="invoke-javadoc">
     <element name="sources" optional="yes"/>
     <attribute name="destdir"/>
@@ -764,6 +766,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.*"
@@ -775,6 +778,7 @@
           author="true"
           version="true"
           use="true"
+          failonerror="true"
           source="${ant.java.version}"
           link="${javadoc.link}"
           windowtitle="${Name} ${version} API"
@@ -796,6 +800,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/branches/branch_3x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/CHANGES.txt?rev=1087458&r1=1087457&r2=1087458&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/solr/CHANGES.txt Thu Mar 31 22:06:31 2011
@@ -22,6 +22,8 @@ See README.txt and http://lucene.apache.
 on how to get started.
 
 
+* 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/branches/branch_3x/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/build.xml?rev=1087458&r1=1087457&r2=1087458&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/build.xml Thu Mar 31 22:06:31 2011
@@ -221,6 +221,7 @@
                    failonerror="true"/>
   </target>
 
+  <target name="javadocs" depends="javadoc"/>
   <target name="javadoc" depends="javadoc-core, javadoc-contrib, javadoc-solrj, javadoc-all">
   </target>
 

Modified: lucene/dev/branches/branch_3x/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/common-build.xml?rev=1087458&r1=1087457&r2=1087458&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/common-build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/common-build.xml Thu Mar 31 22:06:31 2011
@@ -328,6 +328,7 @@
     </sequential>
   </macrodef>
 
+  <property name="failonjavadocwarning" value="true"/>
   <macrodef name="invoke-javadoc">
     <element name="sources" optional="yes"/>
     <attribute name="destdir"/>
@@ -337,6 +338,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"
@@ -371,6 +373,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>
 



Mime
View raw message