zoukankan      html  css  js  c++  java
  • maven项目打包时生成dependency-reduced-pom.xml

    http://www.cnblogs.com/acm-bingzi/p/6693199.html

    ********************************************************

    今天给maven项目打jar包,发现在pom.xml文件的同路径下,突然生出了一个dependency-reduced-pom.xml,也不知道这个文件是干什么的,看着别扭就想着删除了它。

    后来知道是我在pom.xml中,使用了maven-shade-plugin插件打jar包,才导致了它的出现。添加上以下代码可以避免生成此文件:
    <configuration>
          <createDependencyReducedPom>false</createDependencyReducedPom>
    </configuration>

    如下:

      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-shade-plugin</artifactId>
         <version>2.4.3</version>
         <configuration>
            <createDependencyReducedPom>false</createDependencyReducedPom>
         </configuration>
         <executions>
            <execution>
              <phase>package</phase>
              <goals>
                 <goal>shade</goal>
              </goals>
              <configuration>
                 <transformers>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                       <mainClass>Main</mainClass>
                    </transformer>
                 </transformers>
              </configuration>
           </execution>
        </executions>
     </plugin>

    把每一件简单的事情做好,就是不简单;把每一件平凡的事情做好,就是不平凡!相信自己,创造奇迹~~

  • 相关阅读:
    C#创建Windows Service(Windows 服务)基础教程
    c#写windows服务
    怎么样快速学习AngularJS?
    Web API 安全问题
    ASP.NET Web API身份验证和授权
    通过HttpClient来调用Web Api接口~续~实体参数的传递
    在WebApi中实现Cors访问
    SQL Server 动态生成数据库所有表Insert语句
    EasyUI combobox
    Linq使用Group By 1
  • 原文地址:https://www.cnblogs.com/zhao1949/p/6855017.html
Copyright © 2011-2022 走看看