ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Chambery" <tchamb...@hotmail.com>
Subject Re: Adding/extending a manifest using <ejbjar>
Date Tue, 15 Jan 2002 19:46:39 GMT

----- Original Message -----
From: "Eddie Bernard" <ebernard@digitalthink.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Tuesday, January 15, 2002 1:48 PM
Subject: RE: Adding/extending a manifest using <ejbjar>


> After many hours of research and scouring over the java specs, here's what
I
> found out ... just thought I'd post this so others don't lose sleep over
> this ;).
>
> If you specify your own manifest file, you *must* provide the
> "Manifest-Version" name/value pair, otherwise it will generate an "empty"
> (actually <cr><lf><cr><lf>) manifest.
>
> This is a restriction noted in the java specification for creating a
> manifest.
>
> Moreover (and on a separate note), a manifest line *cannot* exceed 72
bytes
> per specification.
>
> This means that if you're adding a "Class-Path: " attribute (which
consumes
> 12 of the 72 bytes allocated leaving you with only 60), you can only add
60
> characters or bytes worth of additional classpath information such as
jars,
> zips, classes, etc.  In my case, I have over 120 bytes of information I
> wanted to add to this attribute but now I'm unable to do so due to this
> restriction.
>

You can have a classpath longer than 72 characters, but you have to wrap the
classpath, comme ca:

Manifest-Version: 1.0
Class-Path: library/this_is_a_jar__.jar library/another_jar_____.jar y
 et_another_jar.jar blahblahblahblah_________________blahblahbalhbal.j
 ar

note the space at the beginning of the wrapped lines (this should look right
if you have a monospaced font).


> I don't understand why this is a restriction considering the need for J2EE
> components to define its own classpath requirements.  Nonetheless, it's
> something to consider.
>
> What I'm going to have to do is add my additional third party components
to
> the system classpath of the J2EE server (in this case WebLogic) and limit
> the manifest classpath construct to only the components that I'm
> building/generating (i.e. only one jar file).
>
> Thanks to everyone for their help on this.  If anyone has something else
to
> lend to this, please do so -- it will be of great value to everyone
> concerned :).
>
>
>
> Cheers!
> Eddie
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message