Hi Benson, On Wed, Nov 4, 2009 at 8:03 AM, Benson Margulies <[email protected]> wrote: > I have a webapp that runs in Jetty and Tomcat. To make it run cleanly in > JBoss, I need to subtract some jar files from the dependency graph. > > Unless I'm confused, this is going to take a lot of POM XML, because those > jars are in the graph of several of my dependencies. > > So, I'm wondering: is there any other declarative mechanism for forcing > 'provided' scope? Can dependencyManagement do this? > > Alternatively, is there some large hammer to be had at the point of WAR > packaging that would allow me to filter? >
Just something I've been toying with in my mind, without doing any sort of actual testing, is... Have the top level corporate pom define all of these types of dependencies as scope=provided. Then have child modules for each of the containers I could ever want to support (we use Jetty and Tomcat both, and are being asked to evaluate Websphere). These modules would have no actual code, but would be a set of dependencies with different scopes depending on what the container provides and what is required, to escalate the scope level beyond what the corporate pom has in dependencyManagement. Profile activation would then pull in one of these container modules which would trigger transitive dependencies at the right scope. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
