当我们用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. java-Object类的解析(持续更新)

    1.getClass()方法 public class Object { /*一个本地方法,具体是用C(C++)在DLL中实现的,然后通过JNI调用*/ private static native v ...

  2. 【转载】OpenCV 摄像头控制

    参考:[OpenCV] -- 简单摄像头操作 - 代码人生 - 博客频道 - CSDN.NET http://blog.csdn.net/qiurisuixiang/article/details/8 ...

  3. JavaScript -基础- 函数与对象(二)String

    一.判断数据类型typeof与判断对象类型instanceof 1.typeof typeof只能判断基础数据类型,无法判断引用数据类型 <script> var s="hell ...

  4. java 实现简单循环队列

    package www.queue; import java.util.Arrays; /** * 循环队列: * 循环队列的出现是为了解决顺序队列出队列后,首指针向后移动后前面的存储过程浪费不能使用 ...

  5. 最短路径:Dijkstra & Floyd 算法图解,c++描述

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. S2 深入.NET和C#编程 机试测试错题积累

    机试第一题:                              //创建文件流(路径 模式) FileStream fa = new FileStream(@"D:\\S2第一次全文 ...

  7. csv,json格式数据的读写

    #!python3 # -*- coding:utf-8 -*- #CSV stands for "comma-separated values",and CSV files ar ...

  8. [Leetcode 104]求二叉树的深度Depth of BinaryTree

    [题目] Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the ...

  9. java动手动脑3

    2016-10-152016-10-15一.编写一个方法,使用以上算法生成指定数目(比如1000个)的随机整数. 生成50个1到10的随机整数. value=a+(int)(Math.Random() ...

  10. Android : android 8.0 audio 接口分析

    1.HIDL 的概念 HIDL 读作 hide-l,全称是 Hardware Interface Definition Language.它在 Android Project Treble 中被起草, ...