maven下载源码
能下載到源代碼的原則是倉(cāng)庫(kù)中打了resource的jar包
1.使用命令
mvn dependency:sources 下載依賴包的源代碼。
mvn dependency:sources -DdownloadSources=true -DdownloadJavadocs=true
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=javax.mail:mail:1.1:jar:sources
2.eclipse窗口
eclipse窗口->首選項(xiàng)->maven->勾選download artifact sources
eclipse的項(xiàng)目maven dependecies中選擇對(duì)應(yīng)的jar,右擊->maven->download sources
3.在pom中設(shè)置插件
<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>
轉(zhuǎn)載于:https://www.cnblogs.com/q924152020/p/8682707.html
總結(jié)
- 上一篇: IDEA 初始配置教程
- 下一篇: iTOP-4418/6818开发板支持双