Gradle isn't always able to figure out on its own that a task (like
'javadoc') depends on a particular configuration (like
'project(":tapestry-javadoc").default'). In such cases you have to be
explicit:

javadoc.dependsOn project(':tapestry-javadoc')

Over time, Gradle will certainly become smarter at this.

Now to your second question: Why do source (and javadoc) Jars appear on the
taglet path? You are adding  the 'javadoc' configuration to the taglet path,
which you define as 'project(":tapestry-javadoc")'. The latter is a shortcut
for 'project(":tapestry-javadoc").default'. A project's 'default'
configuration is the union of its 'runtime' and 'archives' configurations
(and potentially more). The 'archives' configuration contains the "main"
artifact(s) produced by a project. So I guess you have something like the
following in one of your build scripts:

task sourcesJar { ... }

task javadocJar { ... }

artifacts {
  archives sourcesJar
  archives javadocJar
}

This is handy because it means that the 'uploadArchives' task will also
upload the sources and javadoc Jars. On the other hand, those Jars will now
appear in all sorts of locations where they shouldn't, including class
paths. A better solution is to introduce a separate configuration:

configurations {
  meta
}

artifacts {
  meta sourcesJar
  meta javadocJar
}

To upload those artifacts, you'll either have to configure the 'uploadMeta'
task in the same way as 'uploadArchives', or use one of the hooks of the
'uploadArchives' task to also upload the 'meta' configuration. For the
latter approach, have a look at this build (search for occurrences of
'meta'): https://github.com/geb/geb/blob/master/build.gradle

Last but not least, I'd like to mention that we are currently working on a
completely new DSL/API for publishing artifacts. This will also make it
easier to publish source and javadoc Jars.

--
Peter Niederwieser 
Developer, Gradle
http://www.gradle.org
Principal Engineer, Gradleware
http://www.gradleware.com
Creator, Spock Framework
http://spockframework.org


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Specifying-tagletpath-in-Javadoc-tp4408029p4408761.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to