开发者

Offline Javadoc Server

As not all our development machines have internet access, we want to cache the API docs of various libraries in our local network. I was thinking of a webapp that handles caching and listing the available Javadocs after someone uploads them (in jar format). Ideally, the source jars would be automatically pulled from our m开发者_StackOverflow社区aven repository (artifactory).

I have not been successful in finding anything like this on google, so I'm trying my luck here.

EDIT

I have found a site that does exactly what I am looking for: http://www.jarvana.com The problem is that this site does not fulfill my #1 requirement - offline availability. So I rephrase my question to: Is there a webapp that works like jarvana but that can be deployed to a local server?


It seems like what I'm looking for really doesn't exist, so I've rolled my own really simple webapp that serves JavaDocs from a local maven repository (transparently extracting jar files). It's far from perfect, but it works for my requirements. If anyone is interested, I shared it on github:

https://github.com/planbnet/JavaDoc-Browser


Why not just use mvn site?

Hm, I'd better add something more useful than that :-)

mvn site will build and deploy a bunch of site reports including the javadoc (assuming you configure that plugin). Everytime your CI server builds the code from trunk/branch/tag/whereever, the latest Javadocs will be generated and stored on the file system (accessible via HTTP)!

There's even a cool report that ties the javadoc into the source code.


You can give wwwoffle a try. A caching proxy which enables to access sites while you're offline.


I wrote a python script some time ago to serve the javadoc from my local maven repo:

http://blog.robotninjas.org/2013/04/17/accessing-your-cached-javadoc-offline/

python javadoc.py

It's crude, but hitting http://localhost:8080/m2 will list all of the projects in your local maven repository with downloaded docs.

You can download all the javadoc jars for a maven project with:

mvn dependency:resolve -Dclassifier=javadoc
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜