How about excluding it using the exclude directive in the main springboot pom.xml file?
<dependencies>
...
<dependency>
<groupId>your.custom.library.groupId</groupId>
<artifactId>artifactId</artifactId>
...
<exclusions>
<exclusion>
<groupId>unwanted.test.dependency.groupId</groupId>
<artifactId>artifactId</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>