Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar File Creation Destroys Images in Maven2

 
Andrew Leer
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic