Hi Shai,
On 9/22/2011 at 4:09 AM, Shai Erera wrote:
> I looked into how to include the prettify directory with the .jar, and
> the only way I found is to copy the prettify dir to @destDir/prettify
> in "invoke-javadoc" macro. The reason is that when "jarify" is called
> later, it takes only a baseDir and not a fileset, so 'prettify' must
> already exist underneath the component's docs dir.
> [...]
> Someone else can help me figure out how to jarify the prettify dir
> under a component's docs dir, without copying it there first ...
With a small change to "jarify" to convert its @{basedir} and @{export}
attributes to a fileset, it should be possible to add fileset(s) using the
<nested> tag that "jarify" already supports, I think it should be possible for
"jarify" to create jars from multiple source dirs. Here's a "jarify" patch
that should do the trick, I think:
-----
Index: lucene/common-build.xml
===================================================================
--- lucene/common-build.xml (revision 1163625)
+++ lucene/common-build.xml (revision )
@@ -436,11 +436,9 @@
implementation.title="@{implementation.title}"
spec.version="@{spec.version}"/>
- <jar destfile="@{destfile}"
- basedir="@{basedir}"
- manifest="${manifest.file}"
- excludes="@{excludes}">
+ <jar destfile="@{destfile}" manifest="${manifest.file}">
<metainf dir="@{metainf.source.dir}"
includes="LICENSE.txt,NOTICE.txt"/>
+ <fileset dir="@{basedir}" excludes="@{excludes}"/>
<nested />
</jar>
</sequential>
-----
Here's the change I was thinking of to the "javadocs" target in
lucene/contrib-build.xml; a similar change will be required in the other places
javadoc jars are created, for "javadocs-test-framework" and "javadocs-all":
Index: lucene/contrib/contrib-build.xml
===================================================================
--- lucene/contrib/contrib-build.xml (revision 1165174)
+++ lucene/contrib/contrib-build.xml (revision )
@@ -94,6 +94,9 @@
<link href=""/>
<packageset dir="${src.dir}"/>
</sources>
+ <nested>
+ <fileset dir="${prettify.dir}"/>
+ </nested>
</invoke-javadoc>
<jarify basedir="${javadoc.dir}/contrib-${name}"
destfile="${build.dir}/${final.name}-javadoc.jar"/>
</sequential>