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

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

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

    如下:

     1 <plugin>
     2    <groupId>org.apache.maven.plugins</groupId>
     3    <artifactId>maven-shade-plugin</artifactId>
     4    <version>2.4.3</version>
     5    <configuration>
     6       <createDependencyReducedPom>false</createDependencyReducedPom>
     7    </configuration>
     8    <executions>
     9       <execution>
    10          <phase>package</phase>
    11          <goals>
    12             <goal>shade</goal>
    13          </goals>
    14          <configuration>
    15             <transformers>
    16                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
    17                   <mainClass>Main</mainClass>
    18                </transformer>
    19             </transformers>
    20          </configuration>
    21       </execution>
    22    </executions>
    23 </plugin>
  • 相关阅读:
    树分治 poj 1741
    堆 poj 2010
    堆 poj 2442
    堆的基本操作
    状态压缩codeforces 11 D
    状态压缩 CSU1129 送货到家
    炮兵阵地 POJ 1185
    状态压缩 HDU4539 郑厂长系列故事——排兵布阵
    状态压缩 HDU 3182
    android手势创建及识别
  • 原文地址:https://www.cnblogs.com/acm-bingzi/p/6693199.html
Copyright © 2011-2022 走看看