Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 857
Anthony Accioly Avatar asked Jun 01 '11 18:06

Anthony Accioly


1 Answers

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.

like image 50
Raghuram Avatar answered Oct 22 '22 00:10

Raghuram