[ http://jira.codehaus.org/browse/MWAR-21?page=comments#action_58580 ]
David Boden commented on MWAR-21: --------------------------------- >It looks like there is a missing dependency scope. The one that is required >for compilation but not in the runtime. I strongly agree with this comment. However, I fundamentaly don't understand why "provided" scope doesn't declare transitive dependencies (which would make it exactly fit the bill of a scope that was required for compilation but not for runtime) Reasoning: If a subproject is dependent at runtime on a particular product then surely the superproject will, at the end of the day, need that product on its runtime classpath. This is the normal use-case. On the odd occasion that we don't want this behaviour, the developer can "exclude" unwanted dependencies and then have a talk with the person who manages the subproject and say "do you really need this dependency at runtime?". Speaking of use cases, it worries me that Maven doesn't have a simple description of expected use cases for each plugin right at the top of the documentation. An example that relates to this Jira issue is: Use Case: Developer packages multiple war files in an ear and wants to consolidate the dependencies onto the ear classpath. This involves: 1. Excluding the dependency jar files from the war files. 2. Marking the war files in a way that the ear file generation process will know to include them. 3. Changing the ear plugin behaviour so that when it sees that jars are excluded from the war they are ear. 4. Create entries in the war manifest so that the dependent jars can be loaded from the ear classloader. Not an easy use case, by any means, but a very, very common one and one that Maven 2 does not currently support. > Need a way to include limited set of webapp's dependencies > ---------------------------------------------------------- > > Key: MWAR-21 > URL: http://jira.codehaus.org/browse/MWAR-21 > Project: Maven 2.x War Plugin > Type: Improvement > Environment: M2.0.1 > Reporter: Dirk Olmes > Assignee: Stephane Nicoll > Priority: Blocker > Attachments: AbstractWarMojo.diff > > > I need a way to pack a war that includes only a limited set of the webapp's > dependencies. We're deploying in mainly two different environments: for > testing, the webapp runs standalone and thus needs to include all its > dependencies in the war. For production we deploy the webapp into a JBoss > server that has all the dependencies already installed. > I've modified AbstractWarMojo in the following way: 1) allow to specify > dependencyIncludes an dependencyExcludes (as lists) 2) upon building the war, > each dependency is checked against the excludes and the includes and will be > added to the war accordingly. > While this patch may not be the best way to to it, it clearly shows my > requirements. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
