aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes jaring an images folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "jaring an images folder" Watch "jaring an images folder" New topic
Author

jaring an images folder

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i'm experimenting with a very simple setup:

i have this frame that displays an icon in the title bar

then i have these folders:

img

jars - where i want to store the generated jars

source



so far i can run the application and jar it

i'd like to jar the img folder too, but i just cant - it includes all the stuff i'v got inside my project ... lol

another byas is that everytime i make a jar i'v to previously delete the former, because it says it cant contain a zip...

i guess i'm doing something wrong in creating the jar in the jars folder, but dont know...

here's my build file: (the Teste.jar is ok, but i cant jar only the images inside the img file, when creating the img.jar file - that's where i need help)




java amateur
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i just realized a mistake, so now i can properly jar the images folder:



also, i strangely stopped receiving those messages related with zips

so, for now, its case solved
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
oops

after all the imgjar isnt updated

i read from the ant documentation:

update indicates whether to update or overwrite the destination file if it already exists. Default is "false". No


so i'm using it without any result:



what is wrong now?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5837
    
    7

If the date of the JAR file is more recent that the date of the prospective contents (the image in this case), Ant will not recreate the JAR file, even though you changed the build.xml to build the JAR differently. You will need to delete the JAR file and run Ant again. Hopefully your 'clean' target will do that.


JBoss In Action
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
Peter Johnson wrote:If the date of the JAR file is more recent that the date of the prospective contents (the image in this case), Ant will not recreate the JAR file, even though you changed the build.xml to build the JAR differently. You will need to delete the JAR file and run Ant again. Hopefully your 'clean' target will do that.


thank you for the idea: i'll include a delete jars folder in the clean and make it dependable for jaring
 
Don't get me started about those stupid light bulbs.
 
subject: jaring an images folder