Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ManifestResourceTransformer

人走茶凉 提交于 2019-12-10 10:57:55

问题


when my use maven-shade-plugin package a execute jar, then Failed, and print error message:Cannot find 'resource' in class org.apache.maven.plugins.shade.resource.ManifestResourceTransformer

follow is my config:

<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>

who can tell me why, and how to resolve it . thanks.

来源:https://stackoverflow.com/questions/47616259/cannot-find-resource-in-class-org-apache-maven-plugins-shade-resource-manifest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!