maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Beelen <>
Subject enforce dependency to be set to provided
Date Thu, 17 Dec 2009 11:09:11 GMT

For my portal I'm going to write various web-application and I want them to reuse various
libraries provided by my portal server. All the webapp project have the same parent. In order
to prevent the webapps to include the dependency in the WEB-INF\lib, I wan't to configure
a rule in the parent pom, where I ban some library (log4j:log4j). The webapp are allowed to
use the dependency, but only when the scope is set to provided.

I tried the bannedDependency configuration like this:










That doesn't work, because when I build a webapp with the log4j dependency on compile scope,
the enforcer plugin doesn't cause my build to fail, which I would like it to.

Any suggestions how to handle this?

With kind regards,

Marco Beelen
+31(0)6 55 145 554

Claus Sluterweg 125
2012 WS Haarlem<>
+31 (0)23 547 6369

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message