Since PrimeFaces 3.0, there is a new HeadRenderer
which allows customizable resource ordering. See also this blog. This has overriden the standard JSF head renderer. This is at its own okay, but apparently it failed to properly recognize inline scripts with target of head. This is clearly a bug in PrimeFaces head renderer. Your best bet is to report this issue to PF guys.
In the meanwhile, if you aren't making use of that new PrimeFaces feature at all, then just put Mojarra's own HeadRenderer
back as default head renderer by adding the following entry to faces-config.xml
:
<render-kit>
<renderer>
<component-family>javax.faces.Output</component-family>
<renderer-type>javax.faces.Head</renderer-type>
<renderer-class>com.sun.faces.renderkit.html_basic.HeadRenderer</renderer-class>
</renderer>
</render-kit>
Note: in case you're using MyFaces instead of Mojarra, obviously reference MyFaces own one instead.