eclipse - 如何使用 Maven Eclipse 插件从其他存储库下载源代码和 javadoc Artifact ?

标签 eclipse spring maven javadoc

我的 Maven 项目中有 spring 框架依赖项。我想附上 Spring 框架依赖项的 Javadoc。

我添加到 pom.xml 以下几行

<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>

我已经安装了 m2eclipse,并且我还检查了设置中的选项 Download Artifact Sources/Javadoc

当我运行 mvn eclipse:eclipse 时,它没有显示任何警告。但是没有下载 javadoc .jar 文件。

最佳答案

在 Eclipse 中转到 Windows->preferences->Maven 并在此处选中带有 download sources 的框,也可能是 download javadoc .这应该可以解决问题。

关于eclipse - 如何使用 Maven Eclipse 插件从其他存储库下载源代码和 javadoc Artifact ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17086272/

相关文章:

java - 如何将泛型类作为方法的泛型参数传递

java - 使用 Java 构建路径将 Spring 项目添加到 Spring Boot

json - 使用 Jackson 将列表转换为 json

java - 在一个简单的 Maven hibernate 项目中出现错误 "java.lang.NoClassDefFoundError: org/hibernate/cfg/Mappings"

java - 使用 Jacoco 对使用 Powermock 编写的测试类进行单元测试覆盖

java - Eclipse 自动添加继承文档来覆盖

java - Eclipse 类路径条目仅用于测试

java - 在 Eclipse 中,可以将单个源文件夹构建为多个输出文件夹吗?

eclipse - HCatOutputFormat ClassNotFoundException

Maven 和配置文件 : Using the same plugin in two different profiles and have both active at the same time