ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Kryszkiewicz" <>
Subject nested jar files
Date Thu, 26 Jun 2003 04:25:18 GMT
Maybe I need to drink another gallon of coffee, but I still don't 'get' how
Ant handles the index list in the jar manifest. I'm experimenting with an
image processing example. I compiled the example app OK and bundled the JIMI
class files in a jar along with the app as follows;

  <target name="jar" depends="dist" description="jar the distribution" >
    <!-- Put everything in ${build} into the JIMIExample.jar file -->
    <jar jarfile="${dist}/lib/JIMIExample.jar" basedir="${build}"
      <attribute name="Main-Class" value="JimiBrowserApp"/>
      <attribute name="Class-Path" value="JimiProClasses.jar"/>
     <section name="com/sun/jimi/core/">
      <attribute name="Specification-Title" value="JIMI Imaging classes"/>
      <attribute name="Specification-Version" value="1.0"/>
      <attribute name="Specification-Vendor" value="Sun Microsystems"/>
      <attribute name="Implementation-Title" value="com.sun.jimi.core"/>
      <attribute name="Implementation-Version" value="${version} ${TODAY}"/>
      <attribute name="Implementation-Vendor" value="Sun Microsystems"/>

  <target name="run" depends="jar">
    <java classpath="${dist}/lib/JIMIExample.jar"
       jar="${JIMIExample}" fork="true"/>
<echoproperties destfile=""/>

.........Trying to run the app yields the following ant error message;

     [java] java.lang.NoClassDefFoundError: com/sun/jimi/core/JimiException
     [java] Exception in thread "main"

.......looking at the manifest in the created jar;
Manifest-Version: 1.0

Ant-Version: Apache Ant 1.5.3

Created-By: 1.4.1_01-b01 (Sun Microsystems Inc.)

Main-Class: JimiBrowserApp

Class-Path: JimiProClasses.jar

Name: com/sun/jimi/core/

Specification-Title: JIMI imaging

...... ............and so on. Looking at the index.list gives me;

JarIndex-Version: 1.0



.................. but no index of the included jar file. What am I missing?
Does the embedded jar file ALSO need a manifest with an index list?

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

View raw message