简体   繁体   English

如何从包含source的许多插件jar文件生成javadoc

[英]How to generate javadoc from many plugin jar files containing source

I have a set of over 500 jar files for a whole range of plugins that we have from a third party, and for each of these jar files there is a source jar file as well. 我有一组超过500个jar文件,用于我们从第三方获得的各种插件,并且对于每个jar文件,还有一个源jar文件。 But they have not provided the javadoc. 但他们没有提供javadoc。

I want to be able to build the javadocs from the provided source jar files, but can't tell if javadoc.exe will do this for me. 我希望能够从提供的源jar文件中构建javadoc,但无法判断javadoc.exe是否会为我执行此操作。 I haven't used it manually for years, so not familiar with the command line options. 我多年没有手动使用它,所以不熟悉命令行选项。

One of the guys here showed me how to import the source file into Eclipse so I could browse the Source. 其中一个人向我展示了如何将源文件导入Eclipse,以便我可以浏览Source。 but doing that over 500 times is a very time consuming exercise. 但这样做超过500次是一项非常耗时的工作。

Cheers 干杯

Because all the source file and plugins jars are together in the same directory I have found a relatively simple solution, using eclipse. 因为所有源文件和插件jar都在同一个目录中,所以我发现了一个相对简单的解决方案,使用eclipse。

  1. In Eclipse -> Open a new workspace (so as not to flood your working area) 在Eclipse中 - >打开一个新工作区(以免淹没您的工作区域)
  2. Under Preferences, select Plug-in Development/Target Platform. 在“首选项”下,选择“插件开发/目标平台”。 Create new Target Platform with all of the plugins included and set as current. 创建包含所有插件并设置为当前插件的新目标平台。
  3. In the Plug-in browser view, select all plugins, right click, select Import As -> Source Project. 在Plug-in浏览器视图中,选择所有插件,右键单击,选择Import As - > Source Project。 At this point all the source files are loaded into the workspace. 此时,所有源文件都将加载到工作区中。
  4. In the package explorer. 在包浏览器中。 Select Project -> Generate javadocs. 选择Project - > Generate javadocs。 Unfortunately in this dialog, there is no select all option - so if you have 500 plugins, then you have to select them one-by-one. 不幸的是,在这个对话框中,没有select all选项 - 所以如果你有500个插件,那么你必须逐个选择它们。

And if that finishes without crashing, then all is winner. 如果完成没有崩溃,那么所有人都是胜利者。

NOTE: My first attempt using 32-bit eclipse and javadoc failed, I think due to the number of plugins/files, but I then used a 64-bit Eclipse and Javadoc, which took about an hour, but did work. 注意:我第一次尝试使用32位eclipse和javadoc失败,我认为由于插件/文件的数量,但我使用了64位Eclipse和Javadoc,花了大约一个小时,但确实有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM