Skip to content

Commit 6d8723d

Browse files
authored
Merge pull request #170 from OpenLiberty/staging
Merge staging to prod - Version update mp5 (#167)
2 parents e987186 + d43ac68 commit 6d8723d

40 files changed

+320
-414
lines changed

Diff for: README.adoc

+68-170
Large diffs are not rendered by default.

Diff for: finish/pom.xml

+11-11
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,41 @@
2323
<dependency>
2424
<groupId>jakarta.platform</groupId>
2525
<artifactId>jakarta.jakartaee-api</artifactId>
26-
<version>8.0.0</version>
26+
<version>9.1.0</version>
2727
<scope>provided</scope>
2828
</dependency>
2929
<dependency>
3030
<groupId>org.eclipse.microprofile</groupId>
3131
<!-- tag::microprofile[] -->
3232
<artifactId>microprofile</artifactId>
3333
<!-- end::microprofile[] -->
34-
<version>4.1</version>
34+
<version>5.0</version>
3535
<type>pom</type>
3636
<scope>provided</scope>
3737
</dependency>
3838
<!-- For tests -->
3939
<dependency>
4040
<groupId>org.junit.jupiter</groupId>
4141
<artifactId>junit-jupiter</artifactId>
42-
<version>5.8.1</version>
42+
<version>5.8.2</version>
4343
<scope>test</scope>
4444
</dependency>
4545
<dependency>
46-
<groupId>org.apache.cxf</groupId>
47-
<artifactId>cxf-rt-rs-client</artifactId>
48-
<version>3.4.5</version>
46+
<groupId>org.jboss.resteasy</groupId>
47+
<artifactId>resteasy-client</artifactId>
48+
<version>6.0.0.Final</version>
4949
<scope>test</scope>
5050
</dependency>
5151
<dependency>
52-
<groupId>org.apache.cxf</groupId>
53-
<artifactId>cxf-rt-rs-extension-providers</artifactId>
54-
<version>3.4.5</version>
52+
<groupId>org.jboss.resteasy</groupId>
53+
<artifactId>resteasy-json-binding-provider</artifactId>
54+
<version>6.0.0.Final</version>
5555
<scope>test</scope>
5656
</dependency>
5757
<dependency>
5858
<groupId>org.glassfish</groupId>
59-
<artifactId>javax.json</artifactId>
60-
<version>1.1.4</version>
59+
<artifactId>jakarta.json</artifactId>
60+
<version>2.0.1</version>
6161
<scope>test</scope>
6262
</dependency>
6363
<!-- Java utility classes -->

Diff for: finish/src/main/java/io/openliberty/guides/config/CustomConfigSource.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -22,9 +22,9 @@
2222
import java.util.Map;
2323
import java.util.Set;
2424

25-
import javax.json.Json;
26-
import javax.json.stream.JsonParser;
27-
import javax.json.stream.JsonParser.Event;
25+
import jakarta.json.Json;
26+
import jakarta.json.stream.JsonParser;
27+
import jakarta.json.stream.JsonParser.Event;
2828

2929
import org.eclipse.microprofile.config.spi.ConfigSource;
3030

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryApplication.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -12,8 +12,8 @@
1212
// end::copyright[]
1313
package io.openliberty.guides.inventory;
1414

15-
import javax.ws.rs.ApplicationPath;
16-
import javax.ws.rs.core.Application;
15+
import jakarta.ws.rs.ApplicationPath;
16+
import jakarta.ws.rs.core.Application;
1717

1818
@ApplicationPath("inventory")
1919
public class InventoryApplication extends Application {

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryConfig.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -14,9 +14,9 @@
1414
// tag::config-class[]
1515
package io.openliberty.guides.inventory;
1616

17-
import javax.enterprise.context.ApplicationScoped;
18-
import javax.inject.Inject;
19-
import javax.inject.Provider;
17+
import jakarta.enterprise.context.ApplicationScoped;
18+
import jakarta.inject.Inject;
19+
import jakarta.inject.Provider;
2020
import org.eclipse.microprofile.config.inject.ConfigProperty;
2121

2222
@ApplicationScoped

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryLivenessCheck.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// tag::InventoryLivenessCheck[]
1414
package io.openliberty.guides.inventory;
1515

16-
import javax.enterprise.context.ApplicationScoped;
16+
import jakarta.enterprise.context.ApplicationScoped;
1717

1818
import java.lang.management.MemoryMXBean;
1919
import java.lang.management.ManagementFactory;

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryManager.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2018 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -17,8 +17,9 @@
1717
import java.util.Collections;
1818
import java.util.List;
1919
import java.util.Properties;
20-
import javax.enterprise.context.ApplicationScoped;
21-
import io.openliberty.guides.inventory.model.*;
20+
import jakarta.enterprise.context.ApplicationScoped;
21+
import io.openliberty.guides.inventory.model.InventoryList;
22+
import io.openliberty.guides.inventory.model.SystemData;
2223

2324
@ApplicationScoped
2425
public class InventoryManager {
@@ -36,8 +37,9 @@ public void add(String hostname, Properties systemProps) {
3637
props.setProperty("user.name", systemProps.getProperty("user.name"));
3738

3839
SystemData host = new SystemData(hostname, props);
39-
if (!systems.contains(host))
40+
if (!systems.contains(host)) {
4041
systems.add(host);
42+
}
4143
}
4244

4345
public InventoryList list() {

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryReadinessCheck.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2018, 2021 IBM Corporation and others.
3+
* Copyright (c) 2018, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -13,12 +13,12 @@
1313
// tag::InventoryReadinessCheck[]
1414
package io.openliberty.guides.inventory;
1515

16-
import javax.enterprise.context.ApplicationScoped;
17-
import javax.inject.Inject;
18-
import javax.ws.rs.client.Client;
19-
import javax.ws.rs.client.ClientBuilder;
20-
import javax.ws.rs.core.MediaType;
21-
import javax.ws.rs.core.Response;
16+
import jakarta.enterprise.context.ApplicationScoped;
17+
import jakarta.inject.Inject;
18+
import jakarta.ws.rs.client.Client;
19+
import jakarta.ws.rs.client.ClientBuilder;
20+
import jakarta.ws.rs.core.MediaType;
21+
import jakarta.ws.rs.core.Response;
2222
import org.eclipse.microprofile.health.Readiness;
2323
import org.eclipse.microprofile.health.HealthCheck;
2424
import org.eclipse.microprofile.health.HealthCheckResponse;

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryResource.java

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2019 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -15,15 +15,14 @@
1515
package io.openliberty.guides.inventory;
1616

1717
import java.util.Properties;
18-
import javax.enterprise.context.RequestScoped;
19-
import javax.inject.Inject;
20-
import javax.ws.rs.GET;
21-
import javax.ws.rs.Path;
22-
import javax.ws.rs.PathParam;
23-
import javax.ws.rs.Produces;
24-
import javax.ws.rs.core.MediaType;
25-
import javax.ws.rs.core.Response;
26-
import io.openliberty.guides.inventory.InventoryConfig;
18+
import jakarta.enterprise.context.RequestScoped;
19+
import jakarta.inject.Inject;
20+
import jakarta.ws.rs.GET;
21+
import jakarta.ws.rs.Path;
22+
import jakarta.ws.rs.PathParam;
23+
import jakarta.ws.rs.Produces;
24+
import jakarta.ws.rs.core.MediaType;
25+
import jakarta.ws.rs.core.Response;
2726

2827
@RequestScoped
2928
@Path("systems")
@@ -50,7 +49,8 @@ public Response getPropertiesForHost(@PathParam("hostname") String hostname) {
5049
if (props == null) {
5150
return Response.status(Response.Status.NOT_FOUND)
5251
.entity(
53-
"{ \"error\" : \"Unknown hostname or the resource may not be running on the host machine\" }")
52+
"{ \"error\" : \"Unknown hostname or the resource"
53+
+ " may not be running on the host machine\" }")
5454
.build();
5555
}
5656

@@ -60,7 +60,8 @@ public Response getPropertiesForHost(@PathParam("hostname") String hostname) {
6060
} else {
6161
// tag::email[]
6262
return Response.status(Response.Status.SERVICE_UNAVAILABLE)
63-
.entity("{ \"error\" : \"Service is currently in maintenance.\" }").build();
63+
.entity("{ \"error\" : \"Service is currently in maintenance.\" }")
64+
.build();
6465
// end::email[]
6566
}
6667
}
@@ -72,7 +73,8 @@ public Response listContents() {
7273
return Response.ok(manager.list()).build();
7374
} else {
7475
return Response.status(Response.Status.SERVICE_UNAVAILABLE)
75-
.entity("{ \"error\" : \"Service is currently in maintenance.\" }").build();
76+
.entity("{ \"error\" : \"Service is currently in maintenance.\" }")
77+
.build();
7678
}
7779
}
7880

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryStartupCheck.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import java.lang.management.ManagementFactory;
1717
import com.sun.management.OperatingSystemMXBean;
18-
import javax.enterprise.context.ApplicationScoped;
18+
import jakarta.enterprise.context.ApplicationScoped;
1919
import org.eclipse.microprofile.health.Startup;
2020
import org.eclipse.microprofile.health.HealthCheck;
2121
import org.eclipse.microprofile.health.HealthCheckResponse;

Diff for: finish/src/main/java/io/openliberty/guides/inventory/InventoryUtils.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2018 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@
1616
import java.net.URI;
1717
import java.net.UnknownHostException;
1818
import java.net.MalformedURLException;
19-
import javax.ws.rs.ProcessingException;
19+
import jakarta.ws.rs.ProcessingException;
2020
import java.util.Properties;
2121
import org.apache.commons.lang3.exception.ExceptionUtils;
2222
import org.eclipse.microprofile.rest.client.RestClientBuilder;
@@ -35,7 +35,7 @@ public Properties getProperties(String hostname, int portNumber) {
3535
SystemClient customRestClient = RestClientBuilder.newBuilder()
3636
.baseUrl(customURL)
3737
.register(
38-
UnknownUrlExceptionMapper.class)
38+
UnknownUrlExceptionMapper.class)
3939
.build(SystemClient.class);
4040
return customRestClient.getProperties();
4141
} catch (ProcessingException ex) {
@@ -61,7 +61,7 @@ public void handleProcessingException(ProcessingException ex) {
6161
// tag::doc[]
6262
/**
6363
* Builds the URI string to the system service for a particular host.
64-
*
64+
*
6565
* @param protocol
6666
* - http or https.
6767
* @param host
@@ -84,4 +84,4 @@ public static String buildUrl(String protocol, String host, int port,
8484
}
8585
}
8686

87-
}
87+
}

Diff for: finish/src/main/java/io/openliberty/guides/inventory/client/SystemClient.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2018 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -15,11 +15,11 @@
1515

1616
import java.util.Properties;
1717

18-
import javax.ws.rs.GET;
19-
import javax.ws.rs.Path;
20-
import javax.ws.rs.ProcessingException;
21-
import javax.ws.rs.Produces;
22-
import javax.ws.rs.core.MediaType;
18+
import jakarta.ws.rs.GET;
19+
import jakarta.ws.rs.Path;
20+
import jakarta.ws.rs.ProcessingException;
21+
import jakarta.ws.rs.Produces;
22+
import jakarta.ws.rs.core.MediaType;
2323

2424
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
2525
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
@@ -33,6 +33,6 @@ public interface SystemClient {
3333
// end::annotations[]
3434
@GET
3535
@Produces(MediaType.APPLICATION_JSON)
36-
public Properties getProperties() throws UnknownUrlException, ProcessingException;
36+
Properties getProperties() throws UnknownUrlException, ProcessingException;
3737
}
3838
// end::client[]

Diff for: finish/src/main/java/io/openliberty/guides/inventory/client/UnknownUrlExceptionMapper.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2018 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -14,9 +14,9 @@
1414
package io.openliberty.guides.inventory.client;
1515

1616
import java.util.logging.Logger;
17-
import javax.ws.rs.core.MultivaluedMap;
18-
import javax.ws.rs.core.Response;
19-
import javax.ws.rs.ext.Provider;
17+
import jakarta.ws.rs.core.MultivaluedMap;
18+
import jakarta.ws.rs.core.Response;
19+
import jakarta.ws.rs.ext.Provider;
2020
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
2121

2222
@Provider

Diff for: finish/src/main/java/io/openliberty/guides/system/SystemApplication.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017 IBM Corporation and others.
3+
* Copyright (c) 2017, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -12,8 +12,8 @@
1212
// end::copyright[]
1313
package io.openliberty.guides.system;
1414

15-
import javax.ws.rs.core.Application;
16-
import javax.ws.rs.ApplicationPath;
15+
import jakarta.ws.rs.core.Application;
16+
import jakarta.ws.rs.ApplicationPath;
1717

1818
@ApplicationPath("system")
1919
public class SystemApplication extends Application {

Diff for: finish/src/main/java/io/openliberty/guides/system/SystemLivenessCheck.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.lang.management.ManagementFactory;
1717
import java.lang.management.MemoryMXBean;
1818

19-
import javax.enterprise.context.ApplicationScoped;
19+
import jakarta.enterprise.context.ApplicationScoped;
2020
import org.eclipse.microprofile.health.Liveness;
2121
import org.eclipse.microprofile.health.HealthCheck;
2222
import org.eclipse.microprofile.health.HealthCheckResponse;

Diff for: finish/src/main/java/io/openliberty/guides/system/SystemReadinessCheck.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2018, 2021 IBM Corporation and others.
3+
* Copyright (c) 2018, 2022 IBM Corporation and others.
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License v1.0
66
* which accompanies this distribution, and is available at
@@ -13,7 +13,7 @@
1313
// tag::SystemReadinessCheck[]
1414
package io.openliberty.guides.system;
1515

16-
import javax.enterprise.context.ApplicationScoped;
16+
import jakarta.enterprise.context.ApplicationScoped;
1717
import org.eclipse.microprofile.health.Readiness;
1818
import org.eclipse.microprofile.health.HealthCheck;
1919
import org.eclipse.microprofile.health.HealthCheckResponse;

0 commit comments

Comments
 (0)