Javadoc is back!

2016-04-01 16:09:17.778

Few months ago I added javadoc support for many artifacts, few weeks ago I removed it and now it's back!

When I created this website almost a year ago, it only had artifacts from Maven Central, charts and search with autocomplete. All these features are a big step forward if you're used to websites like search.maven.org or mvnrepository.com and I thought I was done. How naiive I was. Over last few months I added Maven plugins, archetypes, search for Java classes, several other popular repositories and bunch of other small enhancements (every week or so I add something new and constantly I have about 30 items in my TODO list).

Anyway, back to javadoc support. In the first version it was just a simple iframe which pointed to some external javadoc like https://docs.oracle.com/javase/7/docs/api/. But very soon I encountered several problems:

1.) I wanted to switch this website to https and some javadocs were only on http and if your website is using https, you cannot load inside some content using http. So I would have to stay on http forever :-( ... at least on pages where would be the javadoc ... which is 99% of all pages on this website.
2.) Even though the external javadoc was up and running only for a few days, I discovered that since I don't have any control over some external website, it can easily disappear, move to a different URL, ...
3.) The external Javadoc isn't searchable and often contains some class from some different artifact and to find it you need to google it and hope that it's on some public website.

So I started thinking how to solve this problem. There are two possible solutions:

1.) Download javadoc from every artifact and publish it on javalibs. That's currently not possible because currently I have limited storage capacity on my server. And also there could be trouble with advanced usage (like searching in the javadoc). Btw this approach took Dash, but the user has to download the javadoc on his computer.
2.) Generate my own javadoc from artifact's Java sources ... that's the approach I took :-)

Currently the javadoc is very limited, basically it can do the same as the original javadoc just with extra bonus that if you encounter in some class a reference to another class in different artifact, then you will be able to simply navigate to such artifact. But one has to start somewhere and I add new features every week, so in a few weeks it will be much more useful.

Also there can be some bugs. I tried to test it as much as I could, but this is a very large new feature so one can never be sure. Currently there are 145 000 artifacts in the database and 75 000 of them have associated javadoc. In all javadocs are almost 4 million classes and 40 million methods, so it's a really huge new feature.



© Jiri Pinkas 2015 - 2019. All rights reserved. Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení | 4npm - npm search | monitored using: sitemonitoring
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.