You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Teemu Hiltunen <te...@uta.fi> on 2004/03/04 12:05:23 UTC
[ear plugin] Including "common" jars into ear
Greetings!
We're trying to create an ear with some ejb-modules and a war-module. The
ejb-modules and war uses some common jars. I was wondering whether it is
even legal to put these commons jars into ear root without the need to put
them each into an ejb-module and war-module? And if it is legal (should be)
then the Maven ear-plugin should be modified to include jars without making
a <module>-element into application.xml - because the common jars are not
application client jars. We have some problems with Oracle AS when deploying
an ear where all the correct jars are inside each ejb or war module.
I modified the ear-plugins (version 1.3) plugin.jelly file:
<!--==================================================================-->
<!-- Creates ear descriptor - application.xml file -->
<!--==================================================================-->
<goal name="ear:generate-ear-descriptor" description="Generates the ear
descriptor">
...
<j:when test="${dep.type=='jar'} and
${dep.getProperty('ear.appxml.include')=='true'">
...
and added into project.xml in common jars (log4j for example):
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
<type>jar</type>
<url />
<properties>
<ear.bundle>true</ear.bundle>
<ear.appxml.include>false</ear.appxml.include>
</properties>
</dependency>
Now I can create an ear which doesn't have a <module>-element for log4j.jar.
So, my question; is it legal to create an ear with "common" jars that are
not application-clients and if so should the ear-plugin to be modified
accordingly?
--teemu
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [ear plugin] Including "common" jars into ear
Posted by Jeffrey Bonevich <je...@bonevich.com>.
(1) Yes, you can add POJJ (plain ol' java jars) to an EAR file, root or
elsewhere. You will have to modify the MANIFEST.MF files of your
modules (ejb, war, etc.) to load classes from the specific jars. Not
sure, but am willing to bet a nickle that Maven can do the manifest
stuff for you. (NOTE: I have no specific experience using the ear
plugin, just creating and deploying EAR files in general.)
(2) Not sure that the ear plugin will do what you want w/o the
modification you made. Does not appear so from the docs. I would
suggest checking JIRA for a pre-existing request, or create a new one,
to which to submit this as a patch.
jeff
Teemu Hiltunen wrote:
> Greetings!
>
> We're trying to create an ear with some ejb-modules and a war-module. The
> ejb-modules and war uses some common jars. I was wondering whether it is
> even legal to put these commons jars into ear root without the need to put
> them each into an ejb-module and war-module? And if it is legal (should be)
> then the Maven ear-plugin should be modified to include jars without making
> a <module>-element into application.xml - because the common jars are not
> application client jars. We have some problems with Oracle AS when deploying
> an ear where all the correct jars are inside each ejb or war module.
>
> I modified the ear-plugins (version 1.3) plugin.jelly file:
>
> <!--==================================================================-->
> <!-- Creates ear descriptor - application.xml file -->
> <!--==================================================================-->
> <goal name="ear:generate-ear-descriptor" description="Generates the ear
> descriptor">
> ...
> <j:when test="${dep.type=='jar'} and
> ${dep.getProperty('ear.appxml.include')=='true'">
> ...
>
> and added into project.xml in common jars (log4j for example):
>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.8</version>
> <type>jar</type>
> <url />
> <properties>
> <ear.bundle>true</ear.bundle>
> <ear.appxml.include>false</ear.appxml.include>
> </properties>
> </dependency>
>
> Now I can create an ear which doesn't have a <module>-element for log4j.jar.
>
> So, my question; is it legal to create an ear with "common" jars that are
> not application-clients and if so should the ear-plugin to be modified
> accordingly?
>
>
> --teemu
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
jeff bonevich
mailto: jeff@bonevich.com
"Any sufficiently advanced technology is indistinguishable from magic."
Arthur C. Clarke
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning."
Rich Cook
"All programmers are playwrights and all computers are lousy actors."
Unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [ear plugin] Including "common" jars into ear
Posted by di...@multitask.com.au.
I believe this is done in CVS already.
--
dIon Gillard, Multitask Consulting
"Teemu Hiltunen" <te...@uta.fi> wrote on 04/03/2004 10:05:23 PM:
> Greetings!
>
> We're trying to create an ear with some ejb-modules and a war-module.
The
> ejb-modules and war uses some common jars. I was wondering whether it is
> even legal to put these commons jars into ear root without the need to
put
> them each into an ejb-module and war-module? And if it is legal (should
be)
> then the Maven ear-plugin should be modified to include jars without
making
> a <module>-element into application.xml - because the common jars are
not
> application client jars. We have some problems with Oracle AS when
deploying
> an ear where all the correct jars are inside each ejb or war module.
>
> I modified the ear-plugins (version 1.3) plugin.jelly file:
>
>
<!--==================================================================-->
> <!-- Creates ear descriptor - application.xml file -->
>
<!--==================================================================-->
> <goal name="ear:generate-ear-descriptor" description="Generates the
ear
> descriptor">
> ...
> <j:when test="${dep.type=='jar'} and
> ${dep.getProperty('ear.appxml.include')=='true'">
> ...
>
> and added into project.xml in common jars (log4j for example):
>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.8</version>
> <type>jar</type>
> <url />
> <properties>
> <ear.bundle>true</ear.bundle>
> <ear.appxml.include>false</ear.appxml.include>
> </properties>
> </dependency>
>
> Now I can create an ear which doesn't have a <module>-element for
log4j.jar.
>
> So, my question; is it legal to create an ear with "common" jars that
are
> not application-clients and if so should the ear-plugin to be modified
> accordingly?
>
>
> --teemu
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>