You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mike Darretta <mi...@metnet.navy.mil> on 2006/02/17 19:46:41 UTC
Ejb Package
When I build my EJB module, the dependent jars are not included with the
EJB jar. The research I've done seems to indicate that this is the
behaviour of maven-ejb-plugin.
Is there a way to include my dependency jars with my EJB jar, which in
turn will be included in my ear file?
Thanks for your help.
Mike
Re: Ejb Package
Posted by Lee Meador <le...@leemeador.com>.
I'm using Websphere and other application servers may do it differently but
I find that when I look at the way the classloaders nest you can see that
there are all the regular classloaders for Websphere's classpath and such
and then
ejb classloader (for all ejb jars)
+ war classloader for war1
+ war classloader for war2
Since I have the jars that reside in the ear referenced in the ejb jars'
manifests, those jars are all loaded in the ejb classloader and are
available to both wars.
If the jars were in the ejb jars, it would be exactly the same classloading
situation.
The only interesting thing to put in a war is a jar that is only referenced
by code in that war, not in any ejb and not in any other war. (I have such a
case.)
Due to the bugs with the <excludes> tag, I just put the jar that the war
needs in the ear and reference it from the ejb (which doesn't really need
it) and that makes it available to the war.
(Oh .. the bug ... you can put one and only one file to be excluded. If you
put more than one, it doesn't work. If you put <excludes><exclude> it
doesn't work.)
-- Lee
On 2/20/06, Lee Meador <le...@leemeador.com> wrote:
>
> You can exclude the jars with
>
> <excludes>**/*.jar</excludes>
>
> or
>
> <excludes>WEB-INF/lib/*.jar</excludes>
>
> What you had would only exclude jars in the root of the war archive.
>
> -- Lee
>
> On 2/17/06, Alexandre Poitras <al...@gmail.com> wrote:
>
> > Why do you want to include jars in your ejb? It is a bad practice and
> > it would be better to include them in the ear archive and declare them
> > in the ejb jar manifest. This way you can share them between your
> > different ejb and web components. The only thing you need is to
> > generate a manifest file containing the different jar classpath in
> > your ear archive. If you don't know how, just ask and I'll post some
> > sample.
> >
> > On 2/17/06, Mike Darretta < michael.darretta.ctr@metnet.navy.mil> wrote:
> > > Well, at least I know I'm not just doing something stupid...sounds
> > like
> > > this may be the most reasonable path for the current plugin release.
> > >
> > > Mike
> > >
> > > Wayne Fay wrote:
> > >
> > > > I also get the duplication of jars, but just don't care about it.
> > ;-)
> > > >
> > > > Here's my "after ear'ing is complete" layout:
> > > > ear
> > > > |
> > > > |-war
> > > > |
> > > > jar
> > > > lib-jar
> > > > ejb-jab
> > > > |
> > > > jar
> > > > lib-jar
> > > > ejb-jar
> > > >
> > > >
> > > > Fortunately the jars are all pretty small. This duplication of jars,
> > > > while not ideal, is not a big deal, at leat for me...
> > > >
> > > > Wayne
> > > >
> > > >
> > > > On 2/17/06, Mike Darretta < michael.darretta.ctr@metnet.navy.mil>
> > wrote:
> > > >
> > > >>Hi Wayne.
> > > >>
> > > >>I have the same configuration, and see identical results. My issue,
> > > >>though, is that I have similar dependencies between my ejb and war
> > > >>modules. As such, I end up with the following in my ear:
> > > >>
> > > >>ear
> > > >>|
> > > >>|--war
> > > >> |
> > > >> |
> > > >> jar1
> > > >> jar2
> > > >>|
> > > >>|
> > > >>ejb-jar
> > > >>jar1
> > > >>jar2
> > > >>
> > > >>As you can see, my jars are replicated in both the ear's internal
> > war
> > > >>file *and* at the ear's parent directory (pulled in as transitive
> > > >>dependencies for my ejb jar).
> > > >>
> > > >>I've tried changing scope, using excludes, etc., but to no avail.
> > > >>
> > > >>BTW, can someone verify my syntax for the excludes, or if it should
> > have
> > > >>any bearing on transitive dependencies?
> > > >>
> > > >><configuration>
> > > >><archive>
> > > >><manifest>
> > > >><addClasspath>true</addClasspath>
> > > >></manifest>
> > > >></archive>
> > > >><excludes>*.jar</excludes>
> > > >></configuration>
> > > >>
> > > >>Can anyone help us??
> > > >>
> > > >>Thanks,
> > > >>Mike
> > > >>
> > > >>
> > > >>
> > > >>Wayne Fay wrote:
> > > >>
> > > >>
> > > >>>Hi Mike,
> > > >>>
> > > >>>I'm experiencing the exact same troubles. I actually just posted a
> > > >>>similar email to the list earlier today, though it doesn't seem to
> > > >>>have gotten through yet -- my first post so perhaps its moderated?
> > Its
> > > >>>called "[m2] include dependent jars in Ejb-jar".
> > > >>>
> > > >>>I am able to successfully deploy my EJBs after adding the following
> > to
> > > >>>my EJB pom.xml:
> > > >>>
> > > >>>(this assumes you are using <packaging>ejb</packaging> in the
> > > >>><project> element of this pom.xml...)
> > > >>>
> > > >>><build>
> > > >>><plugin>
> > > >>><groupId>org.apache.maven.plugins</groupId>
> > > >>><artifactId>maven-ejb-plugin</artifactId>
> > > >>><configuration>
> > > >>><archive>
> > > >>><manifest>
> > > >>><addClasspath>true</addClasspath>
> > > >>></manifest>
> > > >>></archive>
> > > >>></configuration>
> > > >>></plugin>
> > > >>></build>
> > > >>>
> > > >>>It still does not package the shared lib jar from my project into
> > the
> > > >>>ejb jar in a lib folder, but my container (oc4j) is able to figure
> > out
> > > >>>what I want and deploys things successfully. Perhaps this helps?
> > > >>>
> > > >>>If you figure out how to force the EJB plugin to include your
> > > >>>dependent jars in a lib folder, definitely respond back to the list
> > > >>>with details!
> > > >>>
> > > >>>Wayne
> > > >>>
> > > >>>
> > > >>>On 2/17/06, Mike Darretta < michael.darretta.ctr@metnet.navy.mil>
> > wrote:
> > > >>>
> > > >>>
> > > >>>>When I build my EJB module, the dependent jars are not included
> > with the
> > > >>>>EJB jar. The research I've done seems to indicate that this is the
> > > >>>>behaviour of maven-ejb-plugin.
> > > >>>>
> > > >>>>Is there a way to include my dependency jars with my EJB jar,
> > which in
> > > >>>>turn will be included in my ear file?
> > > >>>>
> > > >>>>Thanks for your help.
> > > >>>>Mike
> > > >>>>
> > > >>>
> > > >>>
> > >
> > >>>---------------------------------------------------------------------
> > > >>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >>>For additional commands, e-mail: users-help@maven.apache.org
> > > >>>
> > > >>>
> > > >>
> > > >>--
> > > >>
> > > >>Mike Darretta
> > > >>Computer Sciences Corporation (CSC)
> > > >>Sr. Software Engineer
> > > >>(o) 831.656.4324
> > > >>(c) 209.814.2774
> > > >> michael.darretta.ctr@metnet.navy.mil
> > > >>
> > > >>------------------------------------------------------------
> > > >>This is a PRIVATE message. If you are not the intended recipient,
> > please
> > > >>delete without copying and kindly advise us by e-mail of the mistake
> > in
> > > >>delivery. NOTE: Regardless of content, this e-mail shall not operate
> > to
> > > >>bind CSC to any order or other contract unless pursuant to explicit
> > > >>written agreement or government initiative expressly permitting the
> > use
> > > >>of e-mail for such purpose.
> > > >>------------------------------------------------------------
> > > >>
> > > >>
> > > >>
> > >
> > >>---------------------------------------------------------------------
> > > >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >>For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > --
> > >
> > > Mike Darretta
> > > Computer Sciences Corporation (CSC)
> > > Sr. Software Engineer
> > > (o) 831.656.4324
> > > (c) 209.814.2774
> > > michael.darretta.ctr@metnet.navy.mil
> > >
> > > ------------------------------------------------------------
> > > This is a PRIVATE message. If you are not the intended recipient,
> > please
> > > delete without copying and kindly advise us by e-mail of the mistake
> > in
> > > delivery. NOTE: Regardless of content, this e-mail shall not operate
> > to
> > > bind CSC to any order or other contract unless pursuant to explicit
> > > written agreement or government initiative expressly permitting the
> > use
> > > of e-mail for such purpose.
> > > ------------------------------------------------------------
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Alexandre Poitras
> > Qu�bec, Canada
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> -- Lee Meador
> Sent from gmail. My real email address is lee@leemeador.com
--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com
Re: Ejb Package
Posted by Lee Meador <le...@leemeador.com>.
You can exclude the jars with
<excludes>**/*.jar</excludes>
or
<excludes>WEB-INF/lib/*.jar</excludes>
What you had would only exclude jars in the root of the war archive.
-- Lee
On 2/17/06, Alexandre Poitras <al...@gmail.com> wrote:
>
> Why do you want to include jars in your ejb? It is a bad practice and
> it would be better to include them in the ear archive and declare them
> in the ejb jar manifest. This way you can share them between your
> different ejb and web components. The only thing you need is to
> generate a manifest file containing the different jar classpath in
> your ear archive. If you don't know how, just ask and I'll post some
> sample.
>
> On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
> > Well, at least I know I'm not just doing something stupid...sounds like
> > this may be the most reasonable path for the current plugin release.
> >
> > Mike
> >
> > Wayne Fay wrote:
> >
> > > I also get the duplication of jars, but just don't care about it. ;-)
> > >
> > > Here's my "after ear'ing is complete" layout:
> > > ear
> > > |
> > > |-war
> > > |
> > > jar
> > > lib-jar
> > > ejb-jab
> > > |
> > > jar
> > > lib-jar
> > > ejb-jar
> > >
> > >
> > > Fortunately the jars are all pretty small. This duplication of jars,
> > > while not ideal, is not a big deal, at leat for me...
> > >
> > > Wayne
> > >
> > >
> > > On 2/17/06, Mike Darretta <mi...@metnet.navy.mil>
> wrote:
> > >
> > >>Hi Wayne.
> > >>
> > >>I have the same configuration, and see identical results. My issue,
> > >>though, is that I have similar dependencies between my ejb and war
> > >>modules. As such, I end up with the following in my ear:
> > >>
> > >>ear
> > >>|
> > >>|--war
> > >> |
> > >> |
> > >> jar1
> > >> jar2
> > >>|
> > >>|
> > >>ejb-jar
> > >>jar1
> > >>jar2
> > >>
> > >>As you can see, my jars are replicated in both the ear's internal war
> > >>file *and* at the ear's parent directory (pulled in as transitive
> > >>dependencies for my ejb jar).
> > >>
> > >>I've tried changing scope, using excludes, etc., but to no avail.
> > >>
> > >>BTW, can someone verify my syntax for the excludes, or if it should
> have
> > >>any bearing on transitive dependencies?
> > >>
> > >><configuration>
> > >><archive>
> > >><manifest>
> > >><addClasspath>true</addClasspath>
> > >></manifest>
> > >></archive>
> > >><excludes>*.jar</excludes>
> > >></configuration>
> > >>
> > >>Can anyone help us??
> > >>
> > >>Thanks,
> > >>Mike
> > >>
> > >>
> > >>
> > >>Wayne Fay wrote:
> > >>
> > >>
> > >>>Hi Mike,
> > >>>
> > >>>I'm experiencing the exact same troubles. I actually just posted a
> > >>>similar email to the list earlier today, though it doesn't seem to
> > >>>have gotten through yet -- my first post so perhaps its moderated?
> Its
> > >>>called "[m2] include dependent jars in Ejb-jar".
> > >>>
> > >>>I am able to successfully deploy my EJBs after adding the following
> to
> > >>>my EJB pom.xml:
> > >>>
> > >>>(this assumes you are using <packaging>ejb</packaging> in the
> > >>><project> element of this pom.xml...)
> > >>>
> > >>><build>
> > >>><plugin>
> > >>><groupId>org.apache.maven.plugins</groupId>
> > >>><artifactId>maven-ejb-plugin</artifactId>
> > >>><configuration>
> > >>><archive>
> > >>><manifest>
> > >>><addClasspath>true</addClasspath>
> > >>></manifest>
> > >>></archive>
> > >>></configuration>
> > >>></plugin>
> > >>></build>
> > >>>
> > >>>It still does not package the shared lib jar from my project into the
> > >>>ejb jar in a lib folder, but my container (oc4j) is able to figure
> out
> > >>>what I want and deploys things successfully. Perhaps this helps?
> > >>>
> > >>>If you figure out how to force the EJB plugin to include your
> > >>>dependent jars in a lib folder, definitely respond back to the list
> > >>>with details!
> > >>>
> > >>>Wayne
> > >>>
> > >>>
> > >>>On 2/17/06, Mike Darretta <mi...@metnet.navy.mil>
> wrote:
> > >>>
> > >>>
> > >>>>When I build my EJB module, the dependent jars are not included with
> the
> > >>>>EJB jar. The research I've done seems to indicate that this is the
> > >>>>behaviour of maven-ejb-plugin.
> > >>>>
> > >>>>Is there a way to include my dependency jars with my EJB jar, which
> in
> > >>>>turn will be included in my ear file?
> > >>>>
> > >>>>Thanks for your help.
> > >>>>Mike
> > >>>>
> > >>>
> > >>>
> > >>>---------------------------------------------------------------------
> > >>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >>>For additional commands, e-mail: users-help@maven.apache.org
> > >>>
> > >>>
> > >>
> > >>--
> > >>
> > >>Mike Darretta
> > >>Computer Sciences Corporation (CSC)
> > >>Sr. Software Engineer
> > >>(o) 831.656.4324
> > >>(c) 209.814.2774
> > >>michael.darretta.ctr@metnet.navy.mil
> > >>
> > >>------------------------------------------------------------
> > >>This is a PRIVATE message. If you are not the intended recipient,
> please
> > >>delete without copying and kindly advise us by e-mail of the mistake
> in
> > >>delivery. NOTE: Regardless of content, this e-mail shall not operate
> to
> > >>bind CSC to any order or other contract unless pursuant to explicit
> > >>written agreement or government initiative expressly permitting the
> use
> > >>of e-mail for such purpose.
> > >>------------------------------------------------------------
> > >>
> > >>
> > >>
> > >>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >>For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > --
> >
> > Mike Darretta
> > Computer Sciences Corporation (CSC)
> > Sr. Software Engineer
> > (o) 831.656.4324
> > (c) 209.814.2774
> > michael.darretta.ctr@metnet.navy.mil
> >
> > ------------------------------------------------------------
> > This is a PRIVATE message. If you are not the intended recipient, please
> > delete without copying and kindly advise us by e-mail of the mistake in
> > delivery. NOTE: Regardless of content, this e-mail shall not operate to
> > bind CSC to any order or other contract unless pursuant to explicit
> > written agreement or government initiative expressly permitting the use
> > of e-mail for such purpose.
> > ------------------------------------------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Alexandre Poitras
> Québec, Canada
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com
Re: Ejb Package
Posted by Alexandre Poitras <al...@gmail.com>.
Why do you want to include jars in your ejb? It is a bad practice and
it would be better to include them in the ear archive and declare them
in the ejb jar manifest. This way you can share them between your
different ejb and web components. The only thing you need is to
generate a manifest file containing the different jar classpath in
your ear archive. If you don't know how, just ask and I'll post some
sample.
On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
> Well, at least I know I'm not just doing something stupid...sounds like
> this may be the most reasonable path for the current plugin release.
>
> Mike
>
> Wayne Fay wrote:
>
> > I also get the duplication of jars, but just don't care about it. ;-)
> >
> > Here's my "after ear'ing is complete" layout:
> > ear
> > |
> > |-war
> > |
> > jar
> > lib-jar
> > ejb-jab
> > |
> > jar
> > lib-jar
> > ejb-jar
> >
> >
> > Fortunately the jars are all pretty small. This duplication of jars,
> > while not ideal, is not a big deal, at leat for me...
> >
> > Wayne
> >
> >
> > On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
> >
> >>Hi Wayne.
> >>
> >>I have the same configuration, and see identical results. My issue,
> >>though, is that I have similar dependencies between my ejb and war
> >>modules. As such, I end up with the following in my ear:
> >>
> >>ear
> >>|
> >>|--war
> >> |
> >> |
> >> jar1
> >> jar2
> >>|
> >>|
> >>ejb-jar
> >>jar1
> >>jar2
> >>
> >>As you can see, my jars are replicated in both the ear's internal war
> >>file *and* at the ear's parent directory (pulled in as transitive
> >>dependencies for my ejb jar).
> >>
> >>I've tried changing scope, using excludes, etc., but to no avail.
> >>
> >>BTW, can someone verify my syntax for the excludes, or if it should have
> >>any bearing on transitive dependencies?
> >>
> >><configuration>
> >><archive>
> >><manifest>
> >><addClasspath>true</addClasspath>
> >></manifest>
> >></archive>
> >><excludes>*.jar</excludes>
> >></configuration>
> >>
> >>Can anyone help us??
> >>
> >>Thanks,
> >>Mike
> >>
> >>
> >>
> >>Wayne Fay wrote:
> >>
> >>
> >>>Hi Mike,
> >>>
> >>>I'm experiencing the exact same troubles. I actually just posted a
> >>>similar email to the list earlier today, though it doesn't seem to
> >>>have gotten through yet -- my first post so perhaps its moderated? Its
> >>>called "[m2] include dependent jars in Ejb-jar".
> >>>
> >>>I am able to successfully deploy my EJBs after adding the following to
> >>>my EJB pom.xml:
> >>>
> >>>(this assumes you are using <packaging>ejb</packaging> in the
> >>><project> element of this pom.xml...)
> >>>
> >>><build>
> >>><plugin>
> >>><groupId>org.apache.maven.plugins</groupId>
> >>><artifactId>maven-ejb-plugin</artifactId>
> >>><configuration>
> >>><archive>
> >>><manifest>
> >>><addClasspath>true</addClasspath>
> >>></manifest>
> >>></archive>
> >>></configuration>
> >>></plugin>
> >>></build>
> >>>
> >>>It still does not package the shared lib jar from my project into the
> >>>ejb jar in a lib folder, but my container (oc4j) is able to figure out
> >>>what I want and deploys things successfully. Perhaps this helps?
> >>>
> >>>If you figure out how to force the EJB plugin to include your
> >>>dependent jars in a lib folder, definitely respond back to the list
> >>>with details!
> >>>
> >>>Wayne
> >>>
> >>>
> >>>On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
> >>>
> >>>
> >>>>When I build my EJB module, the dependent jars are not included with the
> >>>>EJB jar. The research I've done seems to indicate that this is the
> >>>>behaviour of maven-ejb-plugin.
> >>>>
> >>>>Is there a way to include my dependency jars with my EJB jar, which in
> >>>>turn will be included in my ear file?
> >>>>
> >>>>Thanks for your help.
> >>>>Mike
> >>>>
> >>>
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>>For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>
> >>--
> >>
> >>Mike Darretta
> >>Computer Sciences Corporation (CSC)
> >>Sr. Software Engineer
> >>(o) 831.656.4324
> >>(c) 209.814.2774
> >>michael.darretta.ctr@metnet.navy.mil
> >>
> >>------------------------------------------------------------
> >>This is a PRIVATE message. If you are not the intended recipient, please
> >>delete without copying and kindly advise us by e-mail of the mistake in
> >>delivery. NOTE: Regardless of content, this e-mail shall not operate to
> >>bind CSC to any order or other contract unless pursuant to explicit
> >>written agreement or government initiative expressly permitting the use
> >>of e-mail for such purpose.
> >>------------------------------------------------------------
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> --
>
> Mike Darretta
> Computer Sciences Corporation (CSC)
> Sr. Software Engineer
> (o) 831.656.4324
> (c) 209.814.2774
> michael.darretta.ctr@metnet.navy.mil
>
> ------------------------------------------------------------
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
> written agreement or government initiative expressly permitting the use
> of e-mail for such purpose.
> ------------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Alexandre Poitras
Québec, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ejb Package
Posted by Mike Darretta <mi...@metnet.navy.mil>.
Well, at least I know I'm not just doing something stupid...sounds like
this may be the most reasonable path for the current plugin release.
Mike
Wayne Fay wrote:
> I also get the duplication of jars, but just don't care about it. ;-)
>
> Here's my "after ear'ing is complete" layout:
> ear
> |
> |-war
> |
> jar
> lib-jar
> ejb-jab
> |
> jar
> lib-jar
> ejb-jar
>
>
> Fortunately the jars are all pretty small. This duplication of jars,
> while not ideal, is not a big deal, at leat for me...
>
> Wayne
>
>
> On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
>
>>Hi Wayne.
>>
>>I have the same configuration, and see identical results. My issue,
>>though, is that I have similar dependencies between my ejb and war
>>modules. As such, I end up with the following in my ear:
>>
>>ear
>>|
>>|--war
>> |
>> |
>> jar1
>> jar2
>>|
>>|
>>ejb-jar
>>jar1
>>jar2
>>
>>As you can see, my jars are replicated in both the ear's internal war
>>file *and* at the ear's parent directory (pulled in as transitive
>>dependencies for my ejb jar).
>>
>>I've tried changing scope, using excludes, etc., but to no avail.
>>
>>BTW, can someone verify my syntax for the excludes, or if it should have
>>any bearing on transitive dependencies?
>>
>><configuration>
>><archive>
>><manifest>
>><addClasspath>true</addClasspath>
>></manifest>
>></archive>
>><excludes>*.jar</excludes>
>></configuration>
>>
>>Can anyone help us??
>>
>>Thanks,
>>Mike
>>
>>
>>
>>Wayne Fay wrote:
>>
>>
>>>Hi Mike,
>>>
>>>I'm experiencing the exact same troubles. I actually just posted a
>>>similar email to the list earlier today, though it doesn't seem to
>>>have gotten through yet -- my first post so perhaps its moderated? Its
>>>called "[m2] include dependent jars in Ejb-jar".
>>>
>>>I am able to successfully deploy my EJBs after adding the following to
>>>my EJB pom.xml:
>>>
>>>(this assumes you are using <packaging>ejb</packaging> in the
>>><project> element of this pom.xml...)
>>>
>>><build>
>>><plugin>
>>><groupId>org.apache.maven.plugins</groupId>
>>><artifactId>maven-ejb-plugin</artifactId>
>>><configuration>
>>><archive>
>>><manifest>
>>><addClasspath>true</addClasspath>
>>></manifest>
>>></archive>
>>></configuration>
>>></plugin>
>>></build>
>>>
>>>It still does not package the shared lib jar from my project into the
>>>ejb jar in a lib folder, but my container (oc4j) is able to figure out
>>>what I want and deploys things successfully. Perhaps this helps?
>>>
>>>If you figure out how to force the EJB plugin to include your
>>>dependent jars in a lib folder, definitely respond back to the list
>>>with details!
>>>
>>>Wayne
>>>
>>>
>>>On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
>>>
>>>
>>>>When I build my EJB module, the dependent jars are not included with the
>>>>EJB jar. The research I've done seems to indicate that this is the
>>>>behaviour of maven-ejb-plugin.
>>>>
>>>>Is there a way to include my dependency jars with my EJB jar, which in
>>>>turn will be included in my ear file?
>>>>
>>>>Thanks for your help.
>>>>Mike
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>--
>>
>>Mike Darretta
>>Computer Sciences Corporation (CSC)
>>Sr. Software Engineer
>>(o) 831.656.4324
>>(c) 209.814.2774
>>michael.darretta.ctr@metnet.navy.mil
>>
>>------------------------------------------------------------
>>This is a PRIVATE message. If you are not the intended recipient, please
>>delete without copying and kindly advise us by e-mail of the mistake in
>>delivery. NOTE: Regardless of content, this e-mail shall not operate to
>>bind CSC to any order or other contract unless pursuant to explicit
>>written agreement or government initiative expressly permitting the use
>>of e-mail for such purpose.
>>------------------------------------------------------------
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Mike Darretta
Computer Sciences Corporation (CSC)
Sr. Software Engineer
(o) 831.656.4324
(c) 209.814.2774
michael.darretta.ctr@metnet.navy.mil
------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use
of e-mail for such purpose.
------------------------------------------------------------
Re: Ejb Package
Posted by Wayne Fay <wa...@gmail.com>.
I also get the duplication of jars, but just don't care about it. ;-)
Here's my "after ear'ing is complete" layout:
ear
|
|-war
|
jar
lib-jar
ejb-jab
|
jar
lib-jar
ejb-jar
Fortunately the jars are all pretty small. This duplication of jars,
while not ideal, is not a big deal, at leat for me...
Wayne
On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
> Hi Wayne.
>
> I have the same configuration, and see identical results. My issue,
> though, is that I have similar dependencies between my ejb and war
> modules. As such, I end up with the following in my ear:
>
> ear
> |
> |--war
> |
> |
> jar1
> jar2
> |
> |
> ejb-jar
> jar1
> jar2
>
> As you can see, my jars are replicated in both the ear's internal war
> file *and* at the ear's parent directory (pulled in as transitive
> dependencies for my ejb jar).
>
> I've tried changing scope, using excludes, etc., but to no avail.
>
> BTW, can someone verify my syntax for the excludes, or if it should have
> any bearing on transitive dependencies?
>
> <configuration>
> <archive>
> <manifest>
> <addClasspath>true</addClasspath>
> </manifest>
> </archive>
> <excludes>*.jar</excludes>
> </configuration>
>
> Can anyone help us??
>
> Thanks,
> Mike
>
>
>
> Wayne Fay wrote:
>
> > Hi Mike,
> >
> > I'm experiencing the exact same troubles. I actually just posted a
> > similar email to the list earlier today, though it doesn't seem to
> > have gotten through yet -- my first post so perhaps its moderated? Its
> > called "[m2] include dependent jars in Ejb-jar".
> >
> > I am able to successfully deploy my EJBs after adding the following to
> > my EJB pom.xml:
> >
> > (this assumes you are using <packaging>ejb</packaging> in the
> > <project> element of this pom.xml...)
> >
> > <build>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-ejb-plugin</artifactId>
> > <configuration>
> > <archive>
> > <manifest>
> > <addClasspath>true</addClasspath>
> > </manifest>
> > </archive>
> > </configuration>
> > </plugin>
> > </build>
> >
> > It still does not package the shared lib jar from my project into the
> > ejb jar in a lib folder, but my container (oc4j) is able to figure out
> > what I want and deploys things successfully. Perhaps this helps?
> >
> > If you figure out how to force the EJB plugin to include your
> > dependent jars in a lib folder, definitely respond back to the list
> > with details!
> >
> > Wayne
> >
> >
> > On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
> >
> >>When I build my EJB module, the dependent jars are not included with the
> >>EJB jar. The research I've done seems to indicate that this is the
> >>behaviour of maven-ejb-plugin.
> >>
> >>Is there a way to include my dependency jars with my EJB jar, which in
> >>turn will be included in my ear file?
> >>
> >>Thanks for your help.
> >>Mike
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> --
>
> Mike Darretta
> Computer Sciences Corporation (CSC)
> Sr. Software Engineer
> (o) 831.656.4324
> (c) 209.814.2774
> michael.darretta.ctr@metnet.navy.mil
>
> ------------------------------------------------------------
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery. NOTE: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit
> written agreement or government initiative expressly permitting the use
> of e-mail for such purpose.
> ------------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ejb Package
Posted by Mike Darretta <mi...@metnet.navy.mil>.
Hi Wayne.
I have the same configuration, and see identical results. My issue,
though, is that I have similar dependencies between my ejb and war
modules. As such, I end up with the following in my ear:
ear
|
|--war
|
|
jar1
jar2
|
|
ejb-jar
jar1
jar2
As you can see, my jars are replicated in both the ear's internal war
file *and* at the ear's parent directory (pulled in as transitive
dependencies for my ejb jar).
I've tried changing scope, using excludes, etc., but to no avail.
BTW, can someone verify my syntax for the excludes, or if it should have
any bearing on transitive dependencies?
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<excludes>*.jar</excludes>
</configuration>
Can anyone help us??
Thanks,
Mike
Wayne Fay wrote:
> Hi Mike,
>
> I'm experiencing the exact same troubles. I actually just posted a
> similar email to the list earlier today, though it doesn't seem to
> have gotten through yet -- my first post so perhaps its moderated? Its
> called "[m2] include dependent jars in Ejb-jar".
>
> I am able to successfully deploy my EJBs after adding the following to
> my EJB pom.xml:
>
> (this assumes you are using <packaging>ejb</packaging> in the
> <project> element of this pom.xml...)
>
> <build>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-ejb-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <addClasspath>true</addClasspath>
> </manifest>
> </archive>
> </configuration>
> </plugin>
> </build>
>
> It still does not package the shared lib jar from my project into the
> ejb jar in a lib folder, but my container (oc4j) is able to figure out
> what I want and deploys things successfully. Perhaps this helps?
>
> If you figure out how to force the EJB plugin to include your
> dependent jars in a lib folder, definitely respond back to the list
> with details!
>
> Wayne
>
>
> On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
>
>>When I build my EJB module, the dependent jars are not included with the
>>EJB jar. The research I've done seems to indicate that this is the
>>behaviour of maven-ejb-plugin.
>>
>>Is there a way to include my dependency jars with my EJB jar, which in
>>turn will be included in my ear file?
>>
>>Thanks for your help.
>>Mike
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Mike Darretta
Computer Sciences Corporation (CSC)
Sr. Software Engineer
(o) 831.656.4324
(c) 209.814.2774
michael.darretta.ctr@metnet.navy.mil
------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use
of e-mail for such purpose.
------------------------------------------------------------
Re: Ejb Package
Posted by Wayne Fay <wa...@gmail.com>.
Hi Mike,
I'm experiencing the exact same troubles. I actually just posted a
similar email to the list earlier today, though it doesn't seem to
have gotten through yet -- my first post so perhaps its moderated? Its
called "[m2] include dependent jars in Ejb-jar".
I am able to successfully deploy my EJBs after adding the following to
my EJB pom.xml:
(this assumes you are using <packaging>ejb</packaging> in the
<project> element of this pom.xml...)
<build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</build>
It still does not package the shared lib jar from my project into the
ejb jar in a lib folder, but my container (oc4j) is able to figure out
what I want and deploys things successfully. Perhaps this helps?
If you figure out how to force the EJB plugin to include your
dependent jars in a lib folder, definitely respond back to the list
with details!
Wayne
On 2/17/06, Mike Darretta <mi...@metnet.navy.mil> wrote:
> When I build my EJB module, the dependent jars are not included with the
> EJB jar. The research I've done seems to indicate that this is the
> behaviour of maven-ejb-plugin.
>
> Is there a way to include my dependency jars with my EJB jar, which in
> turn will be included in my ear file?
>
> Thanks for your help.
> Mike
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org