Issue
For one of my Spring-boot projects, i am using Spring Security. I use multiple sub directories, but csrf is not one of them. NexusIQ reports an issue with the classes from the csrf directory. I can waive the issue since i am not using it and the problem would be solved, but i am wondering if there is another way to exclude this folder from being in the dependency. A way to 'exclude' this directory from being downloaded in the first place.
Using the exclude tag i can exclude underlying dependencies, but i can't figure out how to use it on a folder. Is this possible?
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.4.5</version>
</dependency>
Solution
No.
You can either take the whole dependency or leave it.
The only way around this would be to compile the dependency yourself from source or to create a patched version of it by manipulating it.
Answered By - J Fabian Meier