Jochen,

Here's a couple suggestions:

1) Put you images in a separate resource directory (e.g., src/main/image) and add another <resource> stanza to your POM with <filtering>false</filtering>

2) Add an <excludes> stanza to your existing <resource> and exclude all common image extension, then add another add another <resource> stanza to your POM with the same directory but <filtering>false</filtering> and an include the image extension you excluded in the prior resource.

I prefer #1 as it requires no maintenance of image extensions in your POM.

Another related tactic we use on some projects (mainly web apps) is to have have two directories for a type of resource, one that is filtered and one not (e.g., src/main/web and src/main/web-filtered)

As far as the difference between Linux and Windows (a discussion that will rage on forever ;), in this case, it's a difference in line endings: linux/unix use a single line feed character (commonly written as \n); windows use a two-character sequence, carriage-return and a line feed (commonly written as \r\n). Filtering treats files as text and will thus re-write the platform line ending. Since images are binary, this line-ending re-writing produced corrupt images.

HTH,
Doug

Jochen Wiedmann wrote:


Hi,

I have recently turned on filtering for my resources folder. Worked fine, until I started the application: It turned out, that images are filtered too, becoming corrupt. (Funnily, this was on Windows only. Everything worked fine on Linux.)

Two questions:

- Can anyone explain the difference between Linux and Windows?
  (Curiosity only)
- How can I turn filtering on without trashing my images?


Regards,

Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to