Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
495 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...