2

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.

Jack huang
  • 21
  • 2

0 Answers0