I'm using Maven Shade Plugin to relocate some classes of Apache. The issue which I'm facing is that I have this string as part of my classes:
private static final String ORG_APACHE_HTTP_HTTP_REQUEST = "org.apache.http.HttpRequest"
However the Maven Shade Plugin changes it to
private static final String ORG_APACHE_HTTP_HTTP_REQUEST = "com.company.dependencies.org.apache.http.HttpRequest"
Is there a way for me to exclude my class from being modified by the maven shade plugin?
Current config
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>false</minimizeJar>
<relocations>
<relocation>
<pattern>org.apache</pattern>
<shadedPattern>com.company.org.apache</shadedPattern>
<excludes>
<exclude>com.company.ClassToBeExcluded</exclude>
</excludes>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>