You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brian Topping (JIRA)" <ji...@codehaus.org> on 2007/08/31 04:34:11 UTC

[jira] Commented: (MEAR-60) Improve support for skinny war files

    [ http://jira.codehaus.org/browse/MEAR-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106045 ] 

Brian Topping commented on MEAR-60:
-----------------------------------

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.

> Improve support for skinny war files
> ------------------------------------
>
>                 Key: MEAR-60
>                 URL: http://jira.codehaus.org/browse/MEAR-60
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.3
>         Environment: mvn 2.0.5
>            Reporter: Marcel Schutte
>            Priority: Critical
>
> Provide a boolean configuration option for webModules to include the war's transitive dependencies.
> As described on http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html it is very common in a J2EE environment to use so called skinny wars. Here the war's WEB-INF/lib will not contain the dependent jars, but instead they are packaged inside the EAR. The war references them through its META-INF/MANIFEST.MF
> This option could be used to avoid the 'painful part' mentioned in the above web page. The war's dependencies wouldn't have to be duplicated alongside the ear's.
> I also found an old issue (MEAR-14) which has asked for the current default behavior of not including the transitive dependencies. It suggests a property to include specific dependencies of the war. As far as I can tell this has never been implemented and this is also not what I am asking for. My proposal is an all of nothing kind of option for each war module in the ear.
> On a side note, for me this is the part where removal of the old maven 1 style properties per dependency is missed the most. With them it was possible to decide for each single dependency whether to put it in WEB-INF/lib or reference it through the manifest classpath. But of course, then we didn't have the transitive dependencies

-- 
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