<build>
<plugins> <plugin> <artifactId>maven-shade-plugin</artifactId> <version>3.2.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> <configuration> <finalName>chapter4</finalName> <!-- Using filtering in order to get rid of nasty warnings generated by shading module-info--> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>module-info.class</exclude> </excludes> </filter> </filters> </configuration> </plugin> </plugins> </build>The key line is the
<exclude>module-info.class</exclude>
. The filter excludes that file whenever it sees it, in any artifact (*:*
= any artifact). (The other three excludes I use to get rid of bugs with signature files in dependencies)
Aucun commentaire:
Enregistrer un commentaire
to criticize, to improve