首页 > 编程语言 > 详细

maven下载的jar包可以查看源码

时间:2017-05-10 20:29:00      阅读:349      评论:0      收藏:0      [点我收藏+]

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

maven下载的jar包可以查看源码

原文:http://www.cnblogs.com/panxuejun/p/6837874.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!