Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to MP6.1 #116

Merged
merged 9 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 50
18 changes: 18 additions & 0 deletions .github/workflows/add-pr-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add PRs to Dependabot PRs dashboard

on:
pull_request:
types:
- opened
- labeled

jobs:
add-to-project:
name: Add PR to dashboard
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/OpenLiberty/projects/26
github-token: ${{ secrets.ADMIN_BACKLOG }}
labeled: dependencies
16 changes: 8 additions & 8 deletions finish/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Liberty configuration -->
<liberty.var.default.http.port>9080</liberty.var.default.http.port>
<liberty.var.default.https.port>9443</liberty.var.default.https.port>
<liberty.var.http.port>9080</liberty.var.http.port>
<liberty.var.https.port>9443</liberty.var.https.port>
</properties>

<dependencies>
Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.2</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -55,23 +55,23 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
</plugin>
<!-- Enable liberty-maven plugin -->
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.8.2</version>
<version>3.10</version>
</plugin>
<!-- Plugin to run functional tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<default.http.port>${liberty.var.default.http.port}</default.http.port>
<default.https.port>${liberty.var.default.https.port}</default.https.port>
<http.port>${liberty.var.http.port}</http.port>
<https.port>${liberty.var.https.port}</https.port>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
6 changes: 3 additions & 3 deletions finish/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<feature>jsonb-3.0</feature>
</featureManager>

<variable name="default.http.port" defaultValue="9080"/>
<variable name="default.https.port" defaultValue="9443"/>
<variable name="http.port" defaultValue="9080"/>
<variable name="https.port" defaultValue="9443"/>

<httpEndpoint host="*" httpPort="${default.http.port}" httpsPort="${default.https.port}"
<httpEndpoint host="*" httpPort="${http.port}" httpsPort="${https.port}"
id="defaultHttpEndpoint"/>

<webApplication location="guide-cors.war" contextRoot="/"/>
Expand Down
4 changes: 2 additions & 2 deletions finish/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2023 IBM Corp.
Copyright (c) 2016, 2024 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,7 +30,7 @@ <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-6.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-6.1.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#restfulWS-3.1.html" target="_blank" rel="noopener noreferrer">Jakarta RESTful Web Services 3.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonb-3.0.html" target="_blank" rel="noopener noreferrer">Jakarta JSON Binding 3.0</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017, 2019 IBM Corporation and others.
* Copyright (c) 2017, 2024 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand All @@ -23,7 +23,7 @@

public class CorsIT {

String port = System.getProperty("default.http.port");
String port = System.getProperty("http.port");
String pathToHost = "http://localhost:" + port + "/";

@BeforeEach
Expand Down
24 changes: 12 additions & 12 deletions finish/src/test/java/it/io/openliberty/guides/cors/HttpUtils.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// tag::comment[]
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017 IBM Corporation and others.
* Copyright (c) 2017, 2024 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
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* http://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* IBM Corporation - Initial implementation
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
// end::comment[]
// end::copyright[]
package it.io.openliberty.guides.cors;

import java.io.IOException;
Expand All @@ -21,13 +20,14 @@

public class HttpUtils {

public static HttpURLConnection sendRequest(String path, String methods, Map<String, String> requestHeaders)
throws IOException {
return getHttpConnection(new URL(path), methods, requestHeaders);
public static HttpURLConnection sendRequest(String path, String methods,
Map<String, String> requestHeaders) throws IOException {
return getHttpConnection(new URL(path), methods, requestHeaders);
}

public static HttpURLConnection getHttpConnection(URL targetURL, String httpRequestMethod,
Map<String, String> headers) throws IOException {
public static HttpURLConnection getHttpConnection(URL targetURL,
String httpRequestMethod, Map<String, String> headers)
throws IOException {
HttpURLConnection connection = (HttpURLConnection) targetURL.openConnection();
Iterator<Entry<String, String>> entries = headers.entrySet().iterator();
while (entries.hasNext()) {
Expand Down
16 changes: 8 additions & 8 deletions start/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Liberty configuration -->
<liberty.var.default.http.port>9080</liberty.var.default.http.port>
<liberty.var.default.https.port>9443</liberty.var.default.https.port>
<liberty.var.http.port>9080</liberty.var.http.port>
<liberty.var.https.port>9443</liberty.var.https.port>
</properties>

<dependencies>
Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.2</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -55,23 +55,23 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
</plugin>
<!-- Enable liberty-maven plugin -->
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.8.2</version>
<version>3.10</version>
</plugin>
<!-- Plugin to run functional tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<default.http.port>${liberty.var.default.http.port}</default.http.port>
<default.https.port>${liberty.var.default.https.port}</default.https.port>
<http.port>${liberty.var.http.port}</http.port>
<https.port>${liberty.var.https.port}</https.port>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
6 changes: 3 additions & 3 deletions start/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<feature>jsonb-3.0</feature>
</featureManager>

<variable name="default.http.port" defaultValue="9080"/>
<variable name="default.https.port" defaultValue="9443"/>
<variable name="http.port" defaultValue="9080"/>
<variable name="https.port" defaultValue="9443"/>

<httpEndpoint host="*" httpPort="${default.http.port}" httpsPort="${default.https.port}"
<httpEndpoint host="*" httpPort="${http.port}" httpsPort="${https.port}"
id="defaultHttpEndpoint"/>

<webApplication location="guide-cors.war" contextRoot="/"/>
Expand Down
4 changes: 2 additions & 2 deletions start/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2023 IBM Corp.
Copyright (c) 2016, 2024 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,7 +30,7 @@ <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-6.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-6.1.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#restfulWS-3.1.html" target="_blank" rel="noopener noreferrer">Jakarta RESTful Web Services 3.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonb-3.0.html" target="_blank" rel="noopener noreferrer">Jakarta JSON Binding 3.0</a></li>
</ul>
Expand Down
18 changes: 9 additions & 9 deletions start/src/test/java/it/io/openliberty/guides/cors/CorsIT.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// tag::comment[]
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017, 2019 IBM Corporation and others.
* Copyright (c) 2017, 2024 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
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* http://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* IBM Corporation - Initial implementation
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
// end::comment[]
// end::copyright[]
package it.io.openliberty.guides.cors;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -24,7 +23,7 @@

public class CorsIT {

String port = System.getProperty("default.http.port");
String port = System.getProperty("http.port");
String pathToHost = "http://localhost:" + port + "/";

@BeforeEach
Expand All @@ -43,7 +42,8 @@ public void checkCorsResponse(HttpURLConnection connection,
});
}

public static void printResponseHeaders(HttpURLConnection connection, String label) {
public static void printResponseHeaders(HttpURLConnection connection,
String label) {
System.out.println("--- " + label + " ---");
Map<String, java.util.List<String>> map = connection.getHeaderFields();
for (Entry<String, java.util.List<String>> entry : map.entrySet()) {
Expand Down
24 changes: 12 additions & 12 deletions start/src/test/java/it/io/openliberty/guides/cors/HttpUtils.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// tag::comment[]
// tag::copyright[]
/*******************************************************************************
* Copyright (c) 2017 IBM Corporation and others.
* Copyright (c) 2017, 2024 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
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* http://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* IBM Corporation - Initial implementation
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
// end::comment[]
// end::copyright[]
package it.io.openliberty.guides.cors;

import java.io.IOException;
Expand All @@ -21,13 +20,14 @@

public class HttpUtils {

public static HttpURLConnection sendRequest(String path, String methods, Map<String, String> requestHeaders)
throws IOException {
return getHttpConnection(new URL(path), methods, requestHeaders);
public static HttpURLConnection sendRequest(String path, String methods,
Map<String, String> requestHeaders) throws IOException {
return getHttpConnection(new URL(path), methods, requestHeaders);
}

public static HttpURLConnection getHttpConnection(URL targetURL, String httpRequestMethod,
Map<String, String> headers) throws IOException {
public static HttpURLConnection getHttpConnection(URL targetURL,
String httpRequestMethod, Map<String, String> headers)
throws IOException {
HttpURLConnection connection = (HttpURLConnection) targetURL.openConnection();
Iterator<Entry<String, String>> entries = headers.entrySet().iterator();
while (entries.hasNext()) {
Expand Down
Loading