Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
468 views
in Technique[技术] by (71.8m points)

dependencies - Maven - Java EE 6 Web Profile Javadocs

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...