How do we exclude a dependency in maven in case the dependency type is test-jar?

Viewed 21

I have a project Pom in which for one of the dependency the type for it is test-jar. Now I want to exclude one of the dependency coming through it. But it is not getting excluded as the type for it is test-jar.

<dependency>
   <groupId>com.myproject</groupId>
   <artifactId>myproject<artifactId>
   <scope>test</scope>
   <type>test-jar</type>
   <exclusions>
     <exclusion>
        <groupId>com.myproject1</groupId>
        <artifactId>myproject1<artifactId>
     </exclusion>
   </exclusions>
</dependency>

How can I exclude the dependency incase the type is test-jar

0 Answers
Related