方法一:

mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc

The first command will attempt to download source code for each of the dependencies in your pom file.

The second command will attempt to download the Javadocs.

方法二:

Open your settings.xml file (~/.m2/settings.xml). Add a section with the properties added. Then make sure the activeProfiles includes the new profile.

<profiles>
    <profile>
        <id>downloadSources</id>
        <properties>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
        </properties>
    </profile>
</profiles>

<activeProfiles>
    <activeProfile>downloadSources</activeProfile>
</activeProfiles>

 

相关文章:

  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-10-14
猜你喜欢
  • 2021-04-06
  • 2021-07-06
  • 2021-12-12
  • 2022-12-23
  • 2021-07-23
  • 2021-09-02
  • 2022-12-23
相关资源
相似解决方案