wicket 1.4.21, glassfish, @font-face

2012-12-10 Thread Adam Gray
I'm running into a curious issue and wondered if anyone has any idea what
else I can look into for a solution.

In wicket 1.4.21 (legacy app), I'm attempting to switch to font awesome for
icons in twitter bootstrap.

I've added the following patterns to the resource guard
  guard.addPattern(+*.svg);
  guard.addPattern(+*.ttf);
  guard.addPattern(+*.eot);
  guard.addPattern(+*.woff);

The css file is served as a CSSPackageResource and gets loaded correctly.
The css file references the fonts by url, those seem to be referenced
correctly and are returned from the server with a 200 OK.

The issue is that somehow, the font files are corrupted.  The original ttf
font is 68kb on disk.  The downloaded version is 85kb.

At this point, I don't know if I should be looking into glassfish or
wicket.  Are my guard patterns correct?  I'd like to think so since the
request is completed with something.  Is there a known packaging problem
with maven I should look for?


Re: wicket 1.4.21, glassfish, @font-face

2012-12-10 Thread Adam Gray
For anyone else out there that runs into this thread looking for anything
similar, the final solution was (as usual) pretty dumb.  A while ago our
static resources were moved from an external directory into
/src/main/resources.  This directory was still being filtered in the
pom.xml.  This is a no, no with binary files (like fonts and images).

http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

At that page at the bottom it says: *Warning:* Do not filter files with
binary content like images! This will most likely result in corrupt output.
If you have both text files and binary files as resources, you need to
declare two mutually exclusive resource sets. The first resource set
defines the files to be filtered and the other resource set defines the
files to copy unaltered...

Heed this warning.


On Mon, Dec 10, 2012 at 5:05 PM, Adam Gray adam.j.g...@gmail.com wrote:

 I'm running into a curious issue and wondered if anyone has any idea what
 else I can look into for a solution.

 In wicket 1.4.21 (legacy app), I'm attempting to switch to font awesome
 for icons in twitter bootstrap.

 I've added the following patterns to the resource guard
   guard.addPattern(+*.svg);
   guard.addPattern(+*.ttf);
   guard.addPattern(+*.eot);
   guard.addPattern(+*.woff);

 The css file is served as a CSSPackageResource and gets loaded correctly.
 The css file references the fonts by url, those seem to be referenced
 correctly and are returned from the server with a 200 OK.

 The issue is that somehow, the font files are corrupted.  The original ttf
 font is 68kb on disk.  The downloaded version is 85kb.

 At this point, I don't know if I should be looking into glassfish or
 wicket.  Are my guard patterns correct?  I'd like to think so since the
 request is completed with something.  Is there a known packaging problem
 with maven I should look for?