Skip to content

Commit 3f15dae

Browse files
authored
Merge pull request #165 from OpenLiberty/staging
Merge staging to prod- Version update mp5 (#164)
2 parents a273334 + a6e0c7b commit 3f15dae

35 files changed

+279
-342
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: bash ./tools/pr-checker/checker.sh ${{ github.repository }} ${{ github.event.pull_request.number }} | tee checker.log
2424
- id: Lint-Code-Base
2525
if: always()
26-
uses: github/super-linter@v3
26+
uses: github/super-linter@v3.17.0
2727
env:
2828
VALIDATE_ALL_CODEBASE: false
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.adoc

Lines changed: 67 additions & 141 deletions
Large diffs are not rendered by default.

finish/pom.xml

Lines changed: 11 additions & 11 deletions
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 -->

finish/src/main/java/io/openliberty/guides/inventory/InventoryApplication.java

Lines changed: 3 additions & 3 deletions
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 {

finish/src/main/java/io/openliberty/guides/inventory/InventoryManager.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2020 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
@@ -18,7 +18,7 @@
1818
import java.util.List;
1919
import java.util.Properties;
2020

21-
import javax.enterprise.context.ApplicationScoped;
21+
import jakarta.enterprise.context.ApplicationScoped;
2222

2323
import org.eclipse.microprofile.metrics.MetricUnits;
2424
import org.eclipse.microprofile.metrics.annotation.Counted;
@@ -59,10 +59,10 @@ public Properties get(String hostname) {
5959

6060
// tag::timedForAdd[]
6161
// tag::nameForAdd[]
62-
@SimplyTimed(name = "inventoryAddingTime",
62+
@SimplyTimed(name = "inventoryAddingTime",
6363
// end::nameForAdd[]
6464
// tag::absoluteForAdd[]
65-
absolute=true,
65+
absolute = true,
6666
// end::absoluteForAdd[]
6767
// tag::desForAdd[]
6868
description = "Time needed to add system properties to the inventory")
@@ -75,8 +75,9 @@ public void add(String hostname, Properties systemProps) {
7575
props.setProperty("user.name", systemProps.getProperty("user.name"));
7676

7777
SystemData host = new SystemData(hostname, props);
78-
if (!systems.contains(host))
78+
if (!systems.contains(host)) {
7979
systems.add(host);
80+
}
8081
}
8182
// end::add[]
8283

finish/src/main/java/io/openliberty/guides/inventory/InventoryResource.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2020 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
@@ -13,14 +13,14 @@
1313
package io.openliberty.guides.inventory;
1414

1515
import java.util.Properties;
16-
import javax.enterprise.context.RequestScoped;
17-
import javax.inject.Inject;
18-
import javax.ws.rs.GET;
19-
import javax.ws.rs.Path;
20-
import javax.ws.rs.PathParam;
21-
import javax.ws.rs.Produces;
22-
import javax.ws.rs.core.MediaType;
23-
import javax.ws.rs.core.Response;
16+
import jakarta.enterprise.context.RequestScoped;
17+
import jakarta.inject.Inject;
18+
import jakarta.ws.rs.GET;
19+
import jakarta.ws.rs.Path;
20+
import jakarta.ws.rs.PathParam;
21+
import jakarta.ws.rs.Produces;
22+
import jakarta.ws.rs.core.MediaType;
23+
import jakarta.ws.rs.core.Response;
2424
import io.openliberty.guides.inventory.model.InventoryList;
2525

2626
// tag::RequestScoped[]
@@ -42,7 +42,7 @@ public Response getPropertiesForHost(@PathParam("hostname") String hostname) {
4242
Properties props = manager.get(hostname);
4343
if (props == null) {
4444
return Response.status(Response.Status.NOT_FOUND)
45-
.entity("{ \"error\" : \"Unknown hostname or the system service "
45+
.entity("{ \"error\" : \"Unknown hostname or the system service "
4646
+ "may not be running on " + hostname + "\" }")
4747
.build();
4848
}

finish/src/main/java/io/openliberty/guides/inventory/InventoryUtils.java

Lines changed: 4 additions & 3 deletions
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,7 +15,7 @@
1515
import java.net.URL;
1616
import java.net.UnknownHostException;
1717
import java.net.MalformedURLException;
18-
import javax.ws.rs.ProcessingException;
18+
import jakarta.ws.rs.ProcessingException;
1919
import java.util.Properties;
2020
import org.apache.commons.lang3.exception.ExceptionUtils;
2121
import org.eclipse.microprofile.rest.client.RestClientBuilder;
@@ -36,7 +36,8 @@ public Properties getProperties(String hostname) {
3636
SystemClient customRestClient = RestClientBuilder.newBuilder()
3737
.baseUrl(customURL)
3838
.register(
39-
UnknownUrlExceptionMapper.class)
39+
UnknownUrlExceptionMapper
40+
.class)
4041
.build(SystemClient.class);
4142
return customRestClient.getProperties();
4243
} catch (ProcessingException ex) {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tag::copyright[]
22
/*******************************************************************************
3-
* Copyright (c) 2017, 2020 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;
@@ -32,6 +32,6 @@ public interface SystemClient {
3232
// end::annotations[]
3333
@GET
3434
@Produces(MediaType.APPLICATION_JSON)
35-
public Properties getProperties() throws UnknownUrlException, ProcessingException;
35+
Properties getProperties() throws UnknownUrlException, ProcessingException;
3636
}
3737
// end::client[]

finish/src/main/java/io/openliberty/guides/inventory/client/UnknownUrlException.java

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 4 additions & 4 deletions
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

0 commit comments

Comments
 (0)