This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
/
dependencies.html
517 lines (508 loc) · 34.1 KB
/
dependencies.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
http://glassfish.java.net/public/CDDL+GPL_1_1.html
or packager/legal/LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
file and include the License file at packager/legal/LICENSE.txt.
GPL Classpath Exception:
Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the GPL Version 2 section of the License
file that accompanied this code.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"
Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>Dependencies</TITLE>
<META NAME="GENERATOR" CONTENT="StarOffice 9 (Unix)">
<META NAME="CREATED" CONTENT="0;0">
<META NAME="CHANGED" CONTENT="20090824;14171500">
<META NAME="Info 1" CONTENT="">
<META NAME="Info 2" CONTENT="">
<META NAME="Info 3" CONTENT="">
<META NAME="Info 4" CONTENT="">
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H1>Dependencies</H1>
<P>Jersey is built, assembled and installed using Maven. Jersey is
deployed to the Java.Net maven repository at the following location:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey">http://download.java.net/maven/2/</A></BLOCKQUOTE>
<P>The Jersey modules can be browsed at the following location:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey">http://download.java.net/maven/2/com/sun/jersey/</A></BLOCKQUOTE>
<P>Jars, Jar sources, Jar JavaDoc and samples are all available on
the java.net maven repository.
</P>
<P>For getting started with a simple example please read the <A HREF="getting-started.html">getting
started</A> document. For an overview of many JAX-RS features please
read the <A HREF="https://wikis.oracle.com/display/Jersey/Overview+of+JAX-RS+1.0+Features">overview</A>
document.</P>
<P>A zip file containing all maven-based samples can be obtained
<A HREF="http://download.java.net/maven/2/com/sun/jersey/samples/jersey-samples/1.1.3-ea-SNAPSHOT/jersey-samples-1.1.3-ea-SNAPSHOT-project.zip">here</A>.
Individual zip files for each sample may be found by browsing the
<A HREF="http://download.java.net/maven/2/com/sun/jersey/samples/">samples</A>
directory.
</P>
<P>An application depending on Jersey requires that it in turn
includes the set of jars that Jersey depends on. Jersey has a
pluggable component architecture so the set of jars required to be
include in the class path can be different for each application.
</P>
<P>Developers using maven are likely to find it easier to include and
manage dependencies of their applications than developers using ant
or other build technologies. This document will explain to both maven
and non-maven developers how to depend on Jersey for their
application. Ant developers are likely to find the <A HREF="http://maven.apache.org/ant-tasks.html">Ant
Tasks for Maven</A> very useful. For the convenience of non-maven
developers the following are provided:</P>
<UL>
<LI><P>A <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-archive/1.1.3-ea-SNAPSHOT/jersey-archive-1.1.3-ea-SNAPSHOT.zip">zip
of Jersey</A> containing the Jersey jars, core dependencies (it does
not provide dependencies for third party jars beyond the those for
JSON support) and JavaDoc.</P>
<LI><P>A jersey bundle jar to avoid the dependency management of
multiple jersey-based jars.</P>
</UL>
<P>Jersey's runtime dependences are categorized into the following:</P>
<UL>
<LI><P>Core server. The minimum set of dependences that Jersey
requires for the server.</P>
<LI><P>Core client. The minimum set of dependences that Jersey
requires for the client.</P>
<LI><P>Container. The set of container dependences. Each container
provider has it's own set of dependences.</P>
<LI><P>Entity. The set of entity dependencies. Each entity provider
has it's own set of dependences.</P>
<LI><P>Tools. The set of dependencies required for runtime tooling.</P>
<LI><P>Spring. The set of dependencies required for Spring.</P>
<LI><P>Guice. The set of dependencies required for Guice.</P>
</UL>
<P>All dependences in this documented are referenced by hyper-links</P>
<H2>Core server</H2>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-server/1.1.3-ea-SNAPSHOT/jersey-server-1.1.3-ea-SNAPSHOT.pom">jersey-server</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
And the following repositories need to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
<repository>
<id>maven-repository.dev.java.net</id>
<name>Java.net Maven 1 Repository (legacy)</name>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
</repository></PRE><P>
Non-maven developers require:
</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-server/1.1.3-ea-SNAPSHOT/jersey-server-1.1.3-ea-SNAPSHOT.jar">jersey-server.jar</A>,
<A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-core/1.1.3-ea-SNAPSHOT/jersey-core-1.1.3-ea-SNAPSHOT.jar">jersey-core.jar</A>,
<A HREF="http://download.java.net/maven/2/javax/ws/rs/jsr311-api/1.1/jsr311-api-1.1.jar">jsr311-api.jar</A>,
<A HREF="http://repo1.maven.org/maven2/asm/asm/3.1/asm-3.1.jar">asm.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">or, if using
the jersey-bundle:</BLOCKQUOTE>
<BLOCKQUOTE><A NAME="DDE_LINK2"></A><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-bundle/1.1.3-ea-SNAPSHOT/jersey-bundle-1.1.3-ea-SNAPSHOT.jar">jersey-bundle.jar</A>,
<A HREF="http://download.java.net/maven/2/javax/ws/rs/jsr311-api/1.1/jsr311-api-1.1.jar">jsr311-api.jar</A>,
<A HREF="http://repo1.maven.org/maven2/asm/asm/3.1/asm-3.1.jar">asm.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">For Ant
developers the <A HREF="http://maven.apache.org/ant-tasks.html">Ant
Tasks for Maven</A> may be used to add the following to the ant
document such that the dependencies do not need to be downloaded
explicitly:</BLOCKQUOTE>
<PRE STYLE="margin-left: 0.79in"><artifact:dependencies pathId="dependency.classpath">
<dependency groupId="com.sun.jersey"
artifactId="jersey-server"
version="1.1.3-ea-SNAPSHOT"/>
<artifact:remoteRepository id="maven2-repository.dev.java.net"
url="http://download.java.net/maven/2/" />
<artifact:remoteRepository id="maven-repository.dev.java.net"
url="http://download.java.net/maven/1"
layout="legacy" />
</artifact:dependencies></PRE><BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">
The path id “dependency.classpath” may then be referenced as the
classpath to be used for compiling or executing.</BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">Specifically
the <A HREF="http://repo1.maven.org/maven2/asm/asm/3.1/asm-3.1.jar">asm.jar</A>
dependency is required when either of the following
<A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/jersey/com/sun/jersey/api/core/ResourceConfig.html"><FONT FACE="Courier New, monospace">com.sun.jersey.api.core.ResourceConfig</FONT></A>
implementations are utilized:
</BLOCKQUOTE>
<UL>
<LI><P><A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/jersey/com/sun/jersey/api/core/ClasspathResourceConfig.html"><FONT FACE="Courier New, monospace">com.sun.jersey.api.core.ClasspathResourceConfig</FONT></A>;
or</P>
<LI><P><A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/jersey/com/sun/jersey/api/core/PackagesResourceConfig.html"><FONT FACE="Courier New, monospace">com.sun.jersey.api.core.PackagesResourceConfig</FONT></A></P>
</UL>
<P>By default Jersey will utilize the <A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/jersey/com/sun/jersey/api/core/ClasspathResourceConfig.html"><FONT FACE="Courier New, monospace">ClasspathResourceConfig</FONT></A>
if an alternative is not specified. If an alternative is specified
that does not depend on the asm.jar then it is no longer necessary to
include the asm.jar in the minimum set of required jars.</P>
<H2>Core client</H2>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-client/1.1.3-ea-SNAPSHOT/jersey-client-1.1.3-ea-SNAPSHOT.pom">jersey-client</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
Non-maven developers require:
</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-client/1.1.3-ea-SNAPSHOT/jersey-client-1.1.3-ea-SNAPSHOT.jar">jersey-client.jar</A>,
<A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-core/1.1.3-ea-SNAPSHOT/jersey-core-1.1.3-ea-SNAPSHOT.jar">jersey-core.jar</A>,
<A HREF="http://download.java.net/maven/2/javax/ws/rs/jsr311-api/1.1/jsr311-api-1.1.jar">jsr311-api.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">or, if using
the jersey-bundle:</BLOCKQUOTE>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-bundle/1.1.3-ea-SNAPSHOT/jersey-bundle-1.1.3-ea-SNAPSHOT.jar">jersey-bundle.jar</A>,
<A HREF="http://download.java.net/maven/2/javax/ws/rs/jsr311-api/1.1/jsr311-api-1.1.jar">jsr311-api.jar</A></BLOCKQUOTE>
<P>The use of client with the Apache HTTP client to make HTTP request
and receive HTTP responses requires a dependency on the
<A HREF="http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-apache-client/1.1.3-ea-SNAPSHOT/jersey-apache-client-1.1.3-ea-SNAPSHOT.pom">jersey-apache-client</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><H2>
Container</H2>
<H3>Grizzly HTTP Web server</H3>
<P><A NAME="DDE_LINK1"></A><A NAME="DDE_LINK5"></A>Maven developers,
deploying an application using the Grizzly HTTP Web server, require a
dependency on the <A HREF="http://download.java.net/maven/2/com/sun/grizzly/grizzly-servlet-webserver/1.9.8/grizzly-servlet-webserver-1.9.8.pom">grizzly-servlet-webserver</A>
module.</P>
<P>Non-maven developers require:</P>
<BLOCKQUOTE><A NAME="DDE_LINK4"></A><A HREF="http://download.java.net/maven/2/com/sun/grizzly/grizzly-servlet-webserver/1.9.8/grizzly-servlet-webserver-1.9.8.jar">grizzly-servlet-webserver.jar</A></BLOCKQUOTE>
<H3>Simple HTTP Web server</H3>
<P>Maven developers, deploying an application using the Simple HTTP
Web server, require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-simple/1.1.3-ea-SNAPSHOT/jersey-simple-1.1.3-ea-SNAPSHOT.pom">jersey-simple</A>
module.</P>
<H3>Light weight HTTP server</H3>
<P><A NAME="DDE_LINK3"></A>Maven developers, using Java SE 5 and
deploying an application using the light weight HTTP server, require
a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/net/httpserver/http/20070405/http-20070405.pom">http</A>
module.</P>
<P>Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/net/httpserver/http/20070405/http-20070405.jar">http.jar</A></BLOCKQUOTE>
<P>Deploying an application using the light weight HTTP server with
Java SE 6 requires no additional dependences.</P>
<H3>Servlet</H3>
<P>Deploying an application on a servlet container requires a
deployment dependency with that container.</P>
<P>See the Java documentation <A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/jersey/com/sun/jersey/spi/container/servlet/package-summary.html">here</A>
on how to configure the servlet container.</P>
<P>Using servlet:</P>
<BLOCKQUOTE><FONT FACE="Courier New, monospace">com.sun.jersey.spi.container.servlet.ServletContainer</FONT></BLOCKQUOTE>
<P><A NAME="DDE_LINK7"></A>requires no additional dependences.</P>
<P>Maven developers using servlet:</P>
<BLOCKQUOTE><FONT FACE="Courier New, monospace">com.sun.jersey.server.impl.container.servlet.ServletAdaptor</FONT></BLOCKQUOTE>
<P>in a non-EE 5 servlet require a dependency on the <A HREF="http://download.java.net/maven/1/javax.persistence/poms/persistence-api-1.0.2.pom">persistence-api</A>
module.</P>
<P>Non-Maven developers require:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/1/javax.persistence/jars/persistence-api-1.0.2.jar">persistence-api.jar</A></BLOCKQUOTE>
<H2>Entity</H2>
<H3>JAXB</H3>
<P>XML serialization support of Java types that are JAXB beans
requires a dependency on the JAXB reference implementation version
2.x or higher (see later for specific version constraints with
respect to JSON support). Deploying an application for XML
serialization support using JAXB with Java SE 6 requires no
additional dependences, since Java SE 6 ships with JAXB 2.x support.</P>
<P>Maven developers, using Java SE 5, require a dependency on the
<A HREF="http://download.java.net/maven/1/com.sun.xml.bind/poms/jaxb-impl-2.1.12.pom">jaxb-impl</A>
module.</P>
<P>Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/1/com.sun.xml.bind/jars/jaxb-impl-2.1.12.jar">jaxb-impl.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.bind/jars/jaxb-api-2.1.jar">jaxb-api.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.activation/jars/activation-1.1.jar">activation.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.stream/jars/stax-api-1.0-2.jar">stax-api.jar</A></BLOCKQUOTE>
<P>Maven developers, using Java SE 5, that are consuming or producing
<FONT FACE="Courier New, monospace">T[]</FONT>, <FONT FACE="Courier New, monospace">List<T></FONT>
or <FONT FACE="Courier New, monospace">Collection<T></FONT>
where <FONT FACE="Courier New, monospace">T</FONT> is a JAXB bean
require a dependency on a StAX implementation, such as Woodstox
version 3.2.1 or greater using the following dependency:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>3.2.1</version>
</dependency></PRE><P>
Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://repo1.maven.org/maven2/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.jar">wstx-asl-3.2.1.jar</A></BLOCKQUOTE>
<P>Maven developers, using JSON serialization support of JAXB beans
when using the MIME media type "application/json" require a
dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-json/1.1.3-ea-SNAPSHOT/jersey-json-1.1.3-ea-SNAPSHOT.pom">jersey-json</A>
module (no explicit dependency on jaxb-impl is required). This module
depends on the JAXB reference implementation version 2.1.12 or
greater, and such a version is required when enabling support for the
JAXB natural JSON convention. For all other supported JSON
conventions any JAXB 2.x version may be utilized. The following
dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://repository.codehaus.org/org/codehaus/jackson/jackson-core-asl/1.1.1/jackson-core-asl-1.1.1.jar">jackson-core-asl.jar</A>,
<A HREF="http://repo1.maven.org/maven2/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar">jettison.jar</A>,
<A HREF="http://download.java.net/maven/1/com.sun.xml.bind/jars/jaxb-impl-2.1.12.jar">jaxb-impl.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.bind/jars/jaxb-api-2.1.jar">jaxb-api.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.activation/jars/activation-1.1.jar">activation.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.stream/jars/stax-api-1.0-2.jar">stax-api.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">and
additionally, if not depending on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-bundle/1.1.3-ea-SNAPSHOT/jersey-bundle-1.1.3-ea-SNAPSHOT.jar">jersey-bundle.jar</A>,
non-maven developers require:</BLOCKQUOTE>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-json/1.1.3-ea-SNAPSHOT/jersey-json-1.1.3-ea-SNAPSHOT.jar">jersey-json.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">Maven
developers, using Fast Infoset serialization support of JAXB beans
with using the MIME media type "application/fastinfoset"
require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-fastinfoset/1.1.3-ea-SNAPSHOT/jersey-fastinfoset-1.1.3-ea-SNAPSHOT.pom">jersey-fastinfoset</A>
module (no dependency on jaxb-impl is required). The following
dependency needs to be added to the pom:</BLOCKQUOTE>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-fastinfoset</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/1/com.sun.xml.fastinfoset/jars/FastInfoset-1.2.2.jar">FastInfoset.jar</A>,
<A HREF="http://download.java.net/maven/1/com.sun.xml.bind/jars/jaxb-impl-2.1.12.jar">jaxb-impl.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.bind/jars/jaxb-api-2.1.jar">jaxb-api.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.activation/jars/activation-1.1.jar">activation.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.stream/jars/stax-api-1.0-2.jar">stax-api.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">and
additionally, if not depending on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-bundle/1.1.3-ea-SNAPSHOT/jersey-bundle-1.1.3-ea-SNAPSHOT.jar">jersey-bundle.jar</A>,
non-maven developers require:</BLOCKQUOTE>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-fastinfoset/1.1.3-ea-SNAPSHOT/jersey-fastinfoset-1.1.3-ea-SNAPSHOT.jar">jersey-fastinfoset.jar</A></BLOCKQUOTE>
<H3>Atom</H3>
<P>The use of the Java types <FONT FACE="Courier New, monospace">org.apache.abdera.model.{Categories,
Entry, Feed, Service}</FONT> requires a dependency on Apache Abdera.</P>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-atom-abdera/1.1.3-ea-SNAPSHOT/jersey-atom-abdera-1.1.3-ea-SNAPSHOT.pom">jersey-atom-abdera</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-atom-abdera</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
The use of the Java types <FONT FACE="Courier New, monospace">com.sun.syndication.feed.atom.Entry</FONT>
and <FONT FACE="Courier New, monospace">com.sun.syndication.feed.atom.Feed</FONT>
requires a dependency on ROME version 0.9 or higher.</P>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-atom/1.1.3-ea-SNAPSHOT/jersey-atom-1.1.3-ea-SNAPSHOT.pom">jersey-atom</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-atom</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/1/rome/jars/rome-0.9.jar">rome.jar</A>,
<A HREF="http://repo1.maven.org/maven2/jdom/jdom/1.0/jdom-1.0.jar">jdom.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">and
additionally, if not depending on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-bundle/1.1.3-ea-SNAPSHOT/jersey-bundle-1.1.3-ea-SNAPSHOT.jar">jersey-bundle.jar</A>,
non-maven developers require:</BLOCKQUOTE>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-atom/1.1.3-ea-SNAPSHOT/jersey-atom-1.1.3-ea-SNAPSHOT.jar">jersey-atom.jar</A></BLOCKQUOTE>
<H3>JSON</H3>
<P>The use of the Java types <FONT FACE="Courier New, monospace">org.codehaus.jettison.json.JSONObject</FONT>
and <FONT FACE="Courier New, monospace">org.codehaus.jettison.json.JSONArray</FONT>
requires Jettison version 1.0 or higher.</P>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-json/1.1.3-ea-SNAPSHOT/jersey-json-1.1.3-ea-SNAPSHOT.pom">jersey-json</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://repo1.maven.org/maven2/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar">jettison.jar</A></BLOCKQUOTE>
<BLOCKQUOTE STYLE="margin-left: 0in; margin-right: 0in">and
additionally, if not depending on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-bundle/1.1.3-ea-SNAPSHOT/jersey-bundle-1.1.3-ea-SNAPSHOT.jar">jersey-bundle.jar</A>,
non-maven developers require:</BLOCKQUOTE>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-json/1.1.3-ea-SNAPSHOT/jersey-json-1.1.3-ea-SNAPSHOT.jar">jersey-json.jar</A></BLOCKQUOTE>
<H3>Mail and MIME multipart</H3>
<P>The use of the Java type <FONT FACE="Courier New, monospace">javax.mail.internet.MimeMultipart</FONT>
with Java SE 5 or 6 requires Java Mail version 1.4 or higher.</P>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/1/javax.mail/poms/mail-1.4.pom">java-mail</A>
module.</P>
<P>Non-maven developers require:</P>
<BLOCKQUOTE><A NAME="DDE_LINK"></A><A HREF="http://download.java.net/maven/1/javax.mail/jars/mail-1.4.jar">mail.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.activation/jars/activation-1.1.jar">activation.jar</A></BLOCKQUOTE>
<P>The use of the Java type <FONT FACE="Courier New, monospace">javax.mail.internet.MimeMultipart</FONT>
with Java EE 5 requires no additional dependencies.</P>
<P>Jersey ships with a high-level MIME multipart API. Maven
developers requires a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-multipart/1.1.3-ea-SNAPSHOT/jersey-multipart-1.1.3-ea-SNAPSHOT.pom">jersey-multipart</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
Non-maven developers require:</P>
<BLOCKQUOTE><A NAME="DDE_LINK6"></A><A HREF="http://download.java.net/maven/2/org/jvnet/mimepull/1.3/mimepull-1.3.jar">mimepull.jar</A>,
<A HREF="http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-multipart/1.1.3-ea-SNAPSHOT/jersey-multipart-1.1.3-ea-SNAPSHOT.jar">jersey-multipart.jar</A></BLOCKQUOTE>
<H3>Activation</H3>
<P>The use of the Java type <FONT FACE="Courier New, monospace">javax.activation.DataSource</FONT>
with Java SE 5 requires Java Activation 1.1 or higher.</P>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/1/javax.activation/poms/activation-1.1.pom">activation</A>
module.</P>
<P>Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/1/javax.activation/jars/activation-1.1.jar">activation.jar</A></BLOCKQUOTE>
<P>The use of the Java type <FONT FACE="Courier New, monospace">javax.activation.DataSource</FONT>
with Java SE 6 and Java EE 5 requires no additional dependencies.</P>
<H2>Tools</H2>
<P>By default WADL for resource classes is generated dynamically at
runtime. WADL support requires a dependency on the JAXB reference
implementation version 2.x or higher. Deploying an application for
WADL support with Java SE 6 requires no additional dependences, since
Java SE 6 ships with JAXB 2.x support.</P>
<P>Maven developers, using Java SE 5, require a dependency on the
<A HREF="http://download.java.net/maven/1/com.sun.xml.bind/poms/jaxb-impl-2.1.12.pom">jaxb-impl</A>
module.</P>
<P>Non-maven developers require:</P>
<BLOCKQUOTE><A HREF="http://download.java.net/maven/1/com.sun.xml.bind/jars/jaxb-impl-2.1.12.jar">jaxb-impl.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.bind/jars/jaxb-api-2.1.jar">jaxb-api.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.activation/jars/activation-1.1.jar">activation.jar</A>,
<A HREF="http://download.java.net/maven/1/javax.xml.stream/jars/stax-api-1.0-2.jar">stax-api.jar</A>
</BLOCKQUOTE>
<P>If the above dependencies are not present then WADL generation is
disabled and a warning will be logged.</P>
<P>The WADL ant task requires the same set of dependences as those
for runtime WADL support.</P>
<H2>Spring</H2>
<P>Maven developers, using Spring 2.0.x or Spring 2.5.x, require a
dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-spring/1.1.3-ea-SNAPSHOT/jersey-spring-1.1.3-ea-SNAPSHOT.pom">jersey-spring</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-spring</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
See the Java documentation <A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/contribs/jersey-spring/com/sun/jersey/spi/spring/container/servlet/package-summary.html">here</A>
on how to integrate Jersey-based Web applications with Spring.</P>
<H2>Guice</H2>
<P>Maven developers, using Guice 2.0, require a dependency on the
<A HREF="http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-guice/1.1.3-ea-SNAPSHOT/jersey-guice-1.1.3-ea-SNAPSHOT.pom">jersey-guice</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-guice</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
</dependency></PRE><P>
See the Java documentation <A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/contribs/jersey-guice/com/sun/jersey/guice/spi/container/servlet/package-summary.html">here</A>
on how to integrate Jersey-based Web applications with Spring.</P>
<P>Guice support depends on the Guice artifacts distributed with
<A HREF="http://code.google.com/p/guiceyfruit/">GuiceyFruit</A> a set
of extensions on top of Guice 2.0, such as support for Java EE
artifacts like <FONT FACE="Courier New, monospace">@PostConstruct</FONT>/<FONT FACE="Courier New, monospace">@PreDestroy</FONT>,
<FONT FACE="Courier New, monospace">@Resource</FONT> and
<FONT FACE="Courier New, monospace">@PersistenceContext</FONT>. To
avail of GuiceyFruit features add the following dependency and
repository to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>org.guiceyfruit</groupId>
<artifactId>guiceyfruit</artifactId>
<version>2.0-beta-6</version>
</dependency>
...
<repository>
<id>guice-maven</id>
<name>guice maven</name>
<url><A HREF="http://guiceyfruit.googlecode.com/svn/repo/releases">http://guiceyfruit.googlecode.com/svn/repo/releases</A></url>
</repository></PRE><P>
<BR><BR>
</P>
<H2>Jersey Test Framework</H2>
<P><SPAN STYLE="background: #ffff00">NOTE that breaking changes have
occurred between 1.1.1-ea and 1.1.2-ea. See the end of this section
for details.</SPAN></P>
<P>Jersey Test Framework allows you to test your RESTful Web Services
on a wide range of containers. It supports light-weight containers
such as Grizzly, Embedded GlassFish, and the Light Weight HTTP Server
in addition to regular web containers such as GlassFish and Tomcat.
Developers may plug in their own containers.</P>
<P>A developer may write tests using the Junit 4.x framework can
extend from the abstract <A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/jersey-test-framework/com/sun/jersey/test/framework/JerseyTest.html">JerseyTest</A>
class.</P>
<P>Maven developers require a dependency on the <A HREF="http://download.java.net/maven/2/com/sun/jersey/jersey-test-framework/1.1.3-ea-SNAPSHOT/jersey-test-framework-1.1.3-ea-SNAPSHOT.pom">jersey-test-framework</A>
module. The following dependency needs to be added to the pom:</P>
<PRE STYLE="margin-left: 0.79in"><dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-test-framework</artifactId>
<version>1.1.3-ea-SNAPSHOT</version>
<scope>test</scope>
</dependency></PRE><P>
When utilizing an embedded container this framework can manage
deployment and testing of your web services. However, the framework
currently doesn't support instantiating and deploying on external
containers.
</P>
<P><SPAN STYLE="font-weight: normal">The test framework provides the
following test container factories:</SPAN></P>
<UL>
<LI><P STYLE="margin-bottom: 0in">com.sun.jersey.test.framework.spi.container.http.HTTPContainerFactory<BR>For
testing with the Light Weight HTTP server.</P>
<LI><P STYLE="margin-bottom: 0in">com.sun.jersey.test.framework.spi.container.inmemory.InMemoryTestContainerFactory<BR>For
testing in memory without using HTTP.</P>
<LI><P STYLE="margin-bottom: 0in">com.sun.jersey.test.framework.spi.container.grizzly.GrizzlyTestContainerFactory<BR>For
testing with low-level Grizzly.</P>
<LI><P STYLE="margin-bottom: 0in">com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory<BR>For
testing with Web-based Grizzly.</P>
<LI><P STYLE="margin-bottom: 0in">com.sun.jersey.test.framework.spi.container.embedded.glassfish.EmbeddedGlassFishTestContainerFactory<BR>For
testing with embedded GlassFish v3.
</P>
<LI><P>com.sun.jersey.test.framework.spi.container.external.ExternalTestContainerFactory<BR>For
testing with application deployed externally, for example to
GlassFish or Tomcat.
</P>
</UL>
<P><SPAN STYLE="font-weight: normal">The system property
</SPAN><SPAN STYLE="font-weight: normal"><FONT FACE="Courier New, monospace">test.containerFactory</FONT></SPAN><SPAN STYLE="font-weight: normal">
is utilized to declare the default test container factory that shall
be used for testing, the value of which is the fully qualified class
name of a test container factory class. If the property is not
declared then the GrizzlyWebTestContainerFactory is utilized as
default test container factory.</SPAN></P>
<P>To test a maven-based web project with an external container such
as GlassFish, create the war file then deploy as follows (assuming
that the pom file is set up for deployment):</P>
<PRE STYLE="margin-left: 0.79in">mvn clean package -Dmaven.test.skip=true
</PRE><P STYLE="font-weight: normal">
Then execute the tests as follows:</P>
<PRE STYLE="margin-left: 0.79in">mvn test -Dtest.containerFactory=com.sun.jersey.test.framework.spi.container.external.ExternalTestContainerFactory -DJERSEY_HTTP_PORT=<HTTP_PORT>
</PRE><P>
<SPAN STYLE="background: #ffff00">Breaking changes from 1.1.1-ea to
1.1.2-ea</SPAN></P>
<P>The maven project groupId has changed from
“com.sun.jersey.test.framework” to “com.sun.jersey”.</P>
<P>The extending of Jersey unit test and configuration has changed.
See <A HREF="https://jersey.dev.java.net/nonav/apidocs/1.1.3-ea-SNAPSHOT/jersey-test-framework/com/sun/jersey/test/framework/package-summary.html">here</A>
for an example.</P>
<P>See the blog entry on <A HREF="http://blogs.sun.com/naresh/entry/jersey_test_framework_makes_it">Jersey
Test Framework</A> for detailed instructions on how to use 1.1.1-ea
version of the framework in your application.</P>
</BODY>
</HTML>