当我们用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. 服务消费和负载(Feign)

    Spring Cloud Feign Spring Cloud Feign是一套基于Netflix Feign实现的声明式服务调用客户端.它使得编写Web服务客户端变得更加简单.我们只需要通过创建接口 ...

  2. 原生js(form)验证,可以借鉴下思路,应用到工作中

    我在工作中时常使用form验证,在目前的公司做的表单验证用的angular的form组件,对于一个有追求的前端,或者应用在移动端写个form验证,引入angular或者jquery组件等验证,难免显得 ...

  3. bzoj2301

    题解: 莫比乌斯反演 再加上一个分块 然后和上一题差不多了 代码: #include<cstdio> #include<cmath> #include<algorithm ...

  4. List在遍历中删除t元素

    法一:使用普通for循环遍历 注意: 1.从头开始循环,每次删除后 i  减一.             2.从尾开始循环. public class Main { public static voi ...

  5. sas 选择一段日期,和一定周期,生成日期序列和周期序列

    工作需要,得选择一段日期,和一定周期,生成日期序列和周期序列.暂时用七天为一个周期 data d; format date date9.; do date='04mar2018'd to'05may2 ...

  6. Androi开发 ---Fragment片段布局案例

    效果图: 1.MainActivity.java package com.example.android_activity; import android.app.Activity; import a ...

  7. Oracle function和procedure

    1.返回值的区别 函数有1个返回值,而存储过程是通过参数返回的,可以有多个或者没有 2. 调用的区别,函数可以在查询语句中直接调用,而存储过程必须单独调用. 函数:一般情况下是用来计算并返回一个计算结 ...

  8. [MyBatis] MyBatis理论入门

    什么是MyBatis iBATIS提供的持久层框架包括SQL Maps和Data Access Objects(DAOs) 是一款优秀的持久层框架,它支持定制化 SQL.存储过程以及高级映射. MyB ...

  9. 解决java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor问题

    hibernate整合spring当在spring配置文件中加入如下代码 <!--2.配置事务属性,需要事务管理器--> <tx:advice id="txAdvice&q ...

  10. ubantu-vim操作

    vim其实就是vi的升级版,vi里的所有命令vim里都可以用,一般使用来说几乎没什么差别. 注:本篇文章区分大小写! vi / vim三级模式的关系: 命令行模式 任何时候,不管用户处于何种模式,只要 ...