> From: Christopher Blunck [mailto:[EMAIL PROTECTED]
> Hello-
>
> I'm using jakarta-ant-1.4.1 and I noticed that in
> org.apache.tools.ant.taskdefs.Manifest 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 dependancy.mf 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 dependancy.mf file like this:
>
> <jar jarfile="${build.dir}/jar/ejb-${bean.name}.jar"
> update="true"
> manifest="${bean.src.dir}/META-INF/dependancy.mf"/>
>
>
> Here is a snapshot of one of the dependancy.mf 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 Manifest.java 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 :-)
Conor
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>