|
I agree that extra flexibility is needed. It is just that as far as I understand maven, such a change would have a major impact on mavens dependency handling. I don't think that is going to happen soon and therefore I am trying what for me is 'the next best thing'. There's nothing I can do at this point. We need an update on how war dependencies are handled. A new build I am working on needs the jars available to non-web resources, so a skinny war is needed. Ouch. It seems like state should be able to be stored in the WAR manifest that a skinny WAR is desired, and the EAR plugin looks at the manifest to see if it has that flag. If so, the POM in the WAR is parsed and the dependencies (with transitives) is included. Truly, the 'painful part' of this isn't getting the direct dependencies of the WAR into the ear, it's all the transitives. Suddenly, one of the best things about m2 is broken. I would code this up, but I haven't had much luck getting patches applied before they go stale, resulting in a lot of wasted effort. If someone made a commitment to apply this, I would code it with the test cases. Created a link between this issue and This is a big issue for a lot of people, and the information on it appears to be very fragmented. I have tried to summarize all the information related to this issue on the Codehaus wiki so that a good, lasting solution can hopefully be found. Please chip in with your thoughts: http://docs.codehaus.org/display/MAVENUSER/Solving+the+Skinny+Wars+problem |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I don't think that a boolean configuration option is flexible enough. There are situations where you want most of your jars in the ear, but still some of them in the war (for example, if they contain a tag library - the jsp compiler does not find the tag library if it is in the ear).