This seems to have worked. copy.from seems to allow a list. Thanks
for the help!
subprojects.each { subProject->
subProject.sourceSets.each { set ->
if ("test" != set.name) {
source set.java
if (classpath) {
classpath += set.classes + set.compileClasspath
}
else {
classpath = set.classes + set.compileClasspath
}
// Some of the component .xdoc files refer to PNG images
// (we could also exclude .java and .xdoc)
copy {
from openset.java.srcDirs.toList()
into javadocBuildDir.dir
include '**/*.png'
}
}
}
}
On Thu, Jun 9, 2011 at 9:55 AM, Howard Lewis Ship <[email protected]> wrote:
> On Wed, Jun 8, 2011 at 11:53 PM, Luke Daley <[email protected]> wrote:
>> Hi Howard,
>>
>> What's going wrong for you?
>>
>> Regardless, give this a try…
>>
>> from *set.java.srcDirs.toList()
>
> I'll give that a try. What was happening is simply that no files were
> being copied, resulting in broken image links in my JavaDoc pages.
>
> From what I can tell, the JavaDoc code (from Oracle) is itself broken;
> it claims to copy files in the doc-files folder beneath each package,
> but doesn't do so in practice. A Google search shows I'm not the only
> one with this problem, so my original plan (move the files from the
> package folder to package/doc-files) isn't worth pursuing.
>
>>
>> The spread would be needed because srcDirs returns a Set, and we are calling
>> from(Object...).
>>
>> On 09/06/2011, at 3:28 AM, Howard Lewis Ship wrote:
>>
>>> I'm working around two problems:
>>> 1) My existing source doesn't put JavaDoc files into the doc-files
>>> folder in each package and I don't want to reorganize
>>> 2) Javadoc's handling of the doc-files folder seems to be broken anyway
>>>
>>> In my aggregate JavaDoc task, I'm attempting to copy some PNG files
>>> into the output, since my JavaDoc refers to them; i.e.
>>>
>>> Grid.java contains <img src="grid.png"/>
>>> grid.png is in the same folder (under src/main/java) as Grid.java
>>>
>>>
>>> Here's what I have so far:
>>>
>>>
>>> javadocBuildDir = dir(buildDirName + "/documentation/javadocs")
>>>
>>> task aggregateJavadoc(type: Javadoc) {
>>>
>>> dependsOn configurations.javadoc
>>>
>>> description = "Build the aggregated JavaDocs for all modules"
>>> maxMemory = '512m'
>>> destinationDir = javadocBuildDir.dir
>>> configure(options) {
>>> // overview = new File( projectDir, 'src/javadoc/package.html' )
>>> // stylesheetFile = new File( projectDir,
>>> 'src/javadoc/stylesheet.css' )
>>> windowTitle = 'Tapestry API Documentation'
>>> docTitle = "Tapestry JavaDoc ($project.version)"
>>> bottom = "Copyright © 2003-2011 <a
>>> href=\"http://tapestry.apache.org\">The Apache Software
>>> Foundation</a>."
>>> use = true
>>> links = [ 'http://download.oracle.com/javase/6/docs/api/',
>>> 'http://download.oracle.com/javaee/6/api/' ]
>>> addStringOption "tagletpath", configurations.javadoc.asPath
>>> addStringOption "taglet",
>>> "org.apache.tapestry5.javadoc.TapestryDocTaglet"
>>> excludes = ['org.apache.tapestry.internal.plastic.asm']
>>> }
>>>
>>> subprojects.each { subProject->
>>>
>>> subProject.sourceSets.each { set ->
>>>
>>> if ("test" != set.name) {
>>> source set.java
>>>
>>> if (classpath) {
>>> classpath += set.classes + set.compileClasspath
>>> }
>>> else {
>>> classpath = set.classes + set.compileClasspath
>>> }
>>>
>>> copy {
>>> from set.java
>>> into javadocBuildDir.dir
>>> include '**/*.png'
>>> }
>>> }
>>> }
>>> }
>>> }
>>>
>>> I think the "from" line should not be from set.java, but I'm not sure
>>> what it should be. Thanks in advance for any help!
>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>> http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email