当我们用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. 【原创】<笔试题> 深圳市天软科技开发有限公司

    时间:2018.03.03  上午 1.编写函数,实现字符串比较功能. 参考:http://blog.csdn.net/liubinzi123/article/details/8271683 /* * ...

  2. Oracle shrink space

    一.开启表的行迁移 alter table table_name enable row movement; select 'alter table '||s.owner||'.'||s.table_n ...

  3. Docker的安装以及使用Docker安装jenkins,gogs,tomcat(一)

    (1)Docker的安装  官网安装链接 :https://yeasy.gitbooks.io/docker_practice/content/ 卸载旧版本 旧版本的 Docker 称为 docker ...

  4. post请求返回 读取 HTML 表单 URL 编码的数据流时出错

    <httpRuntime maxRequestLength="1048576" executionTimeout="3600" /> 网站配置 限制 ...

  5. APC注入(Ring3)

    首先简单介绍一下APC队列和Alertable. 看看MSDN上的一段介绍(https://msdn.microsoft.com/en-us/library/ms810047.aspx): The s ...

  6. 【模板】AC自动机(简单版)

    我:“woc...AC自动机?” 我:“可以自动AC???” 然鹅... 大佬:“傻...” 我:“(⊙_⊙)?” 大佬:“缺...” 我:“......” (大佬...卒 | 逃...) emm.. ...

  7. Java语法基础学习DaySeven

    ---恢复内容开始--- 一.包装类——Wrapper 1.定义:针对八种基本数据类型定义相应的引用类型——包装类(封装类) boolean——Boolean          byte——Byte ...

  8. 20165326 java第九周学习笔记

    第九周学习笔记 URL类 属于java.net包 最基本三部分:协议(对象所在的Java虚拟机支持).地址(能连接的有效IP地址或域名).资源(主机上的任何一个文件) 常用构造方法 public UR ...

  9. shell脚本实例-脚本批量创建用户

    #!/usr/bin/bash read -p "Please input number: " num if [[ ! "$num" =~ ^[0-9]+$ | ...

  10. ngxinx 配置

    vim 复制操作 1.复制 1)单行复制 在命令模式下,将光标移动到将要复制的行处,按“yy”进行复制: 2)多行复制 在命令模式下,将光标移动到将要复制的首行处,按“nyy”复制n行: 其中n为1. ...