The first pain it caused me was that the .jar file would not pass through the QA department because the contents were not was expected. I didn't go beyond that because I can't deliver software without QA approval. It seemed easier to use ant13 than fight the battle.
The second problem I ran into was that sections seperated by blank lines were mixed up, and information from my sections are placed in the main attribute section. I reviewed the JAR Manifest specification, and it indicates that only legitimate main attributes belong in the main section. The manifest I create contains the following: -----start----- Manifest-Version: 1.0 Specification-Title: Horizon Lab (classes) Specification-Vendor: McKesson Specification-Version: 8.0.0 Implementation-Vendor: McKesson (Horizon Lab) Implementation-Version: 8.0.0-hlab-20020312@1604-00060 Implementation-Title: Horizon Lab Build-Date: 20020312@1604 Build-Number: 00060 Build-Environment: C:\pwl\projects\lab\build rhensle -----end----- The manifest placed in the jar created by ant 1.4.1 contains: ----start---- Manifest-Version: 1.0 Implementation-Version: 8.0.0-hlab-20020312@1604-00060 Specification-Title: Horizon Lab (classes) Specification-Version: 8.0.0 Implementation-Title: Horizon Lab Build-Date: 20020312@1604 Created-By: Ant 1.4 Build-Number: 00060 Implementation-Vendor: McKesson (Horizon Lab) Build-Environment: C:\pwl\projects\lab\build rhensle Specification-Vendor: McKesson ----end---- The manifest placed in the jar created by ant 1.3 contains: ---start---- Manifest-Version: 1.0 Specification-Title: Horizon Lab (classes) Specification-Vendor: McKesson Specification-Version: 8.0.0 Implementation-Vendor: McKesson (Horizon Lab) Implementation-Version: 8.0.0-hlab-20020312@1616-00061 Implementation-Title: Horizon Lab Build-Date: 20020312@1616 Build-Number: 00061 Build-Environment: C:\pwl\projects\lab\build rhensle ----end---- The manifest placed in the jar created by jar cvfm test.jar classes-manifest classes/* ----start--- Manifest-Version: 1.0 Implementation-Version: 8.0.0-hlab-20020312@1604-00060 Specification-Title: Horizon Lab (classes) Specification-Version: 8.0.0 Implementation-Title: Horizon Lab Build-Date: 20020312@1604 Created-By: 1.3.1_01 (Sun Microsystems Inc.) Build-Number: 00060 Implementation-Vendor: McKesson (Horizon Lab) Build-Environment: C:\pwl\projects\lab\build rhensle Specification-Vendor: McKesson ----end---- Note the Implementation-Version is in the main section, and the Created-By is not in the main section. These both seem to violate the specification. It is interesting to note that the jar command for jdk1.3.1_01 does the same exact action as ant 1.4.1. Now I'm very confused. I'm not sure what the right thing to do is.... Also, the manfest created by ant 1.3 is exactly the same as the file, except I don't think it is valid because it lacks a Created-By: The URL for the specification is http://java.sun.com/j2se/1.4/docs/guide/jar/jar.html <http://java.sun.com/j2se/1.4/docs/guide/jar/jar.html> Richard -----Original Message----- From: Conor MacNeill [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Tuesday, March 12, 2002 3:47 PM To: Ant Users List Subject: RE: Using Main-Class and Class-Path in a manifest file Richard, what problems does the scrambling of order of entries cause you? Conor > -----Original Message----- > From: Hensley, Richard [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] > Sent: Wednesday, 13 March 2002 9:28 AM > To: 'Ant Users List' > Subject: RE: Using Main-Class and Class-Path in a manifest file > > > I can't confirm that Class-Path is needed first, but I can confirm that > ant 1.4.1 scrambles the order of entries in the Manifest. This has > caused me problems to such a degree, that I just went back to using ant > 1.3. I posted a message about it a few days ago, I didn't get a > response, and haven't had time to get back to it. > > The bug seems to be that ant rearranges. > > Richard > -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: < mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >