> 1) If a filter is applied, is ti possible that that filtering is applied
> also to all files contained inside a jar? It seems yes, can you confirm?

For this to work properly, you would need to unpack the jar, filter
the contents, then re-jar it. The filter is not smart enough to unzip
the jar, change the contents, and rejar by itself.

> 2) If inside a file I have a string like ${something} but in my properties
> file, it isn't defined that property, after filtering was applied that
> string is substituted with an empty string? Or it remains unchanged?

It will be substituted with an empty string.

> My questions rise because after I've executed a "mvn package" with filtering
> applied, I've discovered that one of my jars contained inside the "filtered"
> directory has been corrupted.

Filtering simply looks at a file and replaces all instances of ${....}
with the corresponding value. If you have a binary file that has
${....} in it, then that section of the binary file will be replaced
with the corresponding filter value which will probably corrupt your
binary file. This happens frequently with image files -- people
complain about this every couple months on this list.

As a result, you should not include binary files in "filtered" directories.

Wayne

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

Reply via email to