From 3ca6161bafa043e85855bcd5a8bec7309f567012 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Tue, 7 Apr 2020 15:59:33 +0200 Subject: [PATCH 01/17] Fix example helloworld-cdi2-se Signed-off-by: tvallin --- .../examples/helloworld/cdi2se/CounterResource.java | 10 +++++----- .../examples/helloworld/cdi2se/HelloWorldResource.java | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/CounterResource.java b/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/CounterResource.java index 519da948a2..488dcb9053 100644 --- a/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/CounterResource.java +++ b/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/CounterResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -10,12 +10,12 @@ package org.glassfish.jersey.examples.helloworld.cdi2se; +import org.jboss.weld.context.ejb.Ejb; + import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; -import javax.inject.Inject; - /** * Request-scoped resource counter. * @@ -24,10 +24,10 @@ @Path("counter") public class CounterResource { - @Inject + @Ejb private RequestScopedCounter requestScoped; - @Inject + @Ejb private ApplicationScopedCounter applicationScoped; @GET diff --git a/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/HelloWorldResource.java b/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/HelloWorldResource.java index ce9cba1fa3..8033ab5fe3 100644 --- a/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/HelloWorldResource.java +++ b/examples/helloworld-cdi2-se/src/main/java/org/glassfish/jersey/examples/helloworld/cdi2se/HelloWorldResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -10,9 +10,10 @@ package org.glassfish.jersey.examples.helloworld.cdi2se; +import org.jboss.weld.context.ejb.Ejb; + import java.security.Principal; -import javax.inject.Inject; import javax.inject.Singleton; import javax.validation.constraints.NotNull; import javax.ws.rs.GET; @@ -33,7 +34,7 @@ @Path("helloworld") public class HelloWorldResource { - @Inject + @Ejb private HelloBean helloBean; @GET From 64781d34f2f52afb631365ad97344027835a0433 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Tue, 7 Apr 2020 16:03:46 +0200 Subject: [PATCH 02/17] Fix example helloworld-pure-jax-rs ("enter" does not stop the app) Signed-off-by: tvallin --- .../org/glassfish/jersey/examples/helloworld/jaxrs/App.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/helloworld-pure-jax-rs/src/main/java/org/glassfish/jersey/examples/helloworld/jaxrs/App.java b/examples/helloworld-pure-jax-rs/src/main/java/org/glassfish/jersey/examples/helloworld/jaxrs/App.java index 3bb193c98e..24985a2418 100644 --- a/examples/helloworld-pure-jax-rs/src/main/java/org/glassfish/jersey/examples/helloworld/jaxrs/App.java +++ b/examples/helloworld-pure-jax-rs/src/main/java/org/glassfish/jersey/examples/helloworld/jaxrs/App.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -62,7 +62,7 @@ public static void main(String[] args) throws IOException, InterruptedException System.out.println("Application started.\n" + "Try accessing " + getBaseURI() + "helloworld in the browser.\n" - + "Hit enter to stop the application..."); + + "CTRL + C to stop the application...\n"); Thread.currentThread().join(); } From d21e7e5b7ea5c9d66578131b4e7547c454fe2bfe Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 10:11:06 +0200 Subject: [PATCH 03/17] Fix example helloworld-spring-annotations dependency missing Signed-off-by: tvallin --- examples/helloworld-spring-annotations/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/helloworld-spring-annotations/pom.xml b/examples/helloworld-spring-annotations/pom.xml index ad39b73174..2261d06b60 100644 --- a/examples/helloworld-spring-annotations/pom.xml +++ b/examples/helloworld-spring-annotations/pom.xml @@ -51,6 +51,11 @@ jersey-test-framework-provider-inmemory test + + javax.servlet + javax.servlet-api + 3.0.1 + From 0813d24944c7774b7788fc765868d94a7cbdd833 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 10:32:25 +0200 Subject: [PATCH 04/17] Fix example helloworld-weld dependency missing Signed-off-by: tvallin --- examples/helloworld-weld/README.MD | 2 +- examples/helloworld-weld/pom.xml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/helloworld-weld/README.MD b/examples/helloworld-weld/README.MD index e139e2178b..01276afba0 100644 --- a/examples/helloworld-weld/README.MD +++ b/examples/helloworld-weld/README.MD @@ -37,4 +37,4 @@ Run the example as follows: This deploys the example using [Grizzly](http://grizzly.java.net/) container. You can access the application at: -- \ No newline at end of file +- \ No newline at end of file diff --git a/examples/helloworld-weld/pom.xml b/examples/helloworld-weld/pom.xml index e23fe77970..ca28179bc4 100644 --- a/examples/helloworld-weld/pom.xml +++ b/examples/helloworld-weld/pom.xml @@ -57,6 +57,17 @@ org.glassfish.jersey.ext.cdi jersey-cdi1x + + + com.sun.xml.bind + jaxb-impl + + + + com.sun.istack + istack-commons-runtime + 3.0.8 + From 40847c53ca9570eb2c8ab3e713831a7ef16ca7ce Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 10:42:03 +0200 Subject: [PATCH 05/17] Fix example http-patch + dependency added to main pom Signed-off-by: tvallin --- examples/helloworld-weld/pom.xml | 1 - examples/http-patch/pom.xml | 8 ++++++++ pom.xml | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/helloworld-weld/pom.xml b/examples/helloworld-weld/pom.xml index ca28179bc4..9f53657893 100644 --- a/examples/helloworld-weld/pom.xml +++ b/examples/helloworld-weld/pom.xml @@ -66,7 +66,6 @@ com.sun.istack istack-commons-runtime - 3.0.8 diff --git a/examples/http-patch/pom.xml b/examples/http-patch/pom.xml index a446f52dc2..9e3ec62e75 100644 --- a/examples/http-patch/pom.xml +++ b/examples/http-patch/pom.xml @@ -67,6 +67,14 @@ jersey-grizzly-connector test + + com.sun.xml.bind + jaxb-impl + + + com.sun.istack + istack-commons-runtime + diff --git a/pom.xml b/pom.xml index 6fe2eef4eb..f7fe66a9fe 100644 --- a/pom.xml +++ b/pom.xml @@ -2043,6 +2043,12 @@ ${opentracing.version} + + com.sun.istack + istack-commons-runtime + ${istack.commons.runtime.version} + + From c44de3c77f1df40f58622c656651a6809a675870 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 10:51:15 +0200 Subject: [PATCH 06/17] Fix example json-jettison Signed-off-by: tvallin --- examples/json-jettison/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/json-jettison/pom.xml b/examples/json-jettison/pom.xml index ef6f6177b1..441a925dd9 100644 --- a/examples/json-jettison/pom.xml +++ b/examples/json-jettison/pom.xml @@ -46,6 +46,16 @@ pom test + + + com.sun.xml.bind + jaxb-impl + + + + com.sun.istack + istack-commons-runtime + From 2e08462d357c5c0656641facb1a9331f99c390fa Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 10:53:59 +0200 Subject: [PATCH 07/17] Fix example json-moxy Signed-off-by: tvallin --- examples/json-moxy/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/json-moxy/pom.xml b/examples/json-moxy/pom.xml index 7c1a749baa..b757394bf3 100644 --- a/examples/json-moxy/pom.xml +++ b/examples/json-moxy/pom.xml @@ -46,6 +46,16 @@ pom test + + + com.sun.xml.bind + jaxb-impl + + + + com.sun.istack + istack-commons-runtime + From a304d6497e6e644093241093e186e6387c81dd62 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 11:12:38 +0200 Subject: [PATCH 08/17] Fix example server-sent-events-jaxrs Signed-off-by: tvallin --- examples/server-sent-events-jaxrs/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server-sent-events-jaxrs/pom.xml b/examples/server-sent-events-jaxrs/pom.xml index 213d49f559..0aecdb3b20 100644 --- a/examples/server-sent-events-jaxrs/pom.xml +++ b/examples/server-sent-events-jaxrs/pom.xml @@ -54,7 +54,7 @@ org.codehaus.mojo exec-maven-plugin - App + org.glassfish.jersey.examples.sse.jaxrs.App From c9c80d7f6e57464d80d2efa48fc8c796aa9decd3 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 11:14:22 +0200 Subject: [PATCH 09/17] Fix example server-sent-events-jersey Signed-off-by: tvallin --- examples/server-sent-events-jersey/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server-sent-events-jersey/pom.xml b/examples/server-sent-events-jersey/pom.xml index f1595c0578..c9bb38e8ac 100644 --- a/examples/server-sent-events-jersey/pom.xml +++ b/examples/server-sent-events-jersey/pom.xml @@ -54,7 +54,7 @@ org.codehaus.mojo exec-maven-plugin - App + org.glassfish.jersey.examples.sse.jersey.App From 15dbc88ddb311eb7d4d7dd4b18b5ccb3388a9a53 Mon Sep 17 00:00:00 2001 From: Thibault Vallin Date: Wed, 8 Apr 2020 11:20:23 +0200 Subject: [PATCH 10/17] Update copyright Signed-off-by: tvallin --- examples/helloworld-spring-annotations/pom.xml | 2 +- examples/helloworld-weld/README.MD | 2 +- examples/helloworld-weld/pom.xml | 2 +- examples/http-patch/pom.xml | 2 +- examples/json-jettison/pom.xml | 2 +- examples/json-moxy/pom.xml | 2 +- examples/server-sent-events-jaxrs/pom.xml | 2 +- examples/server-sent-events-jersey/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/helloworld-spring-annotations/pom.xml b/examples/helloworld-spring-annotations/pom.xml index 2261d06b60..5989c4b442 100644 --- a/examples/helloworld-spring-annotations/pom.xml +++ b/examples/helloworld-spring-annotations/pom.xml @@ -1,7 +1,7 @@