Skip to content

Apache Lucene open-source search software

Repair Solr snapshot javadocs to work on windows and with spaces in filename (same fix like in Lucene's docs XSL transformation): The hrefs to external docs must be valid URIs and plain path are not valid URIs, they must start with file:, slashes converted, and spaces escaped. scriptmapper helps with new File(path).toURI()

Uwe Schindlereee56c65d58c
diff --git a/solr/common-build.xml b/solr/common-build.xml
index 20170152fac..88cd7bf7f97 100644
--- a/solr/common-build.xml
+++ b/solr/common-build.xml
@@ -248,8 +248,14 @@
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="${common.dir}/build/docs/"/>
+ <pathconvert property="lucene.javadoc.url">
+ <dirset dir="${common.dir}" includes="build/docs"/>
+ <mapper>
+ <scriptmapper language="javascript">
+ self.addMappedName((new java.io.File(source)).toURI());
+ </scriptmapper>
+ </mapper>
+ </pathconvert>
</target>
<target name="define-lucene-javadoc-url-release" unless="version.contains.SNAPSHOT">