在类org.apache.maven.plugins.shade.resource.ManifestResourceTransformer中找不到'resource'

时间:2017-12-03 07:31:09

标签: maven maven-shade-plugin

当我使用maven-shade-plugin打包一个执行jar,然后失败,并打印错误消息:无法在类org.apache.maven.plugins.shade.resource.ManifestResourceTransformer中找到'resource'

以下是我的配置:

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <transformers>
                            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                <manifestEntries>
                                    <Main-Class>cn.rongcapital.pa.ingester.IngestJobBootstrap</Main-Class>
                                    <!--<X-Compile-Source-JDK>1.8</X-Compile-Source-JDK>-->
                                    <!--<X-Compile-Target-JDK>1.8</X-Compile-Target-JDK>-->
                                    <!--<Class-Path>target</Class-Path>-->
                                </manifestEntries>
                            </transformer>
                        </transformers>
                        <relocations>
                            <relocation>
                                <pattern>io.netty</pattern>
                                <shadedPattern>rongcapital.io.netty</shadedPattern>
                            </relocation>
                        </relocations>

                    </configuration>
                </execution>
            </executions>
        </plugin>

谁能告诉我原因,以及如何解决它。感谢。

0 个答案:

没有答案