Hi Rodrigo, Thanks for your reply,
Mmmm, then, why do you want to stop transitivity? If you depend on a war
module which depends on implJarModule at runtime, then your final module will also depend on it. Maybe your final module includes another implementation?
It's not rely that I want to stop transitivity. I just want to say that my warModule depends on implJarModule at runtime but it won't provide it. It's the responsibility of my earModule to include/provide that jar. Anyway, I guess what you need is to declare the dependency as:
<dependency> <groupId>...</groupId> <artifactId>implJarModule</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> The "optional" flag should break transitivity.
As indicated in my first mail, I don' think that optional is the solution: - I don't think also that optional is the solution because my warModule has to inform that it need this dependency in runtime (declared in a spring context descriptor). It's not the semantic of optional (cf. [1]). [1] http://www.nabble.com/dependencies-are-bloated-in-M2-tf3182336s177.html#a8831892 If you need my warModule, you will see that it has an optional dependency to implJarModule with the runtime scope. So you will think that you don't necessarily need implJarModule. But it's not true and not what I want to say. Regards, Rémy <http://www.nabble.com/dependencies-are-bloated-in-M2-tf3182336s177.html#a8831892>