Groovydoc not creating external links in generated HTML

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Groovydoc not creating external links in generated HTML

greymeister
Hi, I'm working on a gradle build and so far only have one problem.  It looks like all of the groovydoc files that are generated try to link to the root directory 'groovydoc' instead of the remote href.  This is true except for the JDK link to oracle's site.  Here's my groovydoc task:

// Add groovydoc settings
groovydoc {
  docTitle = "Generic Service $version"
  header = docTitle
  windowTitle = docTitle
  use = true
  // Links to external Javadoc, currently only the J2SE links are working properly
  link('http://download.oracle.com/javase/6/docs/api/', 'java.', 'org.xml', 'javax.', 'org.xml.')
  link('http://static.springsource.org/spring/docs/3.0.x/javadoc-api/', 'org.springframework.context')
  link('http://groovy.codehaus.org/api/',  'groovy.', 'org.codehaus.groovy.')
  link('http://docs.jboss.org/netty/3.2/api/', 'org.jboss.netty.', 'org.jboss.netty.channel.')
}


The only other relevant difference that my project might have is that I use one source tree for Java and Groovy files, so I'm also using the following configuration:

// Make groovy compile all code, not java
sourceSets.main.java.srcDirs = []
sourceSets.main.groovy.srcDir 'src/main/java'

Any ideas why the Spring/JBoss links aren't working?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

evgenyg
Have exactly the same issue.

Build file: http://goo.gl/0BP9i
Groovydocs: http://goo.gl/oDB3a
This file http://goo.gl/oZGlN links correctly to JDK Javadocs but doesn't link to correct Spring Javadoc for "InitializingBean"


Any help?
Best regards,
Evgeny
evgeny-goldin.com
Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

evgenyg
Gradle version is 0.9.2
Best regards,
Evgeny
evgeny-goldin.com
Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

Peter Niederwieser
In reply to this post by evgenyg
evgenyg wrote
Have exactly the same issue. Any help?
I'm working on a fix. Meanwhile, you should be able to work around the problem by configuring groovydoc.groovyClasspath to include all externally referenced classes. And please raise an issue.

--
Peter Niederwieser 
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradle Inc.
http://www.gradle.biz
Creator, Spock Framework
http://spockframework.org
Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

evgenyg
Thanks, Peter!
groovydoc.groovyClasspath = configurations.compile
did the job.

Created an issue for that:
http://jira.codehaus.org/browse/GRADLE-1391
Best regards,
Evgeny
evgeny-goldin.com
Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

Rob Fletcher
I hate to resurrect such an old thread but I seem to be getting a
similar problem with Gradle 1.2

By groovydoc configuration is here:
https://github.com/robfletcher/betamax/blob/master/build.gradle#L95

When I run the task the Java API links *are* generated correctly but
other things (HttpClient, SnakeYaml, etc.) are not linked properly.
I've tried defining the links in different orders and overriding the
groovyClasspath as suggested above with no success.

Am I doing something fundamentally wrong?

Rob

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

Luke Daley-2

On 26/10/2012, at 4:25 PM, Robert Fletcher wrote:

> I hate to resurrect such an old thread but I seem to be getting a
> similar problem with Gradle 1.2
>
> By groovydoc configuration is here:
> https://github.com/robfletcher/betamax/blob/master/build.gradle#L95
>
> When I run the task the Java API links *are* generated correctly but
> other things (HttpClient, SnakeYaml, etc.) are not linked properly.
> I've tried defining the links in different orders and overriding the
> groovyClasspath as suggested above with no success.
>
> Am I doing something fundamentally wrong?

Seems right to me.

Keep in mind though that you have to list each package, not just the top level. You can automate this, as we do in the Gradle build.

https://github.com/gradle/gradle/blob/master/subprojects/docs/docs.gradle#L298

--
Luke Daley
Principal Engineer, Gradleware
http://gradleware.com


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

Rob Fletcher
I've changed it to link dynamically as you suggest. I've verified it's
successfully pulling the package-list file from each URL but still
only the JDK and Groovy API links get generated. All others are just
generated as relative URLs.

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

Luke Daley-2

On 29/10/2012, at 12:52 PM, Robert Fletcher wrote:

> I've changed it to link dynamically as you suggest. I've verified it's
> successfully pulling the package-list file from each URL but still
> only the JDK and Groovy API links get generated. All others are just
> generated as relative URLs.

Unsure then.

What Groovy version?

--
Luke Daley
Principal Engineer, Gradleware
http://gradleware.com


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

Rob Fletcher
On Mon, Oct 29, 2012 at 1:19 PM, Luke Daley <[hidden email]> wrote:
>
> What Groovy version?
>

1.8.8 is what I'm using in the build. Gradle is using 1.8.6.

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Groovydoc not creating external links in generated HTML

Luke Daley-3




On 29/10/2012, at 5:23 PM, Robert Fletcher <[hidden email]> wrote:

> On Mon, Oct 29, 2012 at 1:19 PM, Luke Daley <[hidden email]> wrote:
>>
>> What Groovy version?
>>
>
> 1.8.8 is what I'm using in the build. Gradle is using 1.8.6.

Try with 1.8.6 just to rule that out. This definitely works in the Gradle build.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email