You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "J. Matthew Pryor" <jm...@yahoo.com> on 2003/12/15 04:06:10 UTC

RE: How to include jars and add them into the MANIFEST.MF/Class-Path attribute?

As far as I can see, the CVS HEAD version of the war plugin does not support
manifest classpaths for webapps

Now I can see how for a small project, it is convenievnt to use WEBAPP\lib
for webapps, but if I have a lot of webapps that use the same library, i get
one copy of it in the ear for each webapp

For large projects, this will significantly increase the size of the ear
(unecessarily)

IMO manifest classpath is the best way to deal with shared libraries from
both webapps and ejbjars, so I am wondeirng if there is any plan to support
manifest classpath for webapps

I have a modified local version of the war plugin that works correctly with

<war.manifest.classpath>true</war.manifest.classpath>

Anyone interested. It was a simple copy & paste job from the ejb plugin.

Interestingly the serverside maven j2e tutorial uses
<war.manifest.classpath>true</war.manifest.classpath> even though AFAICT
there is no support for it currently

Matthew

> -----Original Message-----
> From: Rademacher Tobias [mailto:Tobias.Rademacher@grob.de]
> Sent: Friday, November 21, 2003 10:04 PM
> To: 'Maven Users List'
> Subject: AW: How to include jars and add them into the
> MANIFEST.MF/Class-Path attribute?
>
>
> For WAR you only only have to provide lib directory within the
> WAR File. It can contain any depending JAR you need. This is
> standard for WAR files (startig at 2.3 Servlet Spec I think). For
> EJB-JARS and EAR we don't have such a standard currently. You
> have to provide the relative path in the Manifest of the EJB-JAR
> if you want to force containers to load the dependent JAR Files.
> > -----Ursprüngliche Nachricht----- > Von: egglersim@post.ch
[mailto:egglersim@post.ch] > Gesendet am: Freitag, 21. November 2003 11:48 >
An: users@maven.apache.org > Betreff: RE: How to include jars and add them
into the > MANIFEST.MF/Class-Path attribute? >  > Problem with the
ear.bundle is, that the jar is installed as  > java module > (which is
reserved for e.g. ejb client jars).  >  > I can manually copy the jar via
the copy-deps task, but that doesn't > solve the problem of the classpath
(escpecially for war's, because > there's no war.manifest.classpath
property). >  > Cheers, > simon >  >  > -----Original Message----- > From: R
a n e s [mailto:ranes@rediffmail.com]  > Sent: Freitag, 21. November 2003
10:51 > To: Maven Users List > Subject: Re: How to include jars and add them
into the > MANIFEST.MF/Class-Path attribute? >  >  > Hi, > You can set the
"ear.bundle" to true. >  >   <dependency> >    <id>common</id> >
<type>jar</type> >    <properties> >     <ear.bundle>true</ear.bundle> >
</properties> >   </dependency> >  > Regards, >  Ranes. >  > ----- Original
Message ----- > From: <eg...@post.ch> > To: <us...@maven.apache.org> >
Sent: Friday, November 21, 2003 2:57 PM > Subject: How to include jars and
add them into the > MANIFEST.MF/Class-Path > attribute? >  >  > When
building an ear, i'd like to include the dependent jar  > files in the > lib
dir of the ear and add them to the Class-Path of the including >
applications. > Is there any easy way to do so? >  >  > Cheers, > simon >
 > --------------------------------------------------------------------- >
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 >  >
 > --------------------------------------------------------------------- >
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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: How to include jars and add them into the MANIFEST.MF/Class-Path attribute?

Posted by "J. Matthew Pryor" <jm...@yahoo.com>.
> Now I can see how for a small project, it is convenievnt to use WEBAPP\lib
> for webapps, but if I have a lot of webapps that use the same 
> library, i get
> one copy of it in the ear for each webapp

Sorry I meant to say WEB-INF/lib


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org