LUCENE-3228: Stop downloading external javadoc package-list files

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1210020 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2011-12-03 21:52:04 +00:00
parent a6291e331b
commit 4d901e9cd2
9 changed files with 327 additions and 9 deletions

View File

@ -669,6 +669,34 @@ Bug fixes
to correctly respect deletions on reopened SegmentReaders. Factored out
FieldCacheDocIdSet to be a top-level class. (Uwe Schindler, Simon Willnauer)
Build
* LUCENE-3228: Stop downloading external javadoc package-list files:
- Added package-list files for Oracle Java javadocs and JUnit javadocs to
Lucene/Solr subversion.
- The Oracle Java javadocs package-list file is excluded from Lucene and
Solr source release packages.
- Regardless of network connectivity, javadocs built from a subversion
checkout contain links to Oracle & JUnit javadocs.
- Building javadocs from a source release package will download the Oracle
Java package-list file if it isn't already present.
- When the Oracle Java package-list file is not present and download fails,
the javadocs targets will not fail the build, though an error will appear
in the build log. In this case, the built javadocs will not contain links
to Oracle Java javadocs.
- Links from Solr javadocs to Lucene's javadocs are enabled. When building
a X.Y.Z-SNAPSHOT version, the links are to the most recently built nightly
Jenkins javadocs. When building a release version, links are to the
Lucene release javadocs for the same version.
(Steve Rowe, hossman)
======================= Lucene 3.5.0 =======================
Changes in backwards compatibility policy

View File

@ -249,6 +249,7 @@
<sources>
<!-- TODO: find a dynamic way to do include multiple source roots -->
<packageset dir="src/java"/>
<packageset dir="src/test-framework/java"/>
<!-- please keep this list up to date, and in alpha order... -->
@ -377,6 +378,10 @@
value="${dist.dir}/lucene-${version}-src.tgz"/>
<delete file="${source.package.file}"/>
<svn-export-source source.dir="."/>
<!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->
<delete dir="${svn.export.dir}/src/tools/javadoc/java6"/>
<build-changes changes.src.dir="${svn.export.dir}/src/site/changes"
changes.target.dir="${svn.export.dir}/docs/changes"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
@ -567,6 +572,8 @@
title="${Name} ${version} Test Framework API">
<sources>
<packageset dir="src/test-framework/java"/>
<link offline="true" href="${javadoc.link.junit}"
packagelistLoc="${javadoc.packagelist.dir}/junit"/>
<link href=""/>
</sources>
</invoke-javadoc>

View File

@ -110,6 +110,9 @@
<property name="javac.includeAntRuntime" value="${run.clover}"/>
<property name="javadoc.link" value="http://download.oracle.com/javase/6/docs/api/"/>
<property name="javadoc.link.junit" value="http://junit.sourceforge.net/javadoc/"/>
<property name="javadoc.packagelist.dir" value="${common.dir}/src/tools/javadoc"/>
<available file="${javadoc.packagelist.dir}/java6/package-list" property="javadoc.java6.packagelist.exists"/>
<property name="javadoc.access" value="protected"/>
<property name="javadoc.charset" value="utf-8"/>
<property name="javadoc.dir" value="${common.dir}/build/docs/api"/>
@ -843,6 +846,7 @@
<attribute name="title" default="${Name} ${version} API"/>
<attribute name="overview" default="${src.dir}/overview.html"/>
<sequential>
<antcall target="download-java6-javadoc-packagelist"/>
<copy todir="@{destdir}" file="${prettify.dir}/prettify.js" overwrite="false" />
<copy todir="@{destdir}" file="${prettify.dir}/prettify.css" overwrite="false" />
<record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>
@ -859,7 +863,6 @@
use="true"
failonerror="true"
source="${ant.java.version}"
link="${javadoc.link}"
windowtitle="${Name} ${version} API"
doctitle="@{title}"
stylesheetfile="${prettify.dir}/stylesheet+prettify.css"
@ -870,6 +873,7 @@
<tag name="lucene.internal"
description="NOTE: This API is for internal purposes only and might change in incompatible ways in the next release."/>
<link offline="true" packagelistLoc="${javadoc.dir}"/>
<link offline="true" href="${javadoc.link}" packagelistLoc="${javadoc.packagelist.dir}/java6"/>
<header><![CDATA[
<script src="{@docRoot}/prettify.js" type="text/javascript"></script>
<script language="JavaScript">window.onload=function(){windowTitle();prettyPrint();}</script>
@ -920,6 +924,12 @@
</sequential>
</macrodef>
<target name="download-java6-javadoc-packagelist" unless="javadoc.java6.packagelist.exists">
<mkdir dir="${javadoc.packagelist.dir}/java6"/>
<get src="${javadoc.link}/package-list"
dest="${javadoc.packagelist.dir}/java6/package-list" ignoreerrors="true"/>
</target>
<!-- VALIDATION work -->
<target name="check-legal-lucene" depends="compile-tools">

View File

@ -150,6 +150,7 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
my $line;
my $item = $_;
$item =~ s/^(\s*\Q$type\E\s*)//; # Trim the leading bullet
print STDERR $item if not defined($1);
my $leading_ws_width = length($1);
$item =~ s/\s+$//; # Trim trailing whitespace
$item .= "\n";

View File

@ -0,0 +1,203 @@
java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
java.awt.geom
java.awt.im
java.awt.im.spi
java.awt.image
java.awt.image.renderable
java.awt.print
java.beans
java.beans.beancontext
java.io
java.lang
java.lang.annotation
java.lang.instrument
java.lang.management
java.lang.ref
java.lang.reflect
java.math
java.net
java.nio
java.nio.channels
java.nio.channels.spi
java.nio.charset
java.nio.charset.spi
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server
java.security
java.security.acl
java.security.cert
java.security.interfaces
java.security.spec
java.sql
java.text
java.text.spi
java.util
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
java.util.jar
java.util.logging
java.util.prefs
java.util.regex
java.util.spi
java.util.zip
javax.accessibility
javax.activation
javax.activity
javax.annotation
javax.annotation.processing
javax.crypto
javax.crypto.interfaces
javax.crypto.spec
javax.imageio
javax.imageio.event
javax.imageio.metadata
javax.imageio.plugins.bmp
javax.imageio.plugins.jpeg
javax.imageio.spi
javax.imageio.stream
javax.jws
javax.jws.soap
javax.lang.model
javax.lang.model.element
javax.lang.model.type
javax.lang.model.util
javax.management
javax.management.loading
javax.management.modelmbean
javax.management.monitor
javax.management.openmbean
javax.management.relation
javax.management.remote
javax.management.remote.rmi
javax.management.timer
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
javax.net
javax.net.ssl
javax.print
javax.print.attribute
javax.print.attribute.standard
javax.print.event
javax.rmi
javax.rmi.CORBA
javax.rmi.ssl
javax.script
javax.security.auth
javax.security.auth.callback
javax.security.auth.kerberos
javax.security.auth.login
javax.security.auth.spi
javax.security.auth.x500
javax.security.cert
javax.security.sasl
javax.sound.midi
javax.sound.midi.spi
javax.sound.sampled
javax.sound.sampled.spi
javax.sql
javax.sql.rowset
javax.sql.rowset.serial
javax.sql.rowset.spi
javax.swing
javax.swing.border
javax.swing.colorchooser
javax.swing.event
javax.swing.filechooser
javax.swing.plaf
javax.swing.plaf.basic
javax.swing.plaf.metal
javax.swing.plaf.multi
javax.swing.plaf.synth
javax.swing.table
javax.swing.text
javax.swing.text.html
javax.swing.text.html.parser
javax.swing.text.rtf
javax.swing.tree
javax.swing.undo
javax.tools
javax.transaction
javax.transaction.xa
javax.xml
javax.xml.bind
javax.xml.bind.annotation
javax.xml.bind.annotation.adapters
javax.xml.bind.attachment
javax.xml.bind.helpers
javax.xml.bind.util
javax.xml.crypto
javax.xml.crypto.dom
javax.xml.crypto.dsig
javax.xml.crypto.dsig.dom
javax.xml.crypto.dsig.keyinfo
javax.xml.crypto.dsig.spec
javax.xml.datatype
javax.xml.namespace
javax.xml.parsers
javax.xml.soap
javax.xml.stream
javax.xml.stream.events
javax.xml.stream.util
javax.xml.transform
javax.xml.transform.dom
javax.xml.transform.sax
javax.xml.transform.stax
javax.xml.transform.stream
javax.xml.validation
javax.xml.ws
javax.xml.ws.handler
javax.xml.ws.handler.soap
javax.xml.ws.http
javax.xml.ws.soap
javax.xml.ws.spi
javax.xml.ws.wsaddressing
javax.xml.xpath
org.ietf.jgss
org.omg.CORBA
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.TypeCodePackage
org.omg.CORBA.portable
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CosNaming
org.omg.CosNaming.NamingContextExtPackage
org.omg.CosNaming.NamingContextPackage
org.omg.Dynamic
org.omg.DynamicAny
org.omg.DynamicAny.DynAnyFactoryPackage
org.omg.DynamicAny.DynAnyPackage
org.omg.IOP
org.omg.IOP.CodecFactoryPackage
org.omg.IOP.CodecPackage
org.omg.Messaging
org.omg.PortableInterceptor
org.omg.PortableInterceptor.ORBInitInfoPackage
org.omg.PortableServer
org.omg.PortableServer.CurrentPackage
org.omg.PortableServer.POAManagerPackage
org.omg.PortableServer.POAPackage
org.omg.PortableServer.ServantLocatorPackage
org.omg.PortableServer.portable
org.omg.SendingContext
org.omg.stub.java.rmi
org.w3c.dom
org.w3c.dom.bootstrap
org.w3c.dom.events
org.w3c.dom.ls
org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers

View File

@ -0,0 +1,7 @@
org.hamcrest.core
org.junit
org.junit.matchers
org.junit.runner
org.junit.runner.manipulation
org.junit.runner.notification
org.junit.runners

View File

@ -305,6 +305,10 @@
value="${package.dir}/${fullnamever}-src.tgz"/>
<delete file="${source.package.file}" failonerror="false" />
<svn-export-source source.dir=".."/>
<!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->
<delete dir="${svn.export.dir}/lucene/src/tools/javadoc/java6"/>
<tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset dir="${svn.export.dir}"
prefix="${fullnamever}"
@ -430,8 +434,9 @@
<fileset dir="${common-solr.dir}/site" />
</copy>
</target>
<target name="javadocs-all" depends="prep-lucene-jars,javadocs-dep"
<target name="javadocs-all"
depends="prep-lucene-jars,javadocs-dep,lucene-javadocs-all,define-lucene-javadoc-url"
description="Generate javadoc for core, java client and contrib">
<sequential>
<mkdir dir="${dest}/docs/api"/>
@ -456,6 +461,8 @@
<invoke-javadoc destdir="${dest}/docs/api"
overview="core/src/java/overview.html">
<sources>
<link offline="true" href="${lucene.javadoc.url}"
packagelistloc="${common.dir}/build/docs/api/all/"/>
<packageset dir="core/src/java" />
<packageset dir="solrj/src/java" />
<packageset dir="contrib/analysis-extras/src/java"/>

View File

@ -25,6 +25,9 @@
<property name="Name" value="Solr" />
<property name="version" value="4.0-SNAPSHOT"/>
<condition property="version.contains.SNAPSHOT">
<contains casesensitive="true" string="${version}" substring="-SNAPSHOT"/>
</condition>
<property name="fullname" value="apache-${ant.project.name}"/>
<property name="fullnamever" value="${fullname}-${version}"/>
<property name="final.name" value="${fullnamever}"/>
@ -212,13 +215,19 @@
<copy file="${build.dir}/${fullnamever}.jar" todir="${dist}"/>
</target>
<target name="javadocs" depends="compile-core">
<target name="lucene-javadocs-all">
<ant dir="${common.dir}" target="javadocs-all" inheritall="false"/>
</target>
<target name="javadocs" depends="compile-core,lucene-javadocs-all,define-lucene-javadoc-url">
<sequential>
<mkdir dir="${javadoc.dir}"/>
<mkdir dir="${dest}/META-INF/"/>
<invoke-javadoc destdir="${javadoc.dir}"
title="${Name} ${version} ${name} API">
<sources>
<link offline="true" href="${lucene.javadoc.url}"
packagelistloc="${common.dir}/build/docs/api/all/"/>
<link href=""/>
<packageset dir="${src.dir}"/>
</sources>
@ -232,6 +241,26 @@
</sequential>
</target>
<target name="define-lucene-javadoc-url"
depends="define-lucene-javadoc-url-SNAPSHOT,define-lucene-javadoc-url-release"/>
<target name="define-lucene-javadoc-url-SNAPSHOT" if="version.contains.SNAPSHOT">
<property name="lucene.javadoc.url"
value="https://builds.apache.org/job/Lucene-3.x/javadoc/all/"/>
</target>
<target name="define-lucene-javadoc-url-release" unless="version.contains.SNAPSHOT">
<loadproperties>
<propertyresource name="version"/>
<filterchain>
<replaceregex pattern="[.]" replace="_" flags="g"/>
<prefixlines prefix="underscore.version="/>
</filterchain>
</loadproperties>
<property name="lucene.javadoc.url"
value="http://lucene.apache.org/java/${underscore.version}/api/all/"/>
</target>
<target name="jar-src" depends="init">
<jarify basedir="${src.dir}"
destfile="${build.dir}/${final.name}-src.jar"

View File

@ -39,11 +39,37 @@
</compile>
</target>
<target name="javadocs" depends="common-solr.javadocs">
<mkdir dir="${dest}/docs/api/test-framework"/>
<copy todir="${dest}/docs/api/test-framework">
<fileset dir="${javadoc.dir}"/>
</copy>
<!-- Override common-solr.javadocs to include a JUnit javadoc link -->
<!-- and to copy the built javadocs to ${dest}/docs/api/test-framework -->
<target name="javadocs"
depends="compile-core,lucene-javadocs-all,define-lucene-javadoc-url">
<sequential>
<mkdir dir="${javadoc.dir}"/>
<mkdir dir="${dest}/META-INF/"/>
<invoke-javadoc destdir="${javadoc.dir}"
title="${Name} ${version} ${name} API">
<sources>
<link offline="true" href="${lucene.javadoc.url}"
packagelistloc="${common.dir}/build/docs/api/all/"/>
<link offline="true" href="${lucene-javadoc-url}"
packagelistloc="${common.dir}/build/docs/api/all/"/>
<link offline="true" href="${javadoc.link.junit}"
packagelistLoc="${javadoc.packagelist.dir}/junit"/>
<link href=""/>
<packageset dir="${src.dir}"/>
</sources>
</invoke-javadoc>
<jarify basedir="${javadoc.dir}"
destfile="${build.dir}/${final.name}-javadoc.jar"
title="Apache Solr Search Server: ${ant.project.name}"
metainf.source.dir="${common-solr.dir}"
implementation.title="org.apache.solr"
spec.version="${solr.spec.version}"/>
<mkdir dir="${dest}/docs/api/test-framework"/>
<copy todir="${dest}/docs/api/test-framework">
<fileset dir="${javadoc.dir}"/>
</copy>
</sequential>
</target>
</project>