Re: LIB's in war & ear
I don't know the internals of JBoss well enough to say for sure, but I would generally expect that JBoss (like many other J2EE servers) follows the spec but then has also added code to find things that nearly fit the spec, or don't fit it at all but make sense to the person writing the classloading code etc at the time, etc. I know there was recently a discussion of a similar issue (finding TLDs) on the Glassfish Dev list which is going to result in a slight modification of their discovery process. All we can hope for is for Maven (plugins) to adhere to the specs as much as possible. Then when/if we have problems, we know its probably our App Server and can complain to the proper vendor to get it fixed, or add some extra tweaks in the Maven plugin code to work-around our specific issue for specific AS, with a configuration parameter to enable the work-around etc. :D Wayne On 10/19/06, Max Cooper <[EMAIL PROTECTED]> wrote: Bah, now I am totally confused. I am not having a problem that I need fixed, but I hope that my musings here will help Mick find the answer to his problem (and then maybe post the solution so I can use the info to improve the situation on my project :-)). The BBWM book seems to use the javaModule approach. However, it seems like javaModule may really be for deploying ejb-jars and not for deploying utility-jars. I am not sure which of the jars in the BBWM book are utility-jars vs. ejb-jars, so maybe I misread the example from the book. My project is using javaModule, but I wasn't the one that set it up and I haven't really experimented with building ears in maven2. Our project setup might be flawed, and we might just be getting lucky due to JBoss's classloader architecture. This topic of "Optional Packages" (= utility-jars) is addressed in the J2EE 1.4 spec in section J2EE.8.2. The spec will tell you precisely what your build should be producing, but it doesn't tell you how to make Maven do it (of course). In the past, I have setup Ant to create an ear with a war and ejb-jar sharing a utility-jar, and the key was to setup the Class-Path: entries in the war and ejb-jar manifests. This is in line with what the spec says. You can get the spec here: http://java.sun.com/j2ee/j2ee-1_4-fr-spec.pdf I just checked the manifest in the war file of my current project and it has no Class-Path: entries. We must just be getting lucky with the JBoss classloader. Or maybe specifying a utility-jar as a java module (in application.xml) AND using Class-Path: entries are both valid approaches. I'm just not sure. :-( -Max Wayne Fay wrote: > Hmmm... I checked my WAR and EAR poms... I am doing this: > > WAR > > log4j > log4j > 1.2.12 > compile > > > log4j > log4j > > > true > > > EAR > > log4j > log4j > 1.2.12 > compile > > > (snip) > >org.apache.maven.plugins >maven-ear-plugin > > > > true > > > > > > So perhaps that's why its working for me, without using > etc? ;-) > > Wayne > > On 10/19/06, Max Cooper <[EMAIL PROTECTED]> wrote: >> You may need to declare more stuff, see: >> http://maven.apache.org/plugins/maven-ear-plugin/howto.html >> >> Specifically, I think you need to declare your common.jar as a >> javaModule with includeInApplicationXml=true in your ear/pom.xml: >> >> >> >> >> org.apache.maven.plugins >> maven-ear-plugin >> >>[...] >> >> >>org.delta.npi.common >>common-jar >>true >> >> >> >> >> >> >> >> -Max >> >> Mick Knutson wrote: >> > Well, this does not seem to work the way I invision it. >> > >> > I have the following: >> > >> > pom.xml >> > -->common/pom.xml >> > -->ear/pom.xml >> > -->war/pom.xml >> > >> > >> > I declared my dependancies in my master pom, then added a provided >> scope in >> > my ear: >> > >> >org.delta.npi.common >> >common-jar >> >compile >> > >> > >> > >> > and in my war: >> > >> > >> >org.delta.npi.common >> >common-jar >> >provided >> > >> > >> > The common-jar _is_ in my ear, but the deployment fails as it can't >> seem to >> > access a class in common-jar >> > >> > >> > >> > >> > >> > >> > >> > >> > On 10/11/06, Max Cooper <[EMAIL PROTECTED]> wrote: >> >> >> >> Scope is subject to inheritance as well. >> >> >> >> Deciding where to put it is a judgment call. >> >> >> >> In the context of your whole project, I wouldn't consider a jar that >> >> goes in the ear to be "provided". I would only consider it to be >> >> "provided" in the context of the war module. So, I would set the scope >> >> in the child pom. And the version in the dependencyManagement >> section of >> >> the parent pom
Re: LIB's in war & ear
Bah, now I am totally confused. I am not having a problem that I need fixed, but I hope that my musings here will help Mick find the answer to his problem (and then maybe post the solution so I can use the info to improve the situation on my project :-)). The BBWM book seems to use the javaModule approach. However, it seems like javaModule may really be for deploying ejb-jars and not for deploying utility-jars. I am not sure which of the jars in the BBWM book are utility-jars vs. ejb-jars, so maybe I misread the example from the book. My project is using javaModule, but I wasn't the one that set it up and I haven't really experimented with building ears in maven2. Our project setup might be flawed, and we might just be getting lucky due to JBoss's classloader architecture. This topic of "Optional Packages" (= utility-jars) is addressed in the J2EE 1.4 spec in section J2EE.8.2. The spec will tell you precisely what your build should be producing, but it doesn't tell you how to make Maven do it (of course). In the past, I have setup Ant to create an ear with a war and ejb-jar sharing a utility-jar, and the key was to setup the Class-Path: entries in the war and ejb-jar manifests. This is in line with what the spec says. You can get the spec here: http://java.sun.com/j2ee/j2ee-1_4-fr-spec.pdf I just checked the manifest in the war file of my current project and it has no Class-Path: entries. We must just be getting lucky with the JBoss classloader. Or maybe specifying a utility-jar as a java module (in application.xml) AND using Class-Path: entries are both valid approaches. I'm just not sure. :-( -Max Wayne Fay wrote: Hmmm... I checked my WAR and EAR poms... I am doing this: WAR log4j log4j 1.2.12 compile log4j log4j true EAR log4j log4j 1.2.12 compile (snip) org.apache.maven.plugins maven-ear-plugin true So perhaps that's why its working for me, without using etc? ;-) Wayne On 10/19/06, Max Cooper <[EMAIL PROTECTED]> wrote: You may need to declare more stuff, see: http://maven.apache.org/plugins/maven-ear-plugin/howto.html Specifically, I think you need to declare your common.jar as a javaModule with includeInApplicationXml=true in your ear/pom.xml: org.apache.maven.plugins maven-ear-plugin [...] org.delta.npi.common common-jar true -Max Mick Knutson wrote: > Well, this does not seem to work the way I invision it. > > I have the following: > > pom.xml > -->common/pom.xml > -->ear/pom.xml > -->war/pom.xml > > > I declared my dependancies in my master pom, then added a provided scope in > my ear: > >org.delta.npi.common >common-jar >compile > > > > and in my war: > > >org.delta.npi.common >common-jar >provided > > > The common-jar _is_ in my ear, but the deployment fails as it can't seem to > access a class in common-jar > > > > > > > > > On 10/11/06, Max Cooper <[EMAIL PROTECTED]> wrote: >> >> Scope is subject to inheritance as well. >> >> Deciding where to put it is a judgment call. >> >> In the context of your whole project, I wouldn't consider a jar that >> goes in the ear to be "provided". I would only consider it to be >> "provided" in the context of the war module. So, I would set the scope >> in the child pom. And the version in the dependencyManagement section of >> the parent pom. >> >> -Max >> >> Wayne Fay wrote: >> > I'd imagine you could omit both, but I'm not currently doing that. >> > Version I'm sure would flow through, and I'd expect scope would as >> > well. >> > >> > Wayne >> > >> > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> >> Can I omit the version and scope as they are already defined in the >> >> master >> >> pom.xml in DependancyManagement? Or did that not work? >> >> >> >> >> >> >> >> >> >> On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: >> >> > >> >> > Sure, here's my war and ear pom (not all of them, but some of the >> >> > dependencies)... >> >> > >> >> > war/pom.xml >> >> > >> >> > geronimo-spec >> >> > geronimo-spec-jms >> >> > 1.1-rc4 >> >> > provided >> >> > >> >> > >> >> > geronimo-spec >> >> > geronimo-spec-ejb >> >> > 2.1-rc4 >> >> > provided >> >> > >> >> > >> >> > javax.servlet >> >> > servlet-api >> >> > 2.3 >> >> > provided >> >> > >> >> > >> >> > taglibs >> >> > standard >> >> > 1.1.2 >> >> > compile >> >> > >> >> > >> >> > taglibs >> >> > standard >> >> > >> >
Re: LIB's in war & ear
Hmmm... I checked my WAR and EAR poms... I am doing this: WAR log4j log4j 1.2.12 compile log4j log4j true EAR log4j log4j 1.2.12 compile (snip) org.apache.maven.plugins maven-ear-plugin true So perhaps that's why its working for me, without using etc? ;-) Wayne On 10/19/06, Max Cooper <[EMAIL PROTECTED]> wrote: You may need to declare more stuff, see: http://maven.apache.org/plugins/maven-ear-plugin/howto.html Specifically, I think you need to declare your common.jar as a javaModule with includeInApplicationXml=true in your ear/pom.xml: org.apache.maven.plugins maven-ear-plugin [...] org.delta.npi.common common-jar true -Max Mick Knutson wrote: > Well, this does not seem to work the way I invision it. > > I have the following: > > pom.xml > -->common/pom.xml > -->ear/pom.xml > -->war/pom.xml > > > I declared my dependancies in my master pom, then added a provided scope in > my ear: > >org.delta.npi.common >common-jar >compile > > > > and in my war: > > >org.delta.npi.common >common-jar >provided > > > The common-jar _is_ in my ear, but the deployment fails as it can't seem to > access a class in common-jar > > > > > > > > > On 10/11/06, Max Cooper <[EMAIL PROTECTED]> wrote: >> >> Scope is subject to inheritance as well. >> >> Deciding where to put it is a judgment call. >> >> In the context of your whole project, I wouldn't consider a jar that >> goes in the ear to be "provided". I would only consider it to be >> "provided" in the context of the war module. So, I would set the scope >> in the child pom. And the version in the dependencyManagement section of >> the parent pom. >> >> -Max >> >> Wayne Fay wrote: >> > I'd imagine you could omit both, but I'm not currently doing that. >> > Version I'm sure would flow through, and I'd expect scope would as >> > well. >> > >> > Wayne >> > >> > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> >> Can I omit the version and scope as they are already defined in the >> >> master >> >> pom.xml in DependancyManagement? Or did that not work? >> >> >> >> >> >> >> >> >> >> On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: >> >> > >> >> > Sure, here's my war and ear pom (not all of them, but some of the >> >> > dependencies)... >> >> > >> >> > war/pom.xml >> >> > >> >> > geronimo-spec >> >> > geronimo-spec-jms >> >> > 1.1-rc4 >> >> > provided >> >> > >> >> > >> >> > geronimo-spec >> >> > geronimo-spec-ejb >> >> > 2.1-rc4 >> >> > provided >> >> > >> >> > >> >> > javax.servlet >> >> > servlet-api >> >> > 2.3 >> >> > provided >> >> > >> >> > >> >> > taglibs >> >> > standard >> >> > 1.1.2 >> >> > compile >> >> > >> >> > >> >> > taglibs >> >> > standard >> >> > >> >> > >> >> > true >> >> > >> >> > >> >> > javax.servlet >> >> > jstl >> >> > 1.1.2 >> >> > compile >> >> > >> >> > >> >> > javax.servlet >> >> > jstl >> >> > >> >> > >> >> > true >> >> > >> >> > >> >> > log4j >> >> > log4j >> >> > 1.2.12 >> >> > compile >> >> > >> >> > >> >> > log4j >> >> > log4j >> >> > >> >> > >> >> > true >> >> > >> >> > >> >> > quartz >> >> > quartz >> >> > 1.5.1 >> >> > compile >> >> > >> >> > >> >> > quartz >> >> > quartz >> >> > >> >> > >> >> > true >> >> > >> >> > >> >> > >> >> > ear/pom.xml >> >> > >> >> > geronimo-spec >> >> > geronimo-spec-jms >> >> > 1.1-rc4 >> >> > provided >> >> > >> >> > >> >> > geronimo-spec >> >> > geronimo-spec-ejb >> >> > 2.1-rc4 >> >> > provided >> >> > >> >> > >> >> > javax.servlet >> >> > servlet-api >> >> > 2.3 >> >> > provided >> >> > >> >> > >> >> > taglibs >> >> > standard >> >> > 1.1.2 >> >> > compile >> >> > >> >> > >> >> > javax.servlet >> >> > jstl >> >> > 1.1.2 >> >> > compile >> >> > >> >> > >> >> > log4j >> >> > log4j >> >> > 1.2.12 >> >> > compile >> >> > >> >> > >> >> > quartz >> >> > quartz >> >> > 1.5.1 >> >> > compile >> >> > >> >> > >> >> > >> >> > HTH. >> >> >
Re: LIB's in war & ear
You may need to declare more stuff, see: http://maven.apache.org/plugins/maven-ear-plugin/howto.html Specifically, I think you need to declare your common.jar as a javaModule with includeInApplicationXml=true in your ear/pom.xml: org.apache.maven.plugins maven-ear-plugin [...] org.delta.npi.common common-jar true -Max Mick Knutson wrote: Well, this does not seem to work the way I invision it. I have the following: pom.xml -->common/pom.xml -->ear/pom.xml -->war/pom.xml I declared my dependancies in my master pom, then added a provided scope in my ear: org.delta.npi.common common-jar compile and in my war: org.delta.npi.common common-jar provided The common-jar _is_ in my ear, but the deployment fails as it can't seem to access a class in common-jar On 10/11/06, Max Cooper <[EMAIL PROTECTED]> wrote: Scope is subject to inheritance as well. Deciding where to put it is a judgment call. In the context of your whole project, I wouldn't consider a jar that goes in the ear to be "provided". I would only consider it to be "provided" in the context of the war module. So, I would set the scope in the child pom. And the version in the dependencyManagement section of the parent pom. -Max Wayne Fay wrote: > I'd imagine you could omit both, but I'm not currently doing that. > Version I'm sure would flow through, and I'd expect scope would as > well. > > Wayne > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> Can I omit the version and scope as they are already defined in the >> master >> pom.xml in DependancyManagement? Or did that not work? >> >> >> >> >> On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: >> > >> > Sure, here's my war and ear pom (not all of them, but some of the >> > dependencies)... >> > >> > war/pom.xml >> > >> > geronimo-spec >> > geronimo-spec-jms >> > 1.1-rc4 >> > provided >> > >> > >> > geronimo-spec >> > geronimo-spec-ejb >> > 2.1-rc4 >> > provided >> > >> > >> > javax.servlet >> > servlet-api >> > 2.3 >> > provided >> > >> > >> > taglibs >> > standard >> > 1.1.2 >> > compile >> > >> > >> > taglibs >> > standard >> > >> > >> > true >> > >> > >> > javax.servlet >> > jstl >> > 1.1.2 >> > compile >> > >> > >> > javax.servlet >> > jstl >> > >> > >> > true >> > >> > >> > log4j >> > log4j >> > 1.2.12 >> > compile >> > >> > >> > log4j >> > log4j >> > >> > >> > true >> > >> > >> > quartz >> > quartz >> > 1.5.1 >> > compile >> > >> > >> > quartz >> > quartz >> > >> > >> > true >> > >> > >> > >> > ear/pom.xml >> > >> > geronimo-spec >> > geronimo-spec-jms >> > 1.1-rc4 >> > provided >> > >> > >> > geronimo-spec >> > geronimo-spec-ejb >> > 2.1-rc4 >> > provided >> > >> > >> > javax.servlet >> > servlet-api >> > 2.3 >> > provided >> > >> > >> > taglibs >> > standard >> > 1.1.2 >> > compile >> > >> > >> > javax.servlet >> > jstl >> > 1.1.2 >> > compile >> > >> > >> > log4j >> > log4j >> > 1.2.12 >> > compile >> > >> > >> > quartz >> > quartz >> > 1.5.1 >> > compile >> > >> > >> > >> > HTH. >> > Wayne >> > >> > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> > > Can I see your war pom.xml to see how you excluded everything? >> > > >> > > >> > > >> > > On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: >> > > > >> > > > I generally only allow my JARs to be placed in my EAR lib to reduce >> > > > the overall size of my EAR and eliminate duplication of code (I'm >> > > > using Oracle OAS 10.1.2 right now). But you'll need to check your >> > > > container's documentation and perhaps the J2EE Specs to see what >> works >> > > > for you. >> > > > >> > > > Currently this requires me to declare and then simultaneously >> exclude >> > > > most every dependency in my WAR pom, and also declare them in >> the EAR. >> > > > So not a lot of fun from a "managing your poms" perspective. >> > > > >> > > > Wayne >> > > > >> > > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> > > > > I have many LIB's that are in both my war and my ear. Is this >> > correct or >> > > > > should they just be in the ear? >> > > >
Re: LIB's in war & ear
This is "correct" per the J2EE spec (from what I've read) and its how I'm currently doing things. It might be that your container is not fully J2EE compliant, or does not handle this packaging properly? What app server are you using, and what version etc? Wayne On 10/19/06, Mick Knutson <[EMAIL PROTECTED]> wrote: Well, this does not seem to work the way I invision it. I have the following: pom.xml -->common/pom.xml -->ear/pom.xml -->war/pom.xml I declared my dependancies in my master pom, then added a provided scope in my ear: org.delta.npi.common common-jar compile and in my war: org.delta.npi.common common-jar provided The common-jar _is_ in my ear, but the deployment fails as it can't seem to access a class in common-jar On 10/11/06, Max Cooper <[EMAIL PROTECTED]> wrote: > > Scope is subject to inheritance as well. > > Deciding where to put it is a judgment call. > > In the context of your whole project, I wouldn't consider a jar that > goes in the ear to be "provided". I would only consider it to be > "provided" in the context of the war module. So, I would set the scope > in the child pom. And the version in the dependencyManagement section of > the parent pom. > > -Max > > Wayne Fay wrote: > > I'd imagine you could omit both, but I'm not currently doing that. > > Version I'm sure would flow through, and I'd expect scope would as > > well. > > > > Wayne > > > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > >> Can I omit the version and scope as they are already defined in the > >> master > >> pom.xml in DependancyManagement? Or did that not work? > >> > >> > >> > >> > >> On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > >> > > >> > Sure, here's my war and ear pom (not all of them, but some of the > >> > dependencies)... > >> > > >> > war/pom.xml > >> > > >> > geronimo-spec > >> > geronimo-spec-jms > >> > 1.1-rc4 > >> > provided > >> > > >> > > >> > geronimo-spec > >> > geronimo-spec-ejb > >> > 2.1-rc4 > >> > provided > >> > > >> > > >> > javax.servlet > >> > servlet-api > >> > 2.3 > >> > provided > >> > > >> > > >> > taglibs > >> > standard > >> > 1.1.2 > >> > compile > >> > > >> > > >> > taglibs > >> > standard > >> > > >> > > >> > true > >> > > >> > > >> > javax.servlet > >> > jstl > >> > 1.1.2 > >> > compile > >> > > >> > > >> > javax.servlet > >> > jstl > >> > > >> > > >> > true > >> > > >> > > >> > log4j > >> > log4j > >> > 1.2.12 > >> > compile > >> > > >> > > >> > log4j > >> > log4j > >> > > >> > > >> > true > >> > > >> > > >> > quartz > >> > quartz > >> > 1.5.1 > >> > compile > >> > > >> > > >> > quartz > >> > quartz > >> > > >> > > >> > true > >> > > >> > > >> > > >> > ear/pom.xml > >> > > >> > geronimo-spec > >> > geronimo-spec-jms > >> > 1.1-rc4 > >> > provided > >> > > >> > > >> > geronimo-spec > >> > geronimo-spec-ejb > >> > 2.1-rc4 > >> > provided > >> > > >> > > >> > javax.servlet > >> > servlet-api > >> > 2.3 > >> > provided > >> > > >> > > >> > taglibs > >> > standard > >> > 1.1.2 > >> > compile > >> > > >> > > >> > javax.servlet > >> > jstl > >> > 1.1.2 > >> > compile > >> > > >> > > >> > log4j > >> > log4j > >> > 1.2.12 > >> > compile > >> > > >> > > >> > quartz > >> > quartz > >> > 1.5.1 > >> > compile > >> > > >> > > >> > > >> > HTH. > >> > Wayne > >> > > >> > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > >> > > Can I see your war pom.xml to see how you excluded everything? > >> > > > >> > > > >> > > > >> > > On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > >> > > > > >> > > > I generally only allow my JARs to be placed in my EAR lib to > reduce > >> > > > the overall size of my EAR and eliminate duplication of code (I'm > >> > > > using Oracle OAS 10.1.2 right now). But you'll need to check your > >> > > > container's documentation and perhaps the J2EE Specs to see what > >> works > >> > > > for you. > >> > > > > >> > > > Currently this requires me to declare and then simultaneously > >> exclude > >> > > > most every dependency in my WAR pom, and also declare them in > >> the EAR. > >> > > > So not a lot of fun from a "managing your poms" perspective. > >> > > > > >> > > > Wayne > >> > > > > >> > > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]>
Re: LIB's in war & ear
Well, this does not seem to work the way I invision it. I have the following: pom.xml -->common/pom.xml -->ear/pom.xml -->war/pom.xml I declared my dependancies in my master pom, then added a provided scope in my ear: org.delta.npi.common common-jar compile and in my war: org.delta.npi.common common-jar provided The common-jar _is_ in my ear, but the deployment fails as it can't seem to access a class in common-jar On 10/11/06, Max Cooper <[EMAIL PROTECTED]> wrote: Scope is subject to inheritance as well. Deciding where to put it is a judgment call. In the context of your whole project, I wouldn't consider a jar that goes in the ear to be "provided". I would only consider it to be "provided" in the context of the war module. So, I would set the scope in the child pom. And the version in the dependencyManagement section of the parent pom. -Max Wayne Fay wrote: > I'd imagine you could omit both, but I'm not currently doing that. > Version I'm sure would flow through, and I'd expect scope would as > well. > > Wayne > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> Can I omit the version and scope as they are already defined in the >> master >> pom.xml in DependancyManagement? Or did that not work? >> >> >> >> >> On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: >> > >> > Sure, here's my war and ear pom (not all of them, but some of the >> > dependencies)... >> > >> > war/pom.xml >> > >> > geronimo-spec >> > geronimo-spec-jms >> > 1.1-rc4 >> > provided >> > >> > >> > geronimo-spec >> > geronimo-spec-ejb >> > 2.1-rc4 >> > provided >> > >> > >> > javax.servlet >> > servlet-api >> > 2.3 >> > provided >> > >> > >> > taglibs >> > standard >> > 1.1.2 >> > compile >> > >> > >> > taglibs >> > standard >> > >> > >> > true >> > >> > >> > javax.servlet >> > jstl >> > 1.1.2 >> > compile >> > >> > >> > javax.servlet >> > jstl >> > >> > >> > true >> > >> > >> > log4j >> > log4j >> > 1.2.12 >> > compile >> > >> > >> > log4j >> > log4j >> > >> > >> > true >> > >> > >> > quartz >> > quartz >> > 1.5.1 >> > compile >> > >> > >> > quartz >> > quartz >> > >> > >> > true >> > >> > >> > >> > ear/pom.xml >> > >> > geronimo-spec >> > geronimo-spec-jms >> > 1.1-rc4 >> > provided >> > >> > >> > geronimo-spec >> > geronimo-spec-ejb >> > 2.1-rc4 >> > provided >> > >> > >> > javax.servlet >> > servlet-api >> > 2.3 >> > provided >> > >> > >> > taglibs >> > standard >> > 1.1.2 >> > compile >> > >> > >> > javax.servlet >> > jstl >> > 1.1.2 >> > compile >> > >> > >> > log4j >> > log4j >> > 1.2.12 >> > compile >> > >> > >> > quartz >> > quartz >> > 1.5.1 >> > compile >> > >> > >> > >> > HTH. >> > Wayne >> > >> > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> > > Can I see your war pom.xml to see how you excluded everything? >> > > >> > > >> > > >> > > On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: >> > > > >> > > > I generally only allow my JARs to be placed in my EAR lib to reduce >> > > > the overall size of my EAR and eliminate duplication of code (I'm >> > > > using Oracle OAS 10.1.2 right now). But you'll need to check your >> > > > container's documentation and perhaps the J2EE Specs to see what >> works >> > > > for you. >> > > > >> > > > Currently this requires me to declare and then simultaneously >> exclude >> > > > most every dependency in my WAR pom, and also declare them in >> the EAR. >> > > > So not a lot of fun from a "managing your poms" perspective. >> > > > >> > > > Wayne >> > > > >> > > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: >> > > > > I have many LIB's that are in both my war and my ear. Is this >> > correct or >> > > > > should they just be in the ear? >> > > > > >> > > > > -- >> > > > > >> > > > > Thanks >> > > > > >> > > > > DJ MICK >> > > > > http://www.djmick.com >> > > > > http://www.myspace.com/mickknutson >> > > > > >> > > > > >> > > > >> > > > >> - >> > > > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > > > For additional commands, e-mail: [EMAIL PROTECTED] >> > > > >> > > > >> > > >> > > >> > > -- >> > > >> > > Thanks >> > > >> > > DJ MICK >> > > http://www.djmick.com >> > > http://www.myspace.com
Re: LIB's in war & ear
Scope is subject to inheritance as well. Deciding where to put it is a judgment call. In the context of your whole project, I wouldn't consider a jar that goes in the ear to be "provided". I would only consider it to be "provided" in the context of the war module. So, I would set the scope in the child pom. And the version in the dependencyManagement section of the parent pom. -Max Wayne Fay wrote: I'd imagine you could omit both, but I'm not currently doing that. Version I'm sure would flow through, and I'd expect scope would as well. Wayne On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: Can I omit the version and scope as they are already defined in the master pom.xml in DependancyManagement? Or did that not work? On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > Sure, here's my war and ear pom (not all of them, but some of the > dependencies)... > > war/pom.xml > > geronimo-spec > geronimo-spec-jms > 1.1-rc4 > provided > > > geronimo-spec > geronimo-spec-ejb > 2.1-rc4 > provided > > > javax.servlet > servlet-api > 2.3 > provided > > > taglibs > standard > 1.1.2 > compile > > > taglibs > standard > > > true > > > javax.servlet > jstl > 1.1.2 > compile > > > javax.servlet > jstl > > > true > > > log4j > log4j > 1.2.12 > compile > > > log4j > log4j > > > true > > > quartz > quartz > 1.5.1 > compile > > > quartz > quartz > > > true > > > > ear/pom.xml > > geronimo-spec > geronimo-spec-jms > 1.1-rc4 > provided > > > geronimo-spec > geronimo-spec-ejb > 2.1-rc4 > provided > > > javax.servlet > servlet-api > 2.3 > provided > > > taglibs > standard > 1.1.2 > compile > > > javax.servlet > jstl > 1.1.2 > compile > > > log4j > log4j > 1.2.12 > compile > > > quartz > quartz > 1.5.1 > compile > > > > HTH. > Wayne > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > > Can I see your war pom.xml to see how you excluded everything? > > > > > > > > On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > I generally only allow my JARs to be placed in my EAR lib to reduce > > > the overall size of my EAR and eliminate duplication of code (I'm > > > using Oracle OAS 10.1.2 right now). But you'll need to check your > > > container's documentation and perhaps the J2EE Specs to see what works > > > for you. > > > > > > Currently this requires me to declare and then simultaneously exclude > > > most every dependency in my WAR pom, and also declare them in the EAR. > > > So not a lot of fun from a "managing your poms" perspective. > > > > > > Wayne > > > > > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > > > > I have many LIB's that are in both my war and my ear. Is this > correct or > > > > should they just be in the ear? > > > > > > > > -- > > > > > > > > Thanks > > > > > > > > DJ MICK > > > > http://www.djmick.com > > > > http://www.myspace.com/mickknutson > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > > > Thanks > > > > DJ MICK > > http://www.djmick.com > > http://www.myspace.com/mickknutson > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LIB's in war & ear
I'd imagine you could omit both, but I'm not currently doing that. Version I'm sure would flow through, and I'd expect scope would as well. Wayne On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: Can I omit the version and scope as they are already defined in the master pom.xml in DependancyManagement? Or did that not work? On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > Sure, here's my war and ear pom (not all of them, but some of the > dependencies)... > > war/pom.xml > > geronimo-spec > geronimo-spec-jms > 1.1-rc4 > provided > > > geronimo-spec > geronimo-spec-ejb > 2.1-rc4 > provided > > > javax.servlet > servlet-api > 2.3 > provided > > > taglibs > standard > 1.1.2 > compile > > > taglibs > standard > > > true > > > javax.servlet > jstl > 1.1.2 > compile > > > javax.servlet > jstl > > > true > > > log4j > log4j > 1.2.12 > compile > > > log4j > log4j > > > true > > > quartz > quartz > 1.5.1 > compile > > > quartz > quartz > > > true > > > > ear/pom.xml > > geronimo-spec > geronimo-spec-jms > 1.1-rc4 > provided > > > geronimo-spec > geronimo-spec-ejb > 2.1-rc4 > provided > > > javax.servlet > servlet-api > 2.3 > provided > > > taglibs > standard > 1.1.2 > compile > > > javax.servlet > jstl > 1.1.2 > compile > > > log4j > log4j > 1.2.12 > compile > > > quartz > quartz > 1.5.1 > compile > > > > HTH. > Wayne > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > > Can I see your war pom.xml to see how you excluded everything? > > > > > > > > On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > I generally only allow my JARs to be placed in my EAR lib to reduce > > > the overall size of my EAR and eliminate duplication of code (I'm > > > using Oracle OAS 10.1.2 right now). But you'll need to check your > > > container's documentation and perhaps the J2EE Specs to see what works > > > for you. > > > > > > Currently this requires me to declare and then simultaneously exclude > > > most every dependency in my WAR pom, and also declare them in the EAR. > > > So not a lot of fun from a "managing your poms" perspective. > > > > > > Wayne > > > > > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > > > > I have many LIB's that are in both my war and my ear. Is this > correct or > > > > should they just be in the ear? > > > > > > > > -- > > > > > > > > Thanks > > > > > > > > DJ MICK > > > > http://www.djmick.com > > > > http://www.myspace.com/mickknutson > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > > > Thanks > > > > DJ MICK > > http://www.djmick.com > > http://www.myspace.com/mickknutson > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LIB's in war & ear
Can I omit the version and scope as they are already defined in the master pom.xml in DependancyManagement? Or did that not work? On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: Sure, here's my war and ear pom (not all of them, but some of the dependencies)... war/pom.xml geronimo-spec geronimo-spec-jms 1.1-rc4 provided geronimo-spec geronimo-spec-ejb 2.1-rc4 provided javax.servlet servlet-api 2.3 provided taglibs standard 1.1.2 compile taglibs standard true javax.servlet jstl 1.1.2 compile javax.servlet jstl true log4j log4j 1.2.12 compile log4j log4j true quartz quartz 1.5.1 compile quartz quartz true ear/pom.xml geronimo-spec geronimo-spec-jms 1.1-rc4 provided geronimo-spec geronimo-spec-ejb 2.1-rc4 provided javax.servlet servlet-api 2.3 provided taglibs standard 1.1.2 compile javax.servlet jstl 1.1.2 compile log4j log4j 1.2.12 compile quartz quartz 1.5.1 compile HTH. Wayne On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > Can I see your war pom.xml to see how you excluded everything? > > > > On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > I generally only allow my JARs to be placed in my EAR lib to reduce > > the overall size of my EAR and eliminate duplication of code (I'm > > using Oracle OAS 10.1.2 right now). But you'll need to check your > > container's documentation and perhaps the J2EE Specs to see what works > > for you. > > > > Currently this requires me to declare and then simultaneously exclude > > most every dependency in my WAR pom, and also declare them in the EAR. > > So not a lot of fun from a "managing your poms" perspective. > > > > Wayne > > > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > > > I have many LIB's that are in both my war and my ear. Is this correct or > > > should they just be in the ear? > > > > > > -- > > > > > > Thanks > > > > > > DJ MICK > > > http://www.djmick.com > > > http://www.myspace.com/mickknutson > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > Thanks > > DJ MICK > http://www.djmick.com > http://www.myspace.com/mickknutson > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
Re: LIB's in war & ear
Sure, here's my war and ear pom (not all of them, but some of the dependencies)... war/pom.xml geronimo-spec geronimo-spec-jms 1.1-rc4 provided geronimo-spec geronimo-spec-ejb 2.1-rc4 provided javax.servlet servlet-api 2.3 provided taglibs standard 1.1.2 compile taglibs standard true javax.servlet jstl 1.1.2 compile javax.servlet jstl true log4j log4j 1.2.12 compile log4j log4j true quartz quartz 1.5.1 compile quartz quartz true ear/pom.xml geronimo-spec geronimo-spec-jms 1.1-rc4 provided geronimo-spec geronimo-spec-ejb 2.1-rc4 provided javax.servlet servlet-api 2.3 provided taglibs standard 1.1.2 compile javax.servlet jstl 1.1.2 compile log4j log4j 1.2.12 compile quartz quartz 1.5.1 compile HTH. Wayne On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: Can I see your war pom.xml to see how you excluded everything? On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > I generally only allow my JARs to be placed in my EAR lib to reduce > the overall size of my EAR and eliminate duplication of code (I'm > using Oracle OAS 10.1.2 right now). But you'll need to check your > container's documentation and perhaps the J2EE Specs to see what works > for you. > > Currently this requires me to declare and then simultaneously exclude > most every dependency in my WAR pom, and also declare them in the EAR. > So not a lot of fun from a "managing your poms" perspective. > > Wayne > > On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > > I have many LIB's that are in both my war and my ear. Is this correct or > > should they just be in the ear? > > > > -- > > > > Thanks > > > > DJ MICK > > http://www.djmick.com > > http://www.myspace.com/mickknutson > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LIB's in war & ear
Can I see your war pom.xml to see how you excluded everything? On 10/11/06, Wayne Fay <[EMAIL PROTECTED]> wrote: I generally only allow my JARs to be placed in my EAR lib to reduce the overall size of my EAR and eliminate duplication of code (I'm using Oracle OAS 10.1.2 right now). But you'll need to check your container's documentation and perhaps the J2EE Specs to see what works for you. Currently this requires me to declare and then simultaneously exclude most every dependency in my WAR pom, and also declare them in the EAR. So not a lot of fun from a "managing your poms" perspective. Wayne On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: > I have many LIB's that are in both my war and my ear. Is this correct or > should they just be in the ear? > > -- > > Thanks > > DJ MICK > http://www.djmick.com > http://www.myspace.com/mickknutson > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson
Re: LIB's in war & ear
I generally only allow my JARs to be placed in my EAR lib to reduce the overall size of my EAR and eliminate duplication of code (I'm using Oracle OAS 10.1.2 right now). But you'll need to check your container's documentation and perhaps the J2EE Specs to see what works for you. Currently this requires me to declare and then simultaneously exclude most every dependency in my WAR pom, and also declare them in the EAR. So not a lot of fun from a "managing your poms" perspective. Wayne On 10/11/06, Mick Knutson <[EMAIL PROTECTED]> wrote: I have many LIB's that are in both my war and my ear. Is this correct or should they just be in the ear? -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LIB's in war & ear
I have many LIB's that are in both my war and my ear. Is this correct or should they just be in the ear? -- Thanks DJ MICK http://www.djmick.com http://www.myspace.com/mickknutson