• maven 总结整理(二)——download source code


    当我们用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:dinstall_softwareapache-tomcat-7.0.75-windows-x86apache-tomcat-7.0.75</home>
                        </container>
                        <configuration>
                            <type>existing</type>
                            <!--指明tomcat服务器的安装目录 -->
                            <home>C:dinstall_softwareapache-tomcat-7.0.75-windows-x86apache-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>标签部分追加进来之后,重新编译项目,就可以得到源代码了。

  • 相关阅读:
    linux命令之sort uniq wc cut
    linux中的sed命令
    find命令
    awk命令
    记录一些运维的零散知识点
    /proc虚拟文件系统
    系统性能查看命令vmstat iostat top
    不得不说的top命令
    解决一个页面多个Jquery冲突问题
    解决"服务器应用程序不可用"的解决办法 服务器应用程序不可用 您试图在此Web服务器上访问的Web应用程序当前不可用
  • 原文地址:https://www.cnblogs.com/lihao007/p/7011219.html
Copyright © 2020-2023  润新知