Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 12750 invoked from network); 19 Mar 2009 16:49:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2009 16:49:21 -0000 Received: (qmail 62603 invoked by uid 500); 19 Mar 2009 16:49:19 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 62412 invoked by uid 500); 19 Mar 2009 16:49:19 -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 62403 invoked by uid 99); 19 Mar 2009 16:49:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 09:49:19 -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.57] (HELO smtp102.prem.mail.sp1.yahoo.com) (98.136.44.57) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 19 Mar 2009 16:49:10 +0000 Received: (qmail 21659 invoked from network); 19 Mar 2009 16:48:49 -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=ATO0+Dvul3IiQuKGXIMNIleQhSeJhj9FrXRKJWmsTOuIZxni6RxmtgkFfoTnkv37/iPxAazsUrTN3UtQEfZYfF7Nk/VF5dNwDyHmLmRQcSUzgNFSGhwdAE3jK7mrLXXMt1qAQP4InmFp8Z4pvC3ifc+XF6sL+38jUE7IVM9RoRI= ; Received: from unknown (HELO ?10.11.55.39?) (david_jencks@76.76.148.215 with plain) by smtp102.prem.mail.sp1.yahoo.com with SMTP; 19 Mar 2009 16:48:48 -0000 X-YMail-OSG: sgzo40AVM1n6nmHPGntsxvT8UDU.9Daq8.yA5eEbMidmZe9rvhklhh2Am_X6VmYwmHQZBvbR_lkTpqdiIuGOf3UiDYF10seUDURNq1aQD_aX2_DhhTkqVVvbPucZ.tYoquTSrunhSUoJMvKKYLP2yLHudgYjDm2eYPjzGkbQXFU4mt28qwTV1T7AB1dUYC2hwvXV6p1HtT_nd0EvEoR2.wrHD7EN2lbw.Y2jJEsmaxrWM0xWHIPP.v3MPXe.40ffljNCZ54FHou5smuTeL.O7wUP2oUNOt169upieM9JWvyw73GNtA-- X-Yahoo-Newman-Property: ymail-3 Message-Id: <6C36DF1D-D1FF-47B0-B47D-AB0B0157BFCD@yahoo.com> From: David Jencks To: user@geronimo.apache.org In-Reply-To: <22603235.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: Thu, 19 Mar 2009 09:48:47 -0700 References: <22588998.post@talk.nabble.com> <657EE0CF-DE1A-41BE-9B1A-3F7FA0AE5EA3@yahoo.com> <22589890.post@talk.nabble.com> <4B23272D-C427-4279-8FCA-6618478732AE@yahoo.com> <22603235.post@talk.nabble.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org On Mar 19, 2009, at 9:27 AM, Olaf Bergner wrote: > > Thanks for your pointer, I will have a closer look at the maven-car- > plugin. > Last time I checked, however, I had to write the list of required > dependencies by hand, a task that should be offloaded to maven/the > maven-car-plugin, IMO. > Using plugins is much easier in trunk.... there we do (by default) follow maven transitive dependencies, and track if they've changed with src/history/dependency.xml files, and we also have the framework plugin group which makes assembling a server very easy. I wish we could get 2.2 out really soon. :-((((((( > As to your question: it is true that my solution for building an ear > is not > totally automatic, i.e. I have to decide up front which dependencies > are to > be shared between all modules. By putting those into a separate pom, > however, and referencing that pom in scope "provided" from all jee > modules, > in scope "runtime" from my ear module maven more or less automatically > produces a correctly packaged ear. I don't think I've fought with this recently :-) I have some recollection that some of the maven plugins could use some more configuration about whether they package jars into the ear/war/rar automatically depending on the dependency scope. For geronimo I think we'd like a flag that would let the dependencies be "normal scope" so geronimo would see them but maven would not include them in the ee artifact. I think I saw that there were some changes recently but I don't know if this is supported yet. Anyway your ear-building seems like it will work. How important do you see separate classloaders for each ejb jar and rar? Do you expect any actual problems from a shared classloader or does it just seem inelegant? thanks david jencks > > > Thx, > Olaf > > > djencks wrote: >> >> >> 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. >>> >> >> >> > > -- > View this message in context: http://www.nabble.com/Suggestion-to-improve-packaging-of-ejb-jars-tp22588998s134p22603235.html > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >