Not forcing "optional=true" on all the lower-level dependencies seems like the more-right way to go.
However, either way should work. My 2cents - if using the "optional=false", be sure to comment it so that it's obvious why that's needed. -art > > > > 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 > > > > > > _______________________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://activemq.2283324.n4.nabble.com/optional-dependencies-and-Maven-versions-tp4677817.html > To start a new topic under ActiveMQ - Dev, email > [email protected] > To unsubscribe from ActiveMQ - Dev, visit > http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2368404&code=YXJ0QGFydG5hc2VlZi5jb218MjM2ODQwNHwtMjA1NDcyNjY5MQ== -- View this message in context: http://activemq.2283324.n4.nabble.com/optional-dependencies-and-Maven-versions-tp4677817p4677834.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
