The following comment has been added to this issue:

     Author: Tim Chen
    Created: Fri, 26 Mar 2004 11:13 AM
       Body:
Heres the issue I had:
if i had a jar in my ear.. and multiple subprojects rely on it.. 
commons-xxx or our own commons.jar for example
and it is not reference by the application.xml
i just get class not founds when trying to use anything from them

So it would seem to me that when Richard suggested that:
"use a single property (ear.module) to indicate that the dependency is a J2EE module - 
setting this to true would imply ear.bundle=true also."

I would have said that to 1) maintain backwards compatibility and 2) to handle the 
norm case (which i'll get to below) plugin.properties should have set ear.module=true 
as a default value.

Now maybe this is only from my experience but imagine these 2 cases.
You build a ear with a war and an ejb jar that both require 
commons-collections-3.0.jar. By default wouldnt you have wanted this and all other 
commons-xxx or other jars bundled in your ear to be referenced by application.xml?
On the other hand.. imagine that the war in the ear was out of your control and relied 
on commons-collections-2.1.jar. Now you have 2 commons-collections jars in your ear 
and therefore can't reference them in your application.xml.. that's fine.. set 
<ear.module>false</ear.module> on them and you will have solved the issue of this 
dependency which (at least in my experience) is the exception NOT the norm.

Michael on the original post said:
"Only few of these jars should be described in application.xml. All other jars are 
bundled just because they are required libraries and that's a convenient way to create 
a indepenent EAR which contains all resources needed to properly run the application."

Maybe I'm mis-reading this but this is not true.
A jar that is included in an ear by not referenced by the application.xml or any other 
submodule specific deployment descriptors will NOT be picked up.
---------------------------------------------------------------------
View this comment:
  
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPEAR-14&page=comments#action_17941

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPEAR-14

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPEAR-14
    Summary: ear by default inserts all bundled jars to application.xml
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven-ear-plugin
   Fix Fors:
             1.4

   Assignee: 
   Reporter: Michal Szklanowski

    Created: Mon, 9 Feb 2004 8:38 AM
    Updated: Fri, 26 Mar 2004 11:13 AM

Description:
ear:ear goal automatically places all depended jars with <ear.bundle>
set to true in application.xml which is unwanted.

Only few of these jars should be described in application.xml. All other jars are 
bundled just because they are required libraries and that's a convenient way to create 
a indepenent EAR which contains all resources needed to properly run the application.

I suggest adding one more property: <ear.appxml.include> and include only these 
resources with this property set.



---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to