1

I want to send a Pojo with a POST using jersey.

I understand there are 2 versions of Jersey: 1... and 2...

I'm adding code to an existing project which uses:

compile('com.sun.jersey:jersey-bundle:1.19')
compile('com.sun.jersey:jersey-json:1.19')
compile group:  'org.codehaus.jackson', name:'jackson-jaxrs', version: '1.1.1'

can I add the path to jersey 2.. as well and import the right classes whenever I need them in my classes?

Elad Benda
  • 35,076
  • 87
  • 265
  • 471

1 Answers1

0

Not directly, they will conflict. If you have specific (and well defined) usage of Jersey2 modules you can perhaps consider shading it (or Jersey1 or Both) - that way they would not conflict, but I recommend choosing 1 version if possible (probably Jersey2) and using it, since it has a lot of improvements and bugfixes over version 1 and will remove the conflict issues.

Here is a nice answer in SO that explains what shading is

Community
  • 1
  • 1
Moshe Eshel
  • 708
  • 7
  • 19