Skip to content

Commit

Permalink
Merge pull request #183 from OpenLiberty/staging
Browse files Browse the repository at this point in the history
Merge staging to prod - Version update mp5 (#182)
  • Loading branch information
gkwan-ibm authored Apr 1, 2022
2 parents b264d30 + eb49eef commit e44aa96
Show file tree
Hide file tree
Showing 30 changed files with 231 additions and 251 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: bash ./tools/pr-checker/checker.sh ${{ github.repository }} ${{ github.event.pull_request.number }} | tee checker.log
- id: Lint-Code-Base
if: always()
uses: github/super-linter@v3
uses: github/super-linter@v3.17.0
env:
VALIDATE_ALL_CODEBASE: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
69 changes: 20 additions & 49 deletions README.adoc

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions finish/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>8.0.0</version>
<version>9.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<!-- tag::microprofile[] -->
<artifactId>microprofile</artifactId>
<!-- end::microprofile[] -->
<version>4.1</version>
<version>5.0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
Expand All @@ -45,25 +45,25 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.1</version>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.4.5</version>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>6.0.0.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>3.4.5</version>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-json-binding-provider</artifactId>
<version>6.0.0.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.4</version>
<artifactId>jakarta.json</artifactId>
<version>2.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -101,4 +101,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017 IBM Corporation and others.
* Copyright (c) 2017, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -9,11 +9,11 @@
* Contributors:
* IBM Corporation - Initial implementation
*******************************************************************************/
// end::copyright[]
// end::copyright[]
package io.openliberty.guides.inventory;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;

@ApplicationPath("inventory")
public class InventoryApplication extends Application {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017, 2020 IBM Corporation and others.
* Copyright (c) 2017, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -21,9 +21,9 @@
import java.util.List;
import java.util.Properties;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.ws.rs.ProcessingException;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.ws.rs.ProcessingException;

import org.apache.commons.lang3.exception.ExceptionUtils;
import org.eclipse.microprofile.rest.client.RestClientBuilder;
Expand Down Expand Up @@ -75,8 +75,9 @@ public void add(String hostname, Properties systemProps) {
props.setProperty("user.name", systemProps.getProperty("user.name"));

SystemData host = new SystemData(hostname, props);
if (!systems.contains(host))
if (!systems.contains(host)) {
systems.add(host);
}
}

public InventoryList list() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017, 2020 IBM Corporation and others.
* Copyright (c) 2017, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -13,14 +13,14 @@
package io.openliberty.guides.inventory;

import java.util.Properties;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import io.openliberty.guides.inventory.model.InventoryList;

// tag::RequestScoped[]
Expand All @@ -42,7 +42,7 @@ public Response getPropertiesForHost(@PathParam("hostname") String hostname) {
Properties props = manager.get(hostname);
if (props == null) {
return Response.status(Response.Status.NOT_FOUND)
.entity("{ \"error\" : \"Unknown hostname or the system service "
.entity("{ \"error\" : \"Unknown hostname or the system service "
+ "may not be running on " + hostname + "\" }")
.build();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2018, 2019 IBM Corporation and others.
* Copyright (c) 2018, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -15,17 +15,18 @@

import java.util.Properties;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.ProcessingException;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

// tag::RegisterRestClient[]
@RegisterRestClient(configKey = "systemClient", baseUri = "http://localhost:9080/system")
@RegisterRestClient(configKey = "systemClient",
baseUri = "http://localhost:9080/system")
// end::RegisterRestClient[]
// tag::RegisterProvider[]
@RegisterProvider(UnknownUriExceptionMapper.class)
Expand All @@ -41,7 +42,7 @@ public interface SystemClient extends AutoCloseable {
@Produces(MediaType.APPLICATION_JSON)
// end::Produces[]
// tag::getProperties[]
public Properties getProperties() throws UnknownUriException, ProcessingException;
Properties getProperties() throws UnknownUriException, ProcessingException;
// end::getProperties[]
}
// end::SystemClient[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2018, 2020 IBM Corporation and others.
* Copyright (c) 2018, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2018, 2020 IBM Corporation and others.
* Copyright (c) 2018, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -14,9 +14,9 @@
package io.openliberty.guides.inventory.client;

import java.util.logging.Logger;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.Provider;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.Provider;
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;

@Provider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017, 2018 IBM Corporation and others.
* Copyright (c) 2017, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017, 2020 IBM Corporation and others.
* Copyright (c) 2017, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017 IBM Corporation and others.
* Copyright (c) 2017, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -9,11 +9,11 @@
* Contributors:
* IBM Corporation - Initial implementation
*******************************************************************************/
// end::copyright[]
// end::copyright[]
package io.openliberty.guides.system;

import javax.ws.rs.core.Application;
import javax.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.ApplicationPath;

@ApplicationPath("system")
public class SystemApplication extends Application {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017, 2018 IBM Corporation and others.
* Copyright (c) 2017, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -13,11 +13,11 @@
package io.openliberty.guides.system;

import java.util.Properties;
import javax.enterprise.context.RequestScoped;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.enterprise.context.RequestScoped;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@RequestScoped
@Path("/properties")
Expand Down
13 changes: 7 additions & 6 deletions finish/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<server description="Sample Liberty server">

<featureManager>
<feature>jaxrs-2.1</feature>
<feature>jsonp-1.1</feature>
<feature>cdi-2.0</feature>
<feature>restfulWS-3.0</feature>
<feature>jsonp-2.0</feature>
<feature>jsonb-2.0</feature>
<feature>cdi-3.0</feature>
<!-- tag::mpConfig[] -->
<feature>mpConfig-2.0</feature>
<feature>mpConfig-3.0</feature>
<!-- end::mpConfig[] -->
<!-- tag::mpRestClient[] -->
<feature>mpRestClient-2.0</feature>
<feature>mpRestClient-3.0</feature>
<!-- end::mpRestClient[] -->
</featureManager>

Expand All @@ -19,4 +20,4 @@
id="defaultHttpEndpoint"/>

<webApplication location="guide-microprofile-rest-client.war" contextRoot="/"/>
</server>
</server>
17 changes: 9 additions & 8 deletions finish/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2021 IBM Corp.
Copyright (c) 2016, 2022 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,14 +30,15 @@ <h2>Eclipse MicroProfile</h2>
<p>
For more information about the features used in this application, see the Open Liberty documentation:
<ul>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-4.1.html" target="_blank" rel="noopener noreferrer">MicroProfile 4.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpRestClient-2.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Rest Client 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-2.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-2.0.html" target="_blank" rel="noopener noreferrer">Contexts and Dependency Injection 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jaxrs-2.1.html" target="_blank" rel="noopener noreferrer">Java RESTful Services 2.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonp-1.1.html" target="_blank" rel="noopener noreferrer">JavaScript Object Notation Processing 1.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-5.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 5.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpRestClient-3.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Rest Client 3.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-3.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 3.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-3.0.html" target="_blank" rel="noopener noreferrer">Contexts and Dependency Injection 3.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#restfulWS-3.0.html" target="_blank" rel="noopener noreferrer">Java RESTful Services 3.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonp-2.0.html" target="_blank" rel="noopener noreferrer">JavaScript Object Notation Processing 2.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonb-2.0.html" target="_blank" rel="noopener noreferrer">JavaScript Object Notation Binding 2.0</a></li>
</ul>
</p>
</div>
</body>
</html>
</html>
Loading

0 comments on commit e44aa96

Please sign in to comment.