Maven - Java EE 6 Web Profile Javadocs [英] Maven - Java EE 6 Web Profile Javadocs
问题描述
通过声明以下依赖项:
<依赖><groupId>javax</groupId><artifactId>javaee-web-api</artifactId><version>6.0</version><范围>提供</范围></依赖>
我可以使用 Java EE 6 项目所需的一切(Servlet 3.0、JPA 2、EJB、CDI 等).问题是:Maven 无法下载依赖项的 Javadoc(或者至少 m2eclipse 的下载 JavaDoc"功能不起作用),所以当我使用非常方便的代码完成功能时,Eclipse 不会向我显示 Javadoc.>
我发现这篇文章专门针对 Servlet 3.0 API,Maven 依赖Servlet 3.0 API?.
任何人都可以指出适用于每个 API 的解决方案吗?或者,任何人都可以提供一个虚拟指南来安装 Java EE 6 Javadocs 并将其链接到本地存储库中的 javaee-web-api 工件吗?
假设您有 Java EE javadoc,您可以使用 maven 安装插件将它们安装到您的本地 maven 存储库.看看这个 usage 链接
您可以使用 -Dclassifier=sources
来指示您正在安装源代码.请参阅此示例.
By declaring the following dependency:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
I can use about everything I need for a Java EE 6 Project (Servlet 3.0, JPA 2, EJB, CDI, etc). The problem is: Maven can not download the Javadocs for the dependency (or at least m2eclipse "Download JavaDoc" feature don't work), so Eclipse don't show me the Javadocs when I use the very handy code completion feature.
I've found this post specific to Servlet 3.0 API, Maven dependency for Servlet 3.0 API?.
Can anyone kindly point to a solution that works for every API? Or, can anyone please provide a dummy guide to install Java EE 6 Javadocs and link it to javaee-web-api artifact in the local repository?
Assuming you have Java EE javadocs, you can install them to your local maven repository using the maven install plugin. Look at this usage link
You would use the -Dclassifier=sources
to indicate you are installing sources. See this example for this.
这篇关于Maven - Java EE 6 Web Profile Javadocs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!