Skip to content

Commit

Permalink
JAVA 11
Browse files Browse the repository at this point in the history
Move to JAVA 11 to allow modern SSL ciphers on outgoing connectons
  • Loading branch information
phavekes committed May 14, 2024
2 parents 5888086 + 15b28a1 commit a4fe64f
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 28 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '11'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Codecov
uses: codecov/[email protected]
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JAVA 8
- name: Set up JAVA 11
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 11
distribution: "temurin"

- name: Determine the version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_OUTPUT
id: versioncheck

- name: Exit when workflow_dispatch is triggered, and the version does not contain SNAPSHOT in it's name
- name: Exit when workflow_dispatch is triggered, and the version does not contain SNAPSHOT in the name
run: |
echo "Only SNAPSHOT releases can be triggered with the workflow_dispatch"
exit 1
Expand All @@ -41,21 +41,21 @@ jobs:
exit 1
if: github.event_name != 'workflow_dispatch' && steps.versioncheck.outputs.version != github.ref_name

- name: Set up JDK 8 for snapshots
- name: Set up JDK 11 for snapshots
uses: actions/setup-java@v4
with:
java-version: "8"
java-version: "11"
distribution: "temurin"
cache: "maven"
server-id: openconext-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
if: ( endsWith(steps.versioncheck.outputs.version, '-SNAPSHOT'))

- name: Set up JDK 8 for releases
- name: Set up JDK 11 for releases
uses: actions/setup-java@v4
with:
java-version: "8"
java-version: "11"
distribution: "temurin"
cache: "maven"
server-id: openconext-releases
Expand Down Expand Up @@ -103,7 +103,9 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

- name: Codecov
uses: codecov/[email protected]
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Create release
uses: actions/create-release@v1
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Mock implementation of the OOAPI for educational institutions.
- Java 8
- Maven 3

Set the JAVA_HOME property for maven (example for macOS):
```
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
```

## [Building and running](#building-and-running)

### [The student-mobility-home-institution-mock-server](#student-mobility-home-institution-mock-server)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:8-jdk-alpine
FROM eclipse-temurin:11-jdk-alpine
RUN apk --update upgrade && apk add openssl openssl-dev ca-certificates libgcc && update-ca-certificates
COPY target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
28 changes: 14 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath/> <!-- lookup parent from repository -->
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<groupId>org.surfnet</groupId>
<artifactId>student-mobility-home-institution-mock</artifactId>
<version>0.2.12</version>
<version>0.2.13-SNAPSHOT</version>
<name>home-institution-mock</name>
<description>home-institution-mock</description>

<properties>
<java.version>1.8</java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<java.version>11</java.version>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -55,8 +53,13 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.66</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>1.78.1</version>
</dependency>
<dependency>
<groupId>com.github.spullara.mustache.java</groupId>
Expand Down Expand Up @@ -113,7 +116,6 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -161,7 +163,6 @@
</extension>
</extensions>
</build>

<distributionManagement>
<repository>
<id>openconext-releases</id>
Expand All @@ -174,5 +175,4 @@
<url>dav:https://build.openconext.org/repository/public/snapshots</url>
</snapshotRepository>
</distributionManagement>

</project>

0 comments on commit a4fe64f

Please sign in to comment.