如何为javadocs创建可分发的jar? [英] How do I create a jar distributable for javadocs?

查看:130
本文介绍了如何为javadocs创建可分发的jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个我作为JAR文件发布的API。它是专有的,所以我不得不从中删除源文件。

I've created an API that I release as a JAR file. It's proprietary so I had to strip the source files out of it.

我目前包含一个单独的/ doc文件夹,其中包含Eclipse的export-to-javadoc向导的输出。还不错,但我想更进一步。

I currently include a separate /doc folder which contains the output of Eclipse's export-to-javadoc wizard. Not bad, but I'd like to go one step further.

我想将javadocs作为jar文件分发,可以很容易地放到未来的项目中其中包括我的API的jar文件。我知道我已经看过它用我用过的其他发行版多次这样做了,但我没有任何运气搜索。

I'd like to distribute the javadocs as a jar file that can be easily dropped into a future project which includes the jar file for my API. I know I've seen it done this way several times with other distributions I've used, but I haven't had any luck searching.

最终目标是允许未来的开发人员可以轻松访问这些性质的评论和事物。

End goal is to allow future developers to have easy access to hover over comments and things of that nature.

谢谢!

推荐答案

将包含eclipse生成文档的 doc 文件夹打包为 jar 文件似乎已足够。然后,如果要将该jar用作包含已编译的.class文件的实际jar的javadoc,则在Eclipse中为javadoc jar分配Javadoc in archive并在其中设置 Path存档 doc 。 Eclipse似乎在doc文件夹中查找 index.html package-list 条目。

It seems it is enough to package the doc folder containing the eclipse generated documentation as a jar file. Then if you want to use that jar as javadocs of the actual jar containing the compiled .class files, you assign the javadoc jar with the "Javadoc in archive" in Eclipse and set the Path within archive as doc. It seems Eclipse looks for index.html and package-list entries in the doc folder.



使用maven-javadoc-plugin可能是一种简单的方法。请参阅以下链接:



Also using maven-javadoc-plugin may an easy way to do this. See the link below:

http://www.avajava.com/tutorials/lessons/how-do-i-generate-and-deploy-a -javadoc-jar-file-for-my-project.html

这篇关于如何为javadocs创建可分发的jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆