Closed flashpixx closed 3 years ago
That <filters>
configuration should be added to the maven-shade-plugin
, not the micronaut-maven-plugin
.
Give it a try and please let me know.
Did I understand it correct, that I must add the Maven-Shade-Plugin to the pom.xml and append also my filters and than it should work?
Yes, you need to add maven-shade-plugin
to your POM. No need to specify a version, that comes from the Micronaut Parent POM.
Then, remove the filters configuration from micronaut-maven-plugin
and add it to maven-shade-plugin
.
I have configured this with
<plugin>
<groupId>io.micronaut.build</groupId>
<artifactId>micronaut-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
and this work for me. I thin the #101 can be fixed with that solution as well. Thanks for the help
Hello,
I'm try to build a Kafka Micronaut application with Spark components. Within a Spark dependency I have got some files .SF, .DSA and *.RSA and these files break after the UberJar is build the starting process with
So I try to configure the micronaut-maven-plugin with
But this creates the build error:
How can I apply such filter to remove the file during the build? I have seen this issue https://github.com/micronaut-projects/micronaut-maven-plugin/issues/101
Is it possible to switch to a normal maven-shade-plugin and how can this be reached?