So, following on our earlier attempts to get aggregate javadoc working
for Tapestry.

The other developers are pissed at me, because the project doesn't
build.  There's a dependency resolution problem.

If I wide ~/.gradle/cache and do a build:


$ rm -rf ~/.gradle/cache
~/workspaces/tapestry/p
$ gr clean jar
:: problems summary ::
:::: WARNINGS
                module not found: org.codehaus.groovy#groovy-all;1.7.4

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: javassist#javassist;3.12.1.GA

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: javax.inject#javax.inject;1

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: org.slf4j#slf4j-api;1.6.1

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: log4j#log4j;1.2.14

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: org.slf4j#slf4j-log4j12;1.6.1

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: org.testng#testng;5.14.9

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: commons-codec#commons-codec;1.3

        ==== clientModule: tried

        ==== internal-repository: tried

                module not found: org.antlr#antlr-runtime;3.3

        ==== clientModule: tried

        ==== internal-repository: tried

                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.codehaus.groovy#groovy-all;1.7.4: not found

                :: javassist#javassist;3.12.1.GA: not found

                :: javax.inject#javax.inject;1: not found

                :: org.slf4j#slf4j-api;1.6.1: not found

                :: log4j#log4j;1.2.14: not found

                :: org.slf4j#slf4j-log4j12;1.6.1: not found

                :: org.testng#testng;5.14.9: not found

                :: commons-codec#commons-codec;1.3: not found

                :: org.antlr#antlr-runtime;3.3: not found

                ::::::::::::::::::::::::::::::::::::::::::::::



FAILURE: Build failed with an exception.

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

* What went wrong:
A problem occurred evaluating root project 'tapestry5'.
Cause: Could not resolve all dependencies for configuration ':javadoc':
    - unresolved dependency: org.codehaus.groovy#groovy-all;1.7.4: not found
    - unresolved dependency: javassist#javassist;3.12.1.GA: not found
    - unresolved dependency: javax.inject#javax.inject;1: not found
    - unresolved dependency: org.slf4j#slf4j-api;1.6.1: not found
    - unresolved dependency: log4j#log4j;1.2.14: not found
    - unresolved dependency: org.slf4j#slf4j-log4j12;1.6.1: not found
    - unresolved dependency: org.testng#testng;5.14.9: not found
    - unresolved dependency: commons-codec#commons-codec;1.3: not found
    - unresolved dependency: org.antlr#antlr-runtime;3.3: not found


* 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: 5.297 secs
~/workspaces/tapestry/p
$


My master build.gradle (excerpt):

configurations {
  javadoc
}

dependencies {
  javadoc project(':tapestry-javadoc')
}

subprojects.each { evaluationDependsOn(it.name) }

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

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 &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/' ]
       addStringOption "tagletpath", configurations.javadoc.asPath
/// <--- THIS IS THE PROBLEM
       addStringOption "taglet",
"org.apache.tapestry5.javadoc.TapestryDocTaglet"

       exclude "org/apache/tapestry5/internal/plastic/asm/**"
   }

   subprojects.each { sp ->
     sp.sourceSets.all.findAll { set -> set.name != "test" }.each { set ->

       source set.java

       classpath += set.classes + set.compileClasspath

       // Some of the component .xdoc files refer to PNG images
       // (we could also exclude .java and .xdoc)
       copy {
         from set.java.srcDirs.toList()
         into javadocBuildDir.dir
         include '**/*.png'
       }
     }
   }
 }


And the tapestry-javadoc/build.gradle:

description = "JavaDoc Plugin for Tapestry that generates component
reference documentation for component classes"

dependencies {
  compile project(':tapestry-core')
  compile files(getTools())
}

/** Returns the tools.jar/classes.jar of the Java runtime. */
File getTools() {
  def relpath = isMacOSX() ? "../classes/classes.jar" : "../lib/tools.jar"

  return new File(System.properties['java.home'], relpath)
}

boolean isMacOSX() {
  System.properties['os.name'].toLowerCase().contains('mac os')
}



Everything builds correctly if I comment out the indicated line (with
"configurations.javadoc.asPath").  But that means that my JavaDoc task
doesn't have the tapestry-javadoc.jar on the classpath, so I don't get
my JavaDoc generated correctly.

So, yes, this is tricky ... aggregate JavaDoc including a module
that's part of the same build.  I'm at a loss as to how to ask more
precisely for help.

If you want to spend a couple of minutes giving it a whirl, you can
checkout the repository via SVN
https://svn.apache.org/repos/asf/tapestry/tapestry5/trunk  Patches
would be appreciated!  You may find that the offending line is
commented out however.

Thanks in advance for any help ... this is one of the last stumbling
blocks before the Tapestry 5.3.0 release.



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