当我们用maven下载jar包时,有时希望下载jar包的源代码,此时可以在pom.xml文件中,进行设置。

<build>
    <finalName>WebProject</finalName>
    <plugins>
          <plugin>
              <groupId>org.codehaus.cargo</groupId>
              <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.2.3</version>
                <configuration>
                    <container>
                        <!-- 指明使用的tomcat服务器版本 -->
                        <containerId>tomcat7x</containerId>
                        <!--指明tomcat服务器的安装目录 -->
                        <home>C:\d\install_software\apache-tomcat-7.0.75-windows-x86\apache-tomcat-7.0.75</home>
                    </container>
                    <configuration>
                        <type>existing</type>
                        <!--指明tomcat服务器的安装目录 -->
                        <home>C:\d\install_software\apache-tomcat-7.0.75-windows-x86\apache-tomcat-7.0.75</home>
                    </configuration>
                    <configuration>
                      <downloadSources>true</downloadSources>
                      <downloadJavadocs>false</downloadJavadocs>
                  </configuration>
                </configuration>
                <executions>  
                  <execution>  
                      <id>cargo-run</id>  
                      <phase>install</phase>  
                      <goals>  
                          <goal>run</goal>  
                      </goals>  
                  </execution>  
              </executions>
          </plugin>
      </plugins>
  </build>


<configuration>标签部分追加进来之后,重新编译项目,就可以得到源代码了。

maven 总结整理(二)——download source code的更多相关文章

  1. Spring 4 MVC example with Maven - [Source Code Download]

    In this tutorial, we show you a Spring 4 MVC example, using Maven build tool. Technologies used : Sp ...

  2. Red Gate系列之二 SQL Source Control 3.0.13.4214 Edition 数据库版本控制器 完全破解+使用教程

    原文:Red Gate系列之二 SQL Source Control 3.0.13.4214 Edition 数据库版本控制器 完全破解+使用教程 Red Gate系列之二 SQL Source Co ...

  3. How to build the Robotics Library from source code on Windows

    The Robotics Library is an open source C++ library for robot kinematics, motion planning and control ...

  4. How to build windows azure PowerShell Source Code

    Download any version source code of Windows Azure Powershell from https://github.com/Azure/azure-sdk ...

  5. view class source code with JAD plugin in Eclipse

    The default class viewer doesn't decompile the class file so you cannot open and check the source co ...

  6. Ununtu 12.04 gedit安装插件Source Code Browser

    1. 安装ctags: sudo apt-get install exuberant-ctags 2. 打开https://github.com/Quixotix/gedit-source-code- ...

  7. [解决]ASP.NET MVC 4/5 源码调试(source code debug)

    ========================ASP.NET MVC 4============================ ASP.NET MVC 4 source code download ...

  8. 3 Ways of JDK Source Code Attachment in Eclipse---reference

    You wanna look at a JVM class while you are coding and you cannot. Here is the solution. First of al ...

  9. [转]Native Java Bytecode Debugging without Source Code

    link from:http://www.crowdstrike.com/blog/native-java-bytecode-debugging-without-source-code/index.h ...

随机推荐

  1. 前端常用长度单位(px,em,rem,pt)介绍

    CSS中有不少属性是以长度作为值的.盒模型的属性就是一些很明显的值属性:width.height.margin.padding.border.除此之外还有很多其他的CSS属性的值同样也是长度值,像偏移 ...

  2. js 动态绑定鼠标事件

    <script> function getElementsByClassName(n) { var classElements = [],allElements = document.ge ...

  3. PHP socket以及http、socket、tcp、udp

    一.TCP/UDP/Socket TCP/IP(Transmission Control Protocol/Internet Protocol)即传输控制协议/网间协议,是一个工业标准的协议集,它是为 ...

  4. 《Python》re模块补充、异常处理

    一.re模块 1.match方法 import re # match 验证用户输入的内容 ret = re.match('\d+', 'hhoi2342ho12ioh11') print(ret) # ...

  5. idea自动生成serialVersionUID(转)

    原文链接:http://blog.sina.com.cn/s/blog_54b09dc90101d9bu.html Setting->Plugins 找到一个叫  GenerateSerialV ...

  6. springboot 打包部署

    springboot内置有tomcat所以我们测试的时候没有加入自己的容器 那么我们的 springboot 怎么发布呢? 1.打成 jar 2.打成 war 这种方式我就不说了,网上有教程,我觉得j ...

  7. 牛客第二场 J farm

    White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The pl ...

  8. ChinaCock界面控件介绍-TCCImageViewerForm

    有多个图片,左右滑动可以切换,通过手势还可以放大.缩小查看,象常见的相册,就是这样子实现效果. 现在,我们有了TCCImageViewerForm组件,也可以轻松实现这样的场景应用. 现在看看TCCI ...

  9. centos安装nginx和配置

    安装所需环境 Nginx 是 C语言 开发,建议在 Linux 上运行,当然,也可以安装 Windows 版本,本篇则使用 CentOS 7 作为安装环境. 一. gcc 安装安装 nginx 需要先 ...

  10. Python 命名元组

    from collections import namedtuple # 类 p = namedtuple("Point", ["x", "y&quo ...