Comments (12)
cc: @dapengzhang0
from grpc.github.io.
I just searched for similar issues on SO and found this https://stackoverflow.com/questions/33866209/linking-to-javadoc-io-using-javadoc-link-option
not tested it out yet.
from grpc.github.io.
From the above SO comments, I found a workaround using -linkoffline
:
touch package-list && jdk-11.0.1/bin/javadoc -linkoffline 'https://grpc.io/grpc-java/javadoc/' . Test.java
To fix the original issue, I think grpc javadoc need to generate a package-list.html
page.
from grpc.github.io.
I just searched for similar issues on SO and found this https://stackoverflow.com/questions/33866209/linking-to-javadoc-io-using-javadoc-link-option
not tested it out yet.
I tried a few things with gradle, but I was unable to change the failure behavior. I'm not sure whether this is my fault for not correctly configuring the build or the suggestion simply not working.
From the above SO comments, I found a workaround using
-linkoffline
:touch package-list && jdk-11.0.1/bin/javadoc -linkoffline 'https://grpc.io/grpc-java/javadoc/' . Test.java
If you can explain me how I can configure my build tool (gradle 5) to do that...
To fix the original issue, I think grpc javadoc need to generate a package-list.html page.
I would appreciate any server side fix, that does not require any build tool hacks in consuming lib build tool scripts.
from grpc.github.io.
If you can explain me how I can configure my build tool (gradle 5) to do that...
@ST-DDT Can you provide a simple gradle file for your Test.java
, so that I can know the way you set up javadoc config in gradle? This would help me verify "server side fix".
from grpc.github.io.
Here a packaged test project: test.zip
build.gradle
apply plugin: 'java'
tasks.withType(Javadoc) {
def links = [
'https://docs.oracle.com/javase/8/docs/api/',
'https://grpc.io/grpc-java/javadoc/'
];
options.setLinks(links)
}
Directory-Structure
src
main
java
Test.java
build.gradle
- (
gradle
)- ...
- (
gradlew
) - (
gradlew.bat
)
I don't know whether you need the gradle stuff as well, for my tests i copied them from here.
Output-JDK8
$ ./gradlew javadoc
Starting a Gradle Daemon, 3 incompatible and 2 stopped Daemons could not be reused, use --status for details
> Task :compileJava UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :javadoc UP-TO-DATE
BUILD SUCCESSFUL in 4s
2 actionable tasks: 2 up-to-date
Output-JDK11
$ ./gradlew javadoc
Starting a Gradle Daemon, 3 incompatible and 3 stopped Daemons could not be reused, use --status for details
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes
> Task :javadoc
javadoc: error - Error fetching URL: https://grpc.io/grpc-java/javadoc/
1 error
> Task :javadoc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): 'C:\Users\Daniel\git\grpc\test\build\tmp\javadoc\javadoc.options'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
2 actionable tasks: 2 executed
from grpc.github.io.
Thank you @ST-DDT , that will be very helpful.
from grpc.github.io.
@ST-DDT I upload a workaround here
build.gradle
apply plugin: 'java'
javadoc {
options {
links 'https://docs.oracle.com/javase/8/docs/api/'
linksOffline 'https://grpc.io/grpc-java/javadoc/', '.'
}
}
Directory-Structure
- src
- main
- java
- Test.java
- java
- main
- build.gradle
- package-list
from grpc.github.io.
Solution: Using the URL https://github.com/grpc/grpc-java/tree/gh-pages/javadoc/
instead of https://grpc.io/grpc-java/javadoc/
will work.
Edit: the above solution is not working.
jdk-11.0.1/bin/javadoc -link 'https://github.com/grpc/grpc-java/tree/gh-pages/javadoc/' Test.java
The problem with https://grpc.io/grpc-java/javadoc/
is that the website grpc.io uses Jekyll which responses GET request to https://grpc.io/grpc-java/javadoc/package-list
with Content-Type:"application/octet-stream" and a browser trying to download it.
from grpc.github.io.
I can confirm that using the other link it does not throw an error anymore. However it does not generate links to the grpc classes either (including jdk 8). Is that page updated yet?
You can verify that behavior by changing the return type of the example config to an grpc-java class.
from grpc.github.io.
I can confirm that using the other link it does not throw an error anymore. However it does not generate links to the grpc classes either (including jdk 8).
Right, it links to the github pages which are not in javadoc format. My mistake.
Is that page updated yet?
I tested with a few changes and reverted them back. So it is unchanged.
from grpc.github.io.
@ST-DDT Using jdk 11.0.2, the issue is gone.
$ echo "/** See {@link io.grpc.Metadata}. */ public class Test {}" > Test.java
$ ~/Downloads/jdk-11.0.2/bin/javadoc -link 'https://grpc.io/grpc-java/javadoc/' Test.java -cp ~/.m2/repository/io/grpc/grpc-core/1.19.0/grpc-core-1.19.0.jar
Loading source file Test.java...
Constructing Javadoc information...
Standard Doclet version 11.0.2
Building tree for all the packages and classes...
Generating ./Test.html...
Generating ./package-summary.html...
Generating ./package-tree.html...
Generating ./constant-values.html...
Building index for all the packages and classes...
Generating ./overview-tree.html...
Generating ./index-all.html...
Building index for all classes...
Generating ./allclasses-index.html...
Generating ./allpackages-index.html...
Generating ./deprecated-list.html...
Building index for all classes...
Generating ./allclasses.html...
Generating ./allclasses.html...
Generating ./index.html...
Generating ./help-doc.html...
from grpc.github.io.
Related Issues (20)
- grpc Simulate multi-thread upload using grpc-io protocol HOT 2
- Missing Link in Overiview HOT 1
- Clarify lifetime requirement of response object passed to ServerAsyncResponseWriter<T>::Finish() HOT 1
- Repeated blog article rss feed HOT 1
- Installing web version HOT 1
- Presentations & Talks Video is not played
- C# can't really use Inproc transport as indicated by "language stacks" blogpost
- Adding presentation videos is very error prone (and "talks" page is too complex to edit)
- links to articles in RSS feed are broken HOT 2
- Suggestions for "g stands for" HOT 3
- Typo in gRPC-Web-GA HOT 1
- Links in references of state-of-grpc-web post are not hyperlinks
- Microbenchmark dashboards have no data HOT 2
- no command grpc_tools_ruby_protoc HOT 3
- GRPC connection select source interface/ip for initialize connection
- Scroll not reset after clicking the lower "GET STARTED" at home page HOT 1
- ARCHIVED REPOSITORY
- Don't share the analytics ID with grpc.io HOT 1
- Prevent indexing of site pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grpc.github.io.