A follow on ...
I'm attempting to set the tagletpath when running JavaDoc, as so:
configurations {
javadoc
}
dependencies {
javadoc project(':tapestry-javadoc')
}
...
task aggregateJavadoc(type: 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/' ]
verbose = true
addStringOption "tagletpath", configurations.javadoc.asPath
addStringOption "taglet",
"org.apache.tapestry5.javadoc.TapestryDocTaglet"
}
That works, somewhat. What I see in the generated options file is slightly off:
-link 'http://download.oracle.com/javase/6/docs/api/'
-link 'http://download.oracle.com/javaee/6/api/'
-tagletpath
'/Users/hlship/workspaces/tapestry/tapestry5/tapestry-javadoc/build/libs/tapestry-javadoc-5.3.0-SNAPSHOT-sources.jar:/Users/hlship/workspaces/tapestry/tapestry5/tapestry-javadoc/build/libs/tapestry-javadoc-5.3.0-SNAPSHOT.jar:/Users/hlship/workspaces/tapestry/tapestry5/tapestry-annotations/build/libs/tapestry-annotations-5.3.0-SNAPSHOT-sources.jar:/Users/hlship/workspaces/tapestry/tapestry5/tapestry-annotations/build/libs/tapestry-annotations-5.3.0-SNAPSHOT.jar'
-use
-doctitle 'Tapestry JavaDoc (unspecified)'
-d '/Users/hlship/workspaces/tapestry/tapestry5/build/documentation/javadocs'
-taglet 'org.apache.tapestry5.javadoc.TapestryDocTaglet'
That's somewhat right ... except but there are some problems.
First, why does it include the sources JAR files?
Second, it's referencing files that don't exist. The build does not
create the .jar files for the tapestry-javadoc module. It compiles,
but does not package them. Surely, referencing them in my top-level
project should spur the correct build; alternately, the path should be
to the tapestry-javadoc/build/classes folder.
To simplify things, I edited my settings.gradle and commented out most
of my modules, then did a clean build:
$ gr clean aggJ
:clean
:plastic:clean
:tapestry-annotations:clean
:tapestry-javadoc:clean
:plastic:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:plastic:compileGroovy UP-TO-DATE
:plastic:processResources UP-TO-DATE
:plastic:classes
:tapestry-annotations:compileJava
:tapestry-annotations:compileGroovy UP-TO-DATE
:tapestry-annotations:processResources UP-TO-DATE
:tapestry-annotations:classes
:tapestry-annotations:jar
:tapestry-annotations:sourcesJar
:tapestry-javadoc:compileJava
:tapestry-javadoc:compileGroovy UP-TO-DATE
:tapestry-javadoc:processResources UP-TO-DATE
:tapestry-javadoc:classes
:aggregateJavadoc
javadoc: error - Error - Exception java.lang.ClassNotFoundException
thrown while trying to register Taglet
org.apache.tapestry5.javadoc.TapestryDocTaglet...
What I'm seeing here is that that jar & sourcesJar tasks are only
being triggered when a module has a dependency on another module.
Here, :tapestry-javadoc has a compile dependency on
:tapestry-annotations, but does not have a dependency on :plastic.
I've been thrashing on this, I figured maybe a call to resolve() was in order:
addStringOption "tagletpath",
files(configurations.javadoc.resolve()).asPath
But that didn't accomplish anything different.
Perhaps I'm missing something about how dependencies and configurations work?
--
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