maven下載的jar包可以查看源碼
阿新 • • 發佈:2017-05-10
tin 需要 settings xml文件 ava mave down doc ref
1:Maven命令下載源碼和javadocs
當在IDE中使用Maven時如果想要看引用的jar包中類的源碼和javadoc需要通過maven命令下載這些源碼,然後再進行引入,通過mvn命令能夠容易的達到這個目的:
2.
2:通過配置文件添加
打開maven配置文件 setting.xml文件(.../.m2/settings.xml) 增加如下配置:<profiles> <profile> <id>downloadSources</id> <properties> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </properties> </profile> </profiles> <activeProfiles> <activeProfile>downloadSources</activeProfile> </activeProfiles>
3:配置eclipse
Window > Preferences > Maven and checking the "Download Artifact Sources" and "Download Artifact JavaDoc" optionsmaven下載的jar包可以查看源碼