You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by le...@adelphia.net on 2006/05/04 05:49:35 UTC

Jar File Creation Destroys Images in Maven2

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar File Creation Destroys Images in Maven2

Posted by maskkkk <le...@hotmail.com>.
Actually I tried including some BMPs and strangly nothing happens to them.  I
think maybe it has something to do with the fact that gifs and pngs are
already compressed.  

Also just as a side note...I tried making the jar from scratch using just
the jar command and everything is fine. (But it'd still be really nice to
use mvn to do it instead...)
--
View this message in context: http://www.nabble.com/Jar-File-Creation-Destroys-Images-in-Maven2-t1554529.html#a4227879
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar File Creation Destroys Images in Maven2

Posted by jerome lacoste <je...@gmail.com>.
On 5/4/06, leeand00@adelphia.net <le...@adelphia.net> wrote:
> 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?


That sounds pretty scary. Are all images garbled? Can you recreate a test case?

Jerome

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar File Creation Destroys Images in Maven2

Posted by ha...@rz.uni-karlsruhe.de.
Andrew, the subject of filtering (or NOT filtering) resources is 
described in section 2.6.3 "Preventing Filtering of Binary Resources"
of the excellent book "Better Builds with Maven" by Vincent Massol
and Jason van Zyl. The section also contains a POM snippet for this
purpose.

You can download the book from http://www.mergere.com/m2book_download.jsp

Greetings
Harald


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar File Creation Destroys Images in Maven2

Posted by maskkkk <le...@hotmail.com>.
Is there anyway of modifiying this so that it uses the standard jar command?
--
View this message in context: http://www.nabble.com/Jar-File-Creation-Destroys-Images-in-Maven2-t1554529.html#a4227968
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar File Creation Destroys Images in Maven2

Posted by ha...@rz.uni-karlsruhe.de.
Quoting leeand00@adelphia.net:

> 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)
I'm not ab M2 pundit, but I got similar interferences while copying
binary resources by Ant when these resources were filtered on the fly (
e.g., when some kind of resource interpolation or string replacement took
place). Perhaps M2 uses a similar procedure as Ant's filtering
mechanism.  Just my 2ct thoughts....

Harald


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org