I'm attempting to create aggregated JavaDoc for my multi-module
project.  In the top-level build.gradle I've added the following:

// Cribbed from
https://github.com/hibernate/hibernate-core/blob/master/release/release.gradle#L19

javadocBuildDir = dir( buildDirName + "/documentation/javadocs" )

task aggregateJavadocs(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 &copy; 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/' ]
    }

    subprojects.each { subProject->
        
                println 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
                }
            }
        }
    }
}

This fails immediately:

$ gr agg
project ':plastic'

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/hlship/workspaces/tapestry/tapestry5/build.gradle' line: 37

* What went wrong:
A problem occurred evaluating root project 'tapestry5'.
Cause: Could not find property 'sourceSets' on project ':plastic'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info
or --debug option to get more log output.

BUILD FAILED

Total time: 1.697 secs
~/workspaces/tapestry/p
$

I'm on Gradle 1.0-milestone-1

Full source here: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/

With debug, not any more helpful:

18:18:58.997 [INFO] [org.gradle.BuildLogger] Projects loaded. Root
project using build file
'/Users/hlship/workspaces/tapestry/tapestry5/build.gradle'.
18:18:58.999 [INFO] [org.gradle.BuildLogger] Included projects: [root
project 'tapestry5', project ':plastic', project
':tapestry-annotations', project ':tapestry-beanvalidator', project
':tapestry-core', project ':tapestry-func', project
':tapestry-hibernate', project ':tapestry-hibernate-core', project
':tapestry-ioc', project ':tapestry-jmx', project ':tapestry-json',
project ':tapestry-spring', project ':tapestry-test', project
':tapestry-upload', project ':tapestry-yuicompressor']
18:18:59.000 [INFO] [org.gradle.configuration.BuildScriptProcessor]
Evaluating root project 'tapestry5' using build file
'/Users/hlship/workspaces/tapestry/tapestry5/build.gradle'.
18:18:59.354 [QUIET] [system.out] project ':plastic'
18:18:59.363 [DEBUG] [org.gradle.configuration.BuildScriptProcessor]
Timing: Running the build script took 0.362 secs
18:18:59.378 [ERROR] [org.gradle.BuildExceptionReporter]
18:18:59.380 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE:
Build failed with an exception.
18:18:59.382 [ERROR] [org.gradle.BuildExceptionReporter]
18:18:59.383 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
18:18:59.383 [ERROR] [org.gradle.BuildExceptionReporter] Build file
'/Users/hlship/workspaces/tapestry/tapestry5/build.gradle' line: 37
18:18:59.384 [ERROR] [org.gradle.BuildExceptionReporter]
18:18:59.385 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
18:18:59.386 [ERROR] [org.gradle.BuildExceptionReporter] A problem
occurred evaluating root project 'tapestry5'.
18:18:59.389 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Could
not find property 'sourceSets' on project ':plastic'.
18:18:59.390 [ERROR] [org.gradle.BuildExceptionReporter]


I'm kind of at a loss here. This feels like something I should just be
able to do with a line of configuration somewhere.

The plastic module does have no dependencies at all.  What's strange
is that the error is that the sourceSets property doesn't exist ...
not that its value is null or empty.  Seems like an order of
evaluation problem, but I don't get it.




-- 
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


Reply via email to