Hello,
I use maven-shade-plugin to create an “uber-jar” with all dependencies included, including aspose.
When I compile, I have a warning about overlapping classes:
[WARNING] aspose-words-19.12-jdk17.jar, aspose-words-19.12-shaping-harfbuzz-plugin.jar define 6 overlapping classes:
[WARNING] - com.aspose.words.BasicTextShaperCache
[WARNING] - com.aspose.words.Cluster
[WARNING] - com.aspose.words.FontFeature
[WARNING] - com.aspose.words.Glyph
[WARNING] - com.aspose.words.ITextShaper
[WARNING] - com.aspose.words.ITextShaperFactory
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See https://maven.apache.org/plugins/maven-shade-plugin
Excluding artifact is possible with this maven plugin, but I can’t find how to exclude the harfbuzz plugin. I tried this approach:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<!-- CUT -->
</executions>
<configuration>
<filters>
<!-- CUT -->
<filter>
<artifact>com.aspose:aspose-words:jar:shaping-harfbuzz-plugin</artifact>
<excludes>
<exclude>com.aspose.words.BasicTextShaperCache</exclude>
<exclude>com.aspose.words.Cluster</exclude>
<exclude>com.aspose.words.FontFeature</exclude>
<exclude>com.aspose.words.Glyph</exclude>
<exclude>com.aspose.words.ITextShaper</exclude>
<exclude>com.aspose.words.ITextShaperFactory</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
Do you have any idea how I can resolve this issue?
Thank you for your time.