Well, I guess in that case the answer is unfortunately "you don't" at the moment :( Jersey is deeply integrated into core of GF and as such simply replacing a few jars may not be sufficient. This problem involves not only Jersey, but also some transitive dependencies, such as HK2.
You can however get the newer build of GlassFish with newer version of Jersey:
http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/
We typically integrate every new release of Jersey into GlassFish within a couple of days from the release.The latest nightly builds already bundle Jersey 2.4
Marek
On 05 Nov 2013, at 18:42, cowwoc <cowwoc_at_bbs.darktech.org> wrote:
>
> This is actually more of a Glassfish question, meaning "How do I swap the Jersey implementation that ships with Glassfish to version X". The only thing Netbeans does is install Glassfish on your behalf. Once that's done you can alter it as you see fit.
>
> Gili
>
> On 05/11/2013 12:28 PM, Marek Potociar wrote:
>> Hi Tom,
>>
>> Please ask at NetBeans forums. Jersey team does not own the implementation of NetBeans support for JAX-RS.
>>
>> Marek
>>
>> On 21 Oct 2013, at 02:16, Tom Samplonius <tom_at_samplonius.org> wrote:
>>
>>> Netbeans 7.4 includes Glashfish 4.0, which includes Jersey 2.0. If you use the "New Project..." and generate a REST sample project, it adds all of the Glashfish 4.0 stuff, include Jersey. It includes this in the startup:
>>>
>>> INFO: Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...
>>>
>>> How do I remove Jersey 2.0 and add Jersey 2.3.1? There seems to be no easy way to do this in Netbeans.
>>>
>>>
>>> Tom
>>>
>