两个依赖,就想下mail的源码包,因该怎么
<dependencies>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
设置呢?,以下几个都是下全部的:
使用maven命令:mvn dependency:sources 下载依赖包的源代码。
或者
mvn dependency:sources -DdownloadSources=true -DdownloadJavadocs=true
或者
eclipse窗口->首选项->maven->勾选download artifact sources
还有一种应该也行:
<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>
在eclipse的项目maven dependecies中选择对应的jar,右击->maven->download sources
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=javax.mail:mail:1.1:jar:sources
能下载到源代码的原则是仓库中打了resource的jar包。