While working with Art to figure out why his web console war was significantly smaller than mine, we determined that it comes down to what version of Maven you use to build. 3.0.5 includes more jars than 3.1.1. Looking into it, it looks like 3.1.1 is using the parent poms “optional=true” flags for the transitive dependencies whereas 3.0.5 is not.
For example, in the parent pom, we have all the spring stuff (spring-core, spring-context, spring-beans, spring-aop) as “optional=true”. However, in activemq-web, we set spring-web and spring-webmvc to optional=false. With 3.0.5, the transitive dependencies of spring-webmvc/spring-web then also get changed to optional=false. However, with 3.1.1, they don’t. They remain optional=true and thus don’t get packaged into the war. For consistency sake, I’d like to get this fixed. Two options: 1) For all the transitive deps pulled in for activemq-web, acttivemq-web-console, etc… add them directly to the deps in those poms with a optional=false flag. 2) Remove the optional=true flag from the parent pom and add it into the other poms where they truly are optional. Avoid the option=false construct. Thoughts? I believe #2 would be more “maven standard”. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
