wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Jar File Creation Destroys Images in Maven2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Jar File Creation Destroys Images in Maven2" Watch "Jar File Creation Destroys Images in Maven2" New topic
Author

Jar File Creation Destroys Images in Maven2

Andrew Leer
Ranch Hand

Joined: Nov 11, 2003
Posts: 44
I'm creating a jar file which contains several compressed images (gifs, and
pngs) I noticed that when I retrieve and display them in my application inside
the packaged jar they display all garbled. It's still evedent that they are the
images I packaged into the jar, but they are messed up. I also tried opening
the jar with winzip and much of the image is just not there, part of the image
displays white. Does this have something to do with the resources:resources
plugin?

(I'm sorta to Maven2)

Thanks,

Andrew J. Leer
Robert Herschke
Greenhorn

Joined: Jul 19, 2006
Posts: 1
Hello,

we had a simmiliar problem and focused out, that there is a problem, when you enable the filtering of resources.

So before the jar is packaged, each file in the resource-directory is filtered (which means opened and stored again) and this leads to the corrupt images.

I don't know, if there is a default for filtering in Maven2 but you're recommend to explicit set <filtering>false</filtering> in your <resource> section!

H.t.h.
Robert
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jar File Creation Destroys Images in Maven2