zoukankan      html  css  js  c++  java
  • 无法加载MainifestResourceTransformer

    Cannot load implementation hint 'org.apache.maven.plugins.shade.resource.MainifestResourceTransformer'

    解决办法:

    http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html

    官网例子:

     1 Setting Manifest Entries with the ManifestResourceTransformer
     2 The ManifestResourceTransformer allows existing entries in the MANIFEST to be replaced and new entries added.
     3 
     4 For example, the following sample sets
     5 
     6 the Main-Class entry to the value of the app.main.class property,
     7 the X-Compile-Source-JDK entry to the value of the maven.compile.source property and
     8 the X-Compile-Target-JDK entry to the value of the maven.compile.target property.
     9 <project>
    10   ...
    11   <build>
    12     <plugins>
    13       <plugin>
    14         <groupId>org.apache.maven.plugins</groupId>
    15         <artifactId>maven-shade-plugin</artifactId>
    16         <version>2.4.3</version>
    17         <executions>
    18           <execution>
    19             <phase>package</phase>
    20             <goals>
    21               <goal>shade</goal>
    22             </goals>
    23             <configuration>
    24               <transformers>
    25                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
    26                   <manifestEntries>
    27                     <Main-Class>${app.main.class}</Main-Class>
    28                     <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
    29                     <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
    30                   </manifestEntries>
    31                 </transformer>
    32               </transformers>
    33             </configuration>
    34           </execution>
    35         </executions>
    36       </plugin>
    37     </plugins>
    38   </build>
    39   ...
    40 </project>
  • 相关阅读:
    清除/var/spool/clientmqueue/目录下的文件
    欧几里德法求最大公约数
    博客园美化
    Vue.js学习笔记-script标签在head和body的区别
    C++ 继承
    Ubuntu 更换软件源/镜像源
    12306火车票余票查询&Python实现邮件发送
    饥荒联机代码
    linux内核编程入门 hello world
    windows环境下使用C++&Socket实现文件传输
  • 原文地址:https://www.cnblogs.com/moonpool/p/6119369.html
Copyright © 2011-2022 走看看