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

放肆的年华 提交于 2019-12-04 00:08:28

问题


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.


回答1:


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.




回答2:


You can download from this location http://repo.spring.io/libs-release/org/springframework/spring/



来源:https://stackoverflow.com/questions/17086272/how-to-download-sources-and-javadoc-artifacts-with-maven-eclipse-plugin-from-oth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!