Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 7140 invoked from network); 18 Mar 2009 23:06:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2009 23:06:39 -0000 Received: (qmail 22938 invoked by uid 500); 18 Mar 2009 22:38:38 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 22916 invoked by uid 500); 18 Mar 2009 22:38:38 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 22907 invoked by uid 99); 18 Mar 2009 22:38:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2009 15:38:38 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.54] (HELO smtp109.prem.mail.sp1.yahoo.com) (98.136.44.54) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 18 Mar 2009 22:38:29 +0000 Received: (qmail 66395 invoked from network); 18 Mar 2009 22:38:09 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=EC1KOaqjW8H55dKIItc3a3+lR2RvHz2+NLjnvMxxwyYC56QutQRmyPkfVFPcns971ahoyWPSJessG1loFJFzDsNqMK/psxJtYGoc8pFeEIiLE8ed76I8P208ywb3WmvvpnBLfjEu+O/tYT4bUYvmDqKVr4AIc/Sea5ugxU+wr1M= ; Received: from unknown (HELO ?10.11.55.39?) (david_jencks@76.76.148.215 with plain) by smtp109.prem.mail.sp1.yahoo.com with SMTP; 18 Mar 2009 22:38:08 -0000 X-YMail-OSG: 9TzbrX0VM1loQTKK7P_TigHKMmHL5Nlh2Q.LGPN9qRt1AS94BUNFbHcidZPe8K81YZXkRRDwRn2PD7rhflGmbidCCfTTJr8wiEnGcZMphKXjmgzoCYVyYG4lzhuluuqWXD7kkREXDC5tlM43igS25Y0dNH6hXv0QrH8Mm6hBXkxCUcrcduM6yxpH7pZ_rSRHL.SmZnmeeOHs6HIruDbFu6W1nhL.hpdgOvAMX495cTK.u0Zb0tRFXAYYx.cLoVfmY1s2DEDYEeAWAqR.pDlF X-Yahoo-Newman-Property: ymail-3 Message-Id: <4B23272D-C427-4279-8FCA-6618478732AE@yahoo.com> From: David Jencks To: user@geronimo.apache.org In-Reply-To: <22589890.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Suggestion to improve packaging of ejb-jars Date: Wed, 18 Mar 2009 15:38:07 -0700 References: <22588998.post@talk.nabble.com> <657EE0CF-DE1A-41BE-9B1A-3F7FA0AE5EA3@yahoo.com> <22589890.post@talk.nabble.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org On Mar 18, 2009, at 3:23 PM, Olaf Bergner wrote: > > Obviously, adopting the Geronimo way of explicitly declaring a > module's > dependencies as references to jars contained in Geronimo's > repository is the > most explicit way of making that module's needs known to the world. > On the > other hand, it may be argued that packaging dependencies that are only > needed by one module inside that module is still closer to the > "truth" than > throwing them all indifferently into the enclosing ear's lib > directory. I tend to agree that the classloader structure of javaee applications is not well defined and very likely it would be pretty handy to have classloader-per-module for ejb apps and rars as well as the ear classloader from the lib directory. In current geronimo, it's only going to be a notation of what you'd prefer in a more ideal world. For wars in an ear, you can indeed specify geronimo dependencies for the war alone referencing the g. repo rather than (and equivalent to) including the jars in the war's WEB-INF/lib. > > > Moreover, it is precisely my use of maven and my meticulously > managing my > dependencies that led to this suggestion. I rely on maven's dependency > management capabilities to automatically compute each module's > classpath, > leading to the scenario I described in my original post. > > Anyway: is there a maven plugin that allows me to convert my ear > into a > Geronimo plugin, using maven's knowledge about the required > dependencies to > automatically build the required environment entries? I don't entirely understand what you are asking for.... once you've built an ear or war that includes some jars, you have to do some work with the dependency plugin to take them out again. On the other hand if you assemble an ear that does not include a bunch of jars in the lib directory but the modules have maven dependencies that you need, you can use the car-maven-plugin to build the ear into a geronimo plugin that references the jars as (geronimo) dependencies. When you install the plugin, it will pull the jars into geronimo also. thanks david jencks > > > Thanks, > Olaf > > > djencks wrote: >> >> >> On Mar 18, 2009, at 2:33 PM, Olaf Bergner wrote: >> >>> >>> I have several ejb-jar packaged inside an ear. Libraries to be >>> shared between >>> some or all of these ejb-jars are placed inside the encompassing >>> ear's "lib" >>> directory, as decreed by the standard. Some libraries, however, are >>> local to >>> the using ejb-jar, i.e. they don't need to be shared. >>> >>> I tried to package these libraries inside the using ejb-jar, >>> creating >>> appropriate Class-Path entries in that ejb-jar's manifest file. >>> This, >>> however, leads to a deployment error as obviously the Class-Path >>> entries in >>> the ejb-jar's manifest file are resolved relative to the enclosing >>> ear and >>> are therefore not found. >>> >>> Suggestion: make Geronimo resolve those dependencies relative to the >>> ejb-jar >>> declaring them. Same goes for rars. >>> >>> What do you think? >> >> >> rars already have a nested structure, anything inside has to be in a >> jar. Or are you suggesting we support infinitely nested jars? >> >> In geronimo everything in all the ejb jars and rars ends up in the >> same classloader so you won't get any difference in behavior by doing >> this. >> >> I'm generally against these nested packagings. I think they were >> dreamed up in the dark ages before people realized that their >> software >> was part of the worldwide software ecosystem and that you need to >> document explicitly how your software relates to other stuff. This >> is >> the kind of problem maven tries to solve. People who still use ant >> IMO still haven't recognized that this is something they can think >> about. >> >> So, in geronimo I recommend packing as little as possible in an ear, >> instead using dependencies to include the same jars from the geronimo >> repo into the appropriate classloaders. >> >> thanks >> david jencks >> >>> >>> >>> Cheers, >>> Olaf >>> -- >>> View this message in context: >>> http://www.nabble.com/Suggestion-to-improve-packaging-of-ejb-jars-tp22588998s134p22588998.html >>> Sent from the Apache Geronimo - Users mailing list archive at >>> Nabble.com. >>> >> >> >> > > -- > View this message in context: http://www.nabble.com/Suggestion-to-improve-packaging-of-ejb-jars-tp22588998s134p22589890.html > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >