Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getting links from javadoc.io #14

Closed
wants to merge 1 commit into from

Conversation

BrainStone
Copy link

@BrainStone BrainStone commented Sep 29, 2017

The base URL is not static.javadoc.io/, but instead www.javadoc.io/doc/.

The other link is not reachable. See https://www.javadoc.io/

The base URL is not `static.javadoc.io/`, but instead `www.javadoc.io/doc/`.
@larsgrefer
Copy link
Member

@BrainStone
Copy link
Author

Doesn't work for other libraries though. Like https://static.javadoc.io/org.slf4j/slf4j-api/1.7.25/ doesn't work, but https://www.javadoc.io/doc/org.slf4j/slf4j-api/1.7.25/ does.
And with your example both work: https://static.javadoc.io/org.springframework/spring-core/4.3.11.RELEASE/ and https://www.javadoc.io/doc/org.springframework/spring-core/4.3.11.RELEASE/

And again it clearly states on the first bulletpoint under Developer Overview to use javadoc.io/doc/ on https://www.javadoc.io/.

@larsgrefer
Copy link
Member

slf4j also works on static.javadoc.io: https://static.javadoc.io/org.slf4j/slf4j-api/1.7.25/index.html

If you investigate the links in https://www.javadoc.io/doc/org.springframework/spring-core/4.3.11.RELEASE you'll see they are all pointing to static.javadoc.io

In addition to that javadoc can't link against javadoc.io/docs because the package-list file isn't present and the links generated by javadoc won't work on javadoc.io/docs but on static.javadoc.io.
For example: https://static.javadoc.io/org.springframework/spring-core/4.3.11.RELEASE/org/springframework/core/annotation/AnnotationAwareOrderComparator.html#sort-java.util.List- works, but https://www.javadoc.io/docs/org.springframework/spring-core/4.3.11.RELEASE/org/springframework/core/annotation/AnnotationAwareOrderComparator.html#sort-java.util.List- does not

@BrainStone
Copy link
Author

Hm. Well, can you then maybe explain to me, why I get this error? javadoc: warning - Error fetching URL: http://static.javadoc.io/org.slf4j/slf4j-api/1.7.25/

@larsgrefer
Copy link
Member

Can you provide a link to the repository/commit where this error occurs? so i can reproduce it?

@BrainStone
Copy link
Author

Sadly no, as the repo is private. I'll try to create a test repo where the error occurs.

@BrainStone
Copy link
Author

Please apologize the long wait, but here's a repo where I can easily reproduce the error: https://github.com/BrainStone/javadoc_link_test

@larsgrefer
Copy link
Member

What is your complete output when you run ./gradlew clean javadoc on the test project?

@BrainStone
Copy link
Author

$ ./gradlew clean javadoc
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Parallel execution is an incubating feature.
Build cache is an incubating feature.
:clean
:generateMetadata
:compileJavaNote: Reading extra plugin metadata from C:\Users\Yannick\Desktop\Neuer Ordner\javadoc_link_test\build\tmp\generateMetadata\mcmod.info
warning: The following options were not recognized by any processor: '[extraMetadataFiles, metadataOutputFile]'

:processResources
:classes
:configureJavadocLinks
:javadocjavadoc: warning - Error fetching URL: http://static.javadoc.io/org.spongepowered/spongeapi/7.0.0-SNAPSHOT/
javadoc: warning - Error fetching URL: http://static.javadoc.io/org.slf4j/slf4j-api/1.7.25/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.google.inject/guice/4.1.0/
javadoc: warning - Error fetching URL: http://static.javadoc.io/org.spongepowered/plugin-meta/0.4.1/
javadoc: warning - Error fetching URL: http://static.javadoc.io/ninja.leaping.configurate/configurate-hocon/3.3/
javadoc: warning - Error fetching URL: http://static.javadoc.io/ninja.leaping.configurate/configurate-gson/3.3/
javadoc: warning - Error fetching URL: http://static.javadoc.io/ninja.leaping.configurate/configurate-yaml/3.3/
javadoc: warning - Error fetching URL: http://static.javadoc.io/ninja.leaping.configurate/configurate-core/3.3/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.google.guava/guava/21.0/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.google.errorprone/error_prone_annotations/2.0.15/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.google.code.gson/gson/2.8.0/
javadoc: warning - Error fetching URL: http://static.javadoc.io/org.apache.commons/commons-lang3/3.5/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.google.code.findbugs/jsr305/3.0.1/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.github.ben-manes.caffeine/guava/2.5.4/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.github.ben-manes.caffeine/caffeine/2.5.4/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.flowpowered/flow-math/1.0.3/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.flowpowered/flow-noise/1.0.1-SNAPSHOT/
javadoc: warning - Error fetching URL: http://static.javadoc.io/org.ow2.asm/asm/5.2/
javadoc: warning - Error fetching URL: http://static.javadoc.io/javax.inject/javax.inject/1/
javadoc: warning - Error fetching URL: http://static.javadoc.io/aopalliance/aopalliance/1.0/
javadoc: warning - Error fetching URL: http://static.javadoc.io/com.typesafe/config/1.3.1/
javadoc: warning - Error fetching URL: http://static.javadoc.io/org.yaml/snakeyaml/1.18/

22 warnings

BUILD SUCCESSFUL in 25s
6 actionable tasks: 6 executed

@larsgrefer
Copy link
Member

When javadoc tries to access the package-list file, cloudflare answers this:

The owner of this website (static.javadoc.io) has banned your access based on your browser's signature

The "browser's signature" in this case is User-Agent: Java/1.8.0_xxx

@larsgrefer larsgrefer closed this in fd3fbb9 Oct 2, 2017
@BrainStone BrainStone deleted the patch-1 branch October 2, 2017 19:46
@larsgrefer
Copy link
Member

This should be fixed with version 2.0.2

@BrainStone
Copy link
Author

It works now. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants