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

UPSE-293: updates to support Java 11 #269

Merged
merged 2 commits into from
Jan 17, 2023
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: 5 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ on:

jobs:
test:
name: '${{ matrix.platform }} with Java 8'
name: '${{ matrix.platform }} with Java ${{ matrix.java-version }}'
strategy:
matrix:
platform:
- ubuntu-latest
- windows-latest
- macos-latest
java-version:
- 8
- 11
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
Expand All @@ -43,6 +46,6 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: adopt-hotspot
java-version: 8
java-version: ${{ matrix.java-version }}
- name: Build and Test
run: mvn -B package
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
<project.build.targetVersion>1.8</project.build.targetVersion>

<jaxb2basicsVersion>0.12.0</jaxb2basicsVersion>
<jaxb-api.version>2.3.1</jaxb-api.version>
<jaxb-impl.version>2.3.3</jaxb-impl.version>
<springVersion>5.3.15</springVersion>
</properties>

Expand All @@ -65,7 +67,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.4</version>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -114,6 +116,16 @@
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb-impl.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions resource-server-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -119,6 +127,11 @@
<artifactId>jaxb-xjc</artifactId>
<version>2.2.6</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
14 changes: 13 additions & 1 deletion resource-server-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<jaxb-api.version>2.3.1</jaxb-api.version>
<jaxb-impl.version>2.3.3</jaxb-impl.version>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -89,6 +91,16 @@
<artifactId>resource-server-utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb-impl.version}</version>
</dependency>
<!--
| Allows resources in webjars to be included without their version numbers;
| see https://www.webjars.org/documentation#springboot
Expand Down Expand Up @@ -158,7 +170,7 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<phase>deploy</phase>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to the jaxb/logback changes?
Is this needed for Java 11?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm remembering correctly, with 'verify', the build was failing with Java 11. I changed it to 'deploy' to resolve because I figured we don't need to sign artifacts anyways unless we're doing a deploy. Now that I think about it, if we run a deploy the same error will probably still occur :(

Copy link
Contributor Author

@groybal groybal Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so I retested using 'verify' and I get build failure with both Java 8 and Java 11. Here's the error, anyone have insights:

[DEBUG] 2.2.19
[GNUPG:] INV_SGNR 9
[GNUPG:] FAILURE sign 17
gpg: no default secret key: No secret key
gpg: signing failed: No secret key

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd check

gpg --list-keys

to see if there is a key already setup on your system

If there isn't try running

gpg --generate-key

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that fixed it (generating key). Still should use 'deploy' I think but let me know if I should change back to 'verify'.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with it staying in deploy as well.
Though open to differing opinions.

<goals>
<goal>sign</goal>
</goals>
Expand Down
2 changes: 1 addition & 1 deletion resource-server-webapp/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- http://www.qos.ch/shop/products/professionalSupport -->
<!-- -->
<configuration scan="true" scanPeriod="30 seconds">
<contextName>ResourceServingWebapp</contextName>
<contextName>resource-server</contextName>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this needed as part of the log back downgrade?

Copy link
Contributor Author

@groybal groybal Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have two resource server webapps running, an older one (ResourceServingWebapp version 1.0.48) and a newer one (resource-server version 1.4.x) but they both log to the same log file so it was confusing to debug issues. I can remove this change if we still want both webapps to log to same file. Plus new naming matches the newer webapp name (resource-server).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, gotcha, that sounds like a good idea. 👍
Just wanted to see how it fit with the other changes.


<!--
| Propagate log levels to java.util.logging
Expand Down