Hello, 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: <bannedDependencies> <searchTransitive>true</searchTransitive> <excludes> <exclude>log4j:log4j</exclude> </excludes> <includes> <include>log4j:log4j:*:provided</include> </includes> </bannedDependencies> 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 Marco Beelen Software-architect +31(0)6 55 145 554 IPROFS Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl<http://www.iprofs.nl/> +31 (0)23 547 6369