My project has some dependencies (really many) and I'm adding them in dependency. But I don't want any transitive dependency, that will be out of my control (maven brings me almost three times of what I need). I tried to ban transitive dependency in this way:
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
But after I did a mvn package, the transitive dependencies are still downloaded and added to my built package. Here is the logging of maven:
[DEBUG] Dependencies for project:com.XXX.XXX:
org.apache.XXX
org.apache.XXX.YYY
...
[DEBUG] Resolving project dependencies transitively:
[DEBUG] org.com.XXX.yyy
[DEBUG] org.apache.ZZZ
...
[DEBUG] Adding artifact: org.apache.ZZZ with file: ${file name} to assembly location: lib/${file name}.jar
...
So this is not what I want. I want either maven DON'T automatically download transitive dependencies or don't add them into my 'mvn package'.
Appreciate any help.