Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download sources and javadoc artifacts with Maven Eclipse plugin from other repository?

I have spring framework dependencies in my Maven project. I want to attach the Javadoc for spring framework dependencies.

I added to pom.xml following lines

<repositories>
    <repository>
        <id>springsource-repo</id>
        <name>SpringSource Repository</name>
        <url>http://repo.springsource.org/release</url>
    </repository>
</repositories>

<build>
<plugins>
    ...
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.9</version>
        <configuration>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
        </configuration>
    </plugin>
</plugins>
</build>

I have installed m2eclipse and I also checked option Download Artifact Sources/Javadoc in settings.

When I run mvn eclipse:eclipse, it doesn't show any warnings. But javadoc .jar files aren't downloaded.

like image 875
misco Avatar asked Jun 13 '13 11:06

misco


People also ask

How do I download JavaDoc in Eclipse?

Moreover, in Eclipse you can just go to Preferences -> Maven (No subcategory). There, you can check "Download artifact Sources/JavaDocs".

How do I download a Maven source?

To download sources for dependencies of maven project, right click on project → Maven → Download Sources . Similarly to download JavaDoc for dependencies of maven project, right click on project → Maven → Download JavaDoc .

How do I disable JavaDoc and download sources in Eclipse?

You can disable this in the Maven configuration: Window > Preferences > Maven > Disable "Download Artifact Sources" and "Download Artifact JavaDoc".

What is source and JavaDoc?

The javadoc tool generates output that originates from the following types of source files: Java language source files for classes ( . java ), package comment files, overview comment files, and miscellaneous unprocessed files.


1 Answers

In Eclipse goto Windows->preferences->Maven and there you check the box with download sources and may be download javadoc as well. That should do the trick.

like image 138
khmarbaise Avatar answered Sep 22 '22 18:09

khmarbaise