so I want to exclude one jar file from a third party war dependency due to cve issues. I tried a lot of ways like overlay exclude, but it did not help. Basically, i just want maven to remove that jar transitive dependency in the war file. Here is my current code:
<dependencies>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<version>4.10.3</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<overlays>
<overlay>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<excludes>
<exclude>WEB-INF/lib/commons-fileupload-1.2.1.jar</exclude>
</excludes>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>
But when I check the solr war file, the commons-fileupload-1.2.1.jar is still there. I am kind of lost now.