Skip to content

Commit

Permalink
Final changes for Jakarta REST API javax->jakarta transition.
Browse files Browse the repository at this point in the history
Exceluded modules and tests that use JSON-P, MOXY, Jackson-1 and MP REST client depending on javax.

Signed-off-by: Jan Supol <jan.supol@oracle.com>
  • Loading branch information
jansupol authored and senivam committed Apr 22, 2020
1 parent e262b48 commit 8959379
Show file tree
Hide file tree
Showing 102 changed files with 377 additions and 247 deletions.
4 changes: 2 additions & 2 deletions examples/bookmark-em/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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
Expand All @@ -16,7 +16,7 @@
<servlet-name>org.glassfish.jersey.examples.bookmark_em.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.bookmark_em.MyApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Expand Down
4 changes: 2 additions & 2 deletions examples/bookmark/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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
Expand All @@ -16,7 +16,7 @@
<servlet-name>org.glassfish.jersey.examples.bookmark.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.bookmark.MyApplication</param-value>
</init-param>
<init-param>
Expand Down
4 changes: 2 additions & 2 deletions examples/bookstore-webapp/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -33,7 +33,7 @@
<filter-name>org.glassfish.jersey.examples.bookstore.webapp.MyApplication</filter-name>
<filter-class>org.glassfish.jersey.servlet.ServletContainer</filter-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.bookstore.webapp.MyApplication</param-value>
</init-param>
<!-- pass to next filter if Jersey/App returns 404 -->
Expand Down
4 changes: 2 additions & 2 deletions examples/extended-wadl-webapp/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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
Expand All @@ -16,7 +16,7 @@
<servlet-name>org.glassfish.jersey.examples.extendedwadl.resources.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.extendedwadl.resources.MyApplication</param-value>
</init-param>
<init-param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class ExtendedWadlWebappOsgiTest {

private static final Logger LOGGER = Logger.getLogger(ExtendedWadlWebappOsgiTest.class.getName());
private static final String JAXRS_RUNTIME_DELEGATE_PROPERTY = "jakarta.ws.rs.ext.RuntimeDelegate";
private static final String JAXRS_CLIENT_BUILDER = "jakarta.ws.rs.client.ClientBuilder";

// we want to re-use the port number as set for Jersey test container to avoid CT port number clashes
private static final String testContainerPort = System.getProperty(TestProperties.CONTAINER_PORT);
Expand Down
4 changes: 2 additions & 2 deletions examples/freemarker-webapp/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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
Expand All @@ -20,7 +20,7 @@
<servlet-name>org.glassfish.jersey.examples.freemarker.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.freemarker.MyApplication</param-value>
</init-param>
<init-param>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
Expand All @@ -10,9 +10,9 @@

package org.glassfish.jersey.examples.groovy

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;

/**
* Example Groovy JAX-RS resource.
Expand Down
4 changes: 2 additions & 2 deletions examples/groovy/src/main/script/NewGroovyScript.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
Expand All @@ -13,7 +13,7 @@ package org.glassfish.jersey.examples.groovy
import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory
import org.glassfish.jersey.server.ResourceConfig

import javax.ws.rs.core.UriBuilder
import jakarta.ws.rs.core.UriBuilder

/*
* Groovy script to start the example app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
Expand All @@ -15,7 +15,7 @@ import org.glassfish.jersey.test.JerseyTest
import org.glassfish.jersey.test.TestProperties
import org.junit.Test

import javax.ws.rs.core.Response
import jakarta.ws.rs.core.Response
import static org.junit.Assert.assertEquals

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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
Expand Down Expand Up @@ -30,7 +30,7 @@
<servlet-name>SpringApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.helloworld.spring.MyApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Expand Down
4 changes: 2 additions & 2 deletions examples/helloworld-webapp/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 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
Expand All @@ -16,7 +16,7 @@
<servlet-name>org.glassfish.jersey.examples.helloworld_servlet.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.helloworld.webapp.MyApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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
Expand All @@ -16,7 +16,7 @@
<servlet-name>org.glassfish.jersey.examples.jsonp.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.jsonp.MyApplication</param-value>
</init-param>
<init-param>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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
Expand All @@ -17,7 +17,7 @@
<servlet-name>managedclientsimple.resources.ManagedClientApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.managedclientsimple.resources.ManagedClientApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 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
Expand All @@ -16,7 +16,7 @@
<servlet-name>org.glassfish.jersey.examples.managedclient.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.managedclient.MyApplication</param-value>
</init-param>
<init-param>
Expand Down
4 changes: 2 additions & 2 deletions examples/multipart-webapp/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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
Expand All @@ -20,7 +20,7 @@
<servlet-name>org.glassfish.jersey.examples.multipart.resources.MyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.multipart.webapp.MyApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Expand Down
4 changes: 4 additions & 0 deletions examples/osgi-http-service/bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<description>OSGi HttpService example bundle</description>

<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public abstract class AbstractHttpServiceTest {
private static final URI baseUri = UriBuilder.fromUri("http://localhost").port(port).path(CONTEXT).build();
private static final String BundleLocationProperty = "jersey.bundle.location";
private static final String JAXRS_RUNTIME_DELEGATE_PROPERTY = "jakarta.ws.rs.ext.RuntimeDelegate";
private static final String JAXRS_CLIENT_BUILDER = "jakarta.ws.rs.client.ClientBuilder";

private static final Logger LOGGER = Logger.getLogger(AbstractHttpServiceTest.class.getName());

Expand Down
24 changes: 12 additions & 12 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<module>cdi-webapp</module>
<module>clipboard</module>
<module>clipboard-programmatic</module>
<module>declarative-linking</module>
<module>entity-filtering</module>
<module>entity-filtering-selectable</module>
<module>entity-filtering-security</module>
<!-- <module>declarative-linking</module> MOXY-->
<!-- <module>entity-filtering</module> MOXY-->
<!-- <module>entity-filtering-selectable</module> MOXY-->
<!-- <module>entity-filtering-security</module> MOXY-->
<module>extended-wadl-webapp</module>
<module>exception-mapping</module>
<!--<module>feed-combiner-java8-webapp</module>-->
Expand All @@ -80,7 +80,7 @@
<module>helloworld-weld</module>
<module>helloworld-spring-webapp</module>
<module>helloworld-spring-annotations</module>
<module>http-patch</module>
<!-- <module>http-patch</module> MOXY -->
<module>http-trace</module>
<module>https-clientserver-grizzly</module>
<module>https-server-glassfish</module>
Expand All @@ -90,19 +90,19 @@
<module>jersey-ejb</module>
<module>json-binding-webapp</module>
<module>json-jackson</module>
<module>json-jackson1</module>
<!-- <module>json-jackson1</module> -->
<module>json-jettison</module>
<module>json-moxy</module>
<module>json-processing-webapp</module>
<module>json-with-padding</module>
<!-- <module>json-moxy</module> MOXY -->
<!-- <module>json-processing-webapp</module> JSONP-->
<!-- <module>json-with-padding</module> MOXY -->
<module>managed-beans-webapp</module>
<module>managed-client</module>
<module>managed-client-webapp</module>
<module>managed-client-simple-webapp</module>
<!--<module>monitoring-webapp</module>-->
<module>multipart-webapp</module>
<module>open-tracing</module>
<module>osgi-helloworld-webapp</module>
<!-- <module>osgi-helloworld-webapp</module> MOXY-->
<module>osgi-http-service</module>
<module>oauth-client-twitter</module>
<!--<module>oauth2-client-google-webapp</module>-->
Expand All @@ -119,11 +119,11 @@
<!--<module>sparklines</module>-->
<module>sse-item-store-jersey-webapp</module>
<module>sse-item-store-jaxrs-webapp</module>
<module>sse-twitter-aggregator</module>
<!-- <module>sse-twitter-aggregator</module> MOXY-->
<module>system-properties-example</module>
<!--<module>tone-generator</module>-->
<module>webapp-example-parent</module>
<module>xml-moxy</module>
<!-- <module>xml-moxy</module> MOXY-->
</modules>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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
Expand All @@ -19,7 +19,7 @@
<servlet-name>async-app</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-name>jakarta.ws.rs.Application</param-name>
<param-value>org.glassfish.jersey.examples.server.async.AsyncJaxrsApplication</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Expand Down
2 changes: 1 addition & 1 deletion ext/microprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<modules>
<!-- <module>mp-rest-client</module>-->
<!-- <module>mp-config</module>-->
<module>mp-config</module>
</modules>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,9 +20,9 @@ import org.apache.maven.plugin.MojoExecutionException
import org.apache.maven.plugins.annotations.Parameter
import org.glassfish.jersey.client.ClientProperties

import javax.ws.rs.client.Client
import javax.ws.rs.client.ClientBuilder
import javax.ws.rs.client.WebTarget
import jakarta.ws.rs.client.Client
import jakarta.ws.rs.client.ClientBuilder
import jakarta.ws.rs.client.WebTarget

/**
* Common functionality of Redeploy Mojos.
Expand Down
Loading

0 comments on commit 8959379

Please sign in to comment.