【问题标题】:Maven “shaded” plugin does not create shadedClassifierName file in the traget directoryMaven “shaded” 插件不在目标目录中创建 shadedClassifierName 文件
【发布时间】:2019-05-22 00:53:40
【问题描述】:

我刚刚在我的 pom 中添加了<pluginManagement> 标记,之后当我构建时,maven 不会创建 shadedClassifierName jar 文件“paria-java-1.0.73-SNAPSHOTjar-with-dependencies.jar”在目标目录中。

知道出了什么问题吗?

<pluginManagement>
<plugins>
  <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-shade-plugin</artifactId>
     <!-- original version 2.1 -->
     <version>3.2.0</version> 
     <configuration>
        <shadedArtifactAttached>true</shadedArtifactAttached>
        <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
        <filters>
           <filter>
              <artifact>*:*</artifact>
              <excludes>
                 <exclude>jdbc.properties_vb</exclude>
                 <exclude>META-INF/*.SF</exclude>
                 <exclude>META-INF/*.DSA</exclude>
                 <exclude>META-INF/*.RSA</exclude>
                 <exclude>META-INF/LICENSE*</exclude>
                 <exclude>META-INF/license.txt</exclude>
                 <exclude>META-INF/NOTICE*</exclude>
                 <exclude>META-INF/notice.txt</exclude>
                 <exclude>LICENSE</exclude>
                 <exclude>license.txt</exclude>
                 <exclude>NOTICE</exclude>
                 <exclude>overview.html</exclude>
                 <exclude>readme.txt</exclude>
                 <exclude>testpool.jocl</exclude>
                 <exclude>XPP3_1.1.4c_MIN_VERSION</exclude>
              </excludes>
           </filter>
        </filters>
        <transformers>
           <transformer implementation="org.apache.maven.plugins.shade.
  resource.ManifestResourceTransformer">
              <manifestEntries>
                 <Main-Class>be.baba.tar.upload.Run</Main-Class>
              </manifestEntries>
           </transformer>
        </transformers>
     </configuration>
     <executions>
        <execution>
           <phase>package</phase>
           <goals>
              <goal>shade</goal>
           </goals>
        </execution>
     </executions>
  </plugin>

【问题讨论】:

  • 需要在pluginManagement外添加...

标签: maven plugins jquery-plugins maven-shade-plugin


【解决方案1】:

确实如此,感谢@khmarbaise 需要在pluginManagement之外添加。

【讨论】:

    猜你喜欢
    • 2012-09-17
    • 2016-09-16
    • 1970-01-01
    • 2010-12-11
    • 2012-11-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多