| Author |
Problem with packaging using ant
|
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Hi all. I have the following structure: Dir\src for source Dir\build for class files Dir\dist for storing the jar Dir\images images used by the application using ant, I want to create an executable jar file. I wrote : but the problem is, ant doesn't create images directory inside the Jar file, so the application will not working. (when extracting the jar I found: com/*.class Meta-INF image1.gif image2.gif) how to create the images directory inside the jar ??
|
 |
Nathaniel Stoddard
Ranch Hand
Joined: May 29, 2003
Posts: 1258
|
|
You need to include your "images" directory as part of the build. Right now you are just including all the files inside the "images" directory. Try something like this: That should work for you if your "images" property is the value you want to show up in your JAR. If you need a different name, you'd have to do something like copy all your images to a temp directory whose name is the one you want, then do the same sort of thing.
|
Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Please look at my build file: now, the jar doesn't include the the images at all !! how to create the images directory inside the jar ? please help ....
|
 |
Nathaniel Stoddard
Ranch Hand
Joined: May 29, 2003
Posts: 1258
|
|
The nested include inside the fileset needs to be a relative URI. Since you have your "basedir" portion of your images attribute it messes everything up. Change to this:
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Thanks you alot. but there is the last problem. I have the class Manager under the package com, and as you see I have specified it within the manifest tag: <attribute name="Main-Class" value="com.Manager"/> but the jar file don't launch (it launch if I put my class without a package).... so what is the problem ? I appreciate your help...
|
 |
 |
|
|
subject: Problem with packaging using ant
|
|
|