Skip to content

Commit

Permalink
Merge pull request #526 from bcgov/feature/upgradeJava17
Browse files Browse the repository at this point in the history
Feature/upgrade java17
  • Loading branch information
TayGov authored Oct 19, 2023
2 parents 031cbf9 + 9086554 commit 14b28bf
Show file tree
Hide file tree
Showing 23 changed files with 141 additions and 230 deletions.
1 change: 1 addition & 0 deletions .github/workflows/api-build-latest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: SierraSystems/reusable-workflows/.github/workflows/java-unit-tests.yml@main
with:
working_directory: src/ecrc-api
java_version: 17

github-tag:
uses: SierraSystems/reusable-workflows/.github/workflows/github-get-tag.yml@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/api-codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ jobs:
if: env.GIT_BRANCH == 'refs/heads/master'

# Setup Java Environment
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 17

- uses: actions/cache@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 17
- name: Build with Maven
run: mvn clean test
working-directory: src/ecrc-api
1 change: 1 addition & 0 deletions .github/workflows/build-tagged-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: SierraSystems/reusable-workflows/.github/workflows/java-unit-tests.yml@main
with:
working_directory: src/ecrc-api
java_version: 17

frontend-build-image:
uses: SierraSystems/reusable-workflows/.github/workflows/openshift-source-to-image.yml@main
Expand Down
4 changes: 2 additions & 2 deletions src/ecrc-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#############################################################################################
### Stage where Docker is building spring boot app using maven ###
#############################################################################################
FROM maven:3.6.3-jdk-8 as build
FROM maven:3.8.5-openjdk-17 as build

ARG PROXY_SET=false
ARG PROXY_HOST=
Expand All @@ -25,7 +25,7 @@ RUN mvn -B clean package \
#############################################################################################
### Stage where Docker is running a java process to run a service built in previous stage ###
#############################################################################################
FROM openjdk:8-jdk-slim
FROM eclipse-temurin:17-jre-alpine

ARG MVN_PROFILES
ARG ECRC_SERVICE_NAME
Expand Down
145 changes: 43 additions & 102 deletions src/ecrc-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,28 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<version>3.1.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>ca.bc.gov.open</groupId>
<artifactId>ecrc-api</artifactId>
<version>1.0.12-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<name>ecrc-api</name>
<description>Criminal Record Check (eCRC)</description>

<properties>
<java.version>1.8</java.version>
<java.version>17</java.version>
<nimbus.oauth.version>7.0.3</nimbus.oauth.version>
<jjwt.version>0.9.1</jjwt.version>
<javax.mail.version>1.4</javax.mail.version>
<springfox-swagger-version>2.9.2</springfox-swagger-version>
<log4j2.version>2.17.1</log4j2.version>
<snakeyaml.version>2.0</snakeyaml.version>
<jjwt-api.version>0.11.5</jjwt-api.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
Expand Down Expand Up @@ -68,35 +66,21 @@
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>runtime</scope>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>3.4.10</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>3.2.3</version>
</dependency>
<dependency>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
Expand All @@ -105,7 +89,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230227</version>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
Expand All @@ -117,49 +101,42 @@
<artifactId>mockwebserver</artifactId>
<version>3.14.9</version>
</dependency>

<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>oauth2-oidc-sdk</artifactId>
<version>${nimbus.oauth.version}</version>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
<artifactId>jjwt-api</artifactId>
<version>${jjwt-api.version}</version>
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>${javax.mail.version}</version>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>${jjwt-api.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.10.0</version>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId> <!-- or jjwt-gson if Gson is preferred -->
<version>${jjwt-api.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox-swagger-version}</version>
<scope>compile</scope>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>${javax.mail.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger-version}</version>
<scope>compile</scope>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.2.0</version>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand All @@ -182,28 +159,34 @@
<artifactId>gson</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>3.4.0</version>
</dependency>
</dependencies>
<profiles>
<profile>

<id>openshift</id>

<repositories>
<repository>
<id>splunk-artifactory</id>
<name>Splunk Releases</name>
<url>https://splunk.jfrog.io/artifactory/ext-releases-local/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.splunk.logging</groupId>
<artifactId>splunk-library-javalogging</artifactId>
<version>1.11.4</version>
</dependency>
</dependencies>

</profile>
</profiles>
<build>
Expand All @@ -215,11 +198,10 @@
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>3.2.3</version>
<version>4.0.0</version>
<configuration>
<extensions>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:3.2.3</extension>
<extension>org.andromda.thirdparty.jaxb2_commons:camelcase-always:1.0</extension>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:4.0.0</extension>
</extensions>
</configuration>
<executions>
Expand All @@ -236,116 +218,76 @@
<xsd>src/main/resources/schemas/DoAuthenticateUser.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/CheckApplicantForPrevCRC.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/CreateApplicant.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/CreateNewCRCService.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/CreateSharingService.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/GetCountryList.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/GetNextInvoiceId.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/GetNextSessionId.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/GetProvinceList.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/GetServiceFeeAmount.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/LogEivFailure.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/LogPaymentFailure.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
<xsdOption>
<xsd>src/main/resources/schemas/UpdateServiceFinancialTxn.xsd</xsd>
<packagename>ca.bc.gov.open.ecrc.objects</packagename>
<extension>true</extension>
<extensionArgs>
<extensionArg>-camelcase-always</extensionArg>
</extensionArgs>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<version>3.3.0</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
Expand All @@ -358,7 +300,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<version>0.8.8</version>
<executions>
<execution>
<goals>
Expand All @@ -377,5 +319,4 @@
</plugin>
</plugins>
</build>

</project>
Loading

0 comments on commit 14b28bf

Please sign in to comment.