ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: class - Question on length field
Date Wed, 19 Dec 2001 22:53:24 GMT
> From: Christopher Blunck []
> Hello-
> I'm using jakarta-ant-1.4.1 and I noticed that in
> that the MAX_LINE_LENGTH is set
> to 70.  I'm wondering why that number was chosen.  Here is why...

It was chosen because that is what the Jar Manifest specification published
by Sun requires.

> I'm building a J2EE application using Ant as my build and assembly
> tool.  I have dependancies amongst my EJB components and (as such) I'm
> using the Class-Path: feature in the MANIFEST.MF of each EJB JAR to
> declare those dependancies.
> To accomplish this, I've written a file in each of my
> component's META-INF directory.  After weblogic.ejbc finishes converting
> my JAR to an EBJ JAR, I update the MANIFEST.MF file with the includes
> from my file like this:
> <jar jarfile="${build.dir}/jar/ejb-${}.jar"
>      update="true"
>      manifest="${bean.src.dir}/META-INF/"/>
> Here is a snapshot of one of the files (note the long
> line):
> Class-Path:     echo-core.jar ejb-userprofile.jar
> ejb-providerprofile.jar ejb-property.jar
> (Apologies if my email client has mangled this line, but all the entries
> are on the same line and there is a carriage return at the end of the
> line).
> When the JAR task in ant completes the re-jar'ing of my EJB, the
> output'ed MANIFEST.MF file looks like this:
> Class-Path:     echo-core.jar ejb-userprofile.jar  ejb-prov
>  iderprofile.jar ejb-property.jar

This is a valid structure for Manifest files. The next line is a
continuation line and begins with a space. Again according to the spec.

> I may have screwed up the splicing of ejb-providerprofile.jar, but I'm
> sure you all get the point ;-).
> WebLogic obviously can't correctly deploy this EJB because the
> Class-Path line is incomplete or incorrect. (Whatever you want to call
> it).

It may be true that weblogic can't handle it but it is not incomplete or
incorrect. I have actually been looking into this issue already. I think the
problem may be in Weblogic, but perhaps we should add a flag to ant to turn
off wrapping in the Manifests.

> I made a change to your file and made the MAX_LINE_LENGTH
> 300 (instead of 70) and the Class-Path line was correctly generated.
> But I'm still left wondering why it was set to 70 to begin with...

Read the spec :-)


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message