Skip to content

Commit

Permalink
fix github actions and upgrade to jdk 21
Browse files Browse the repository at this point in the history
  • Loading branch information
intael committed Dec 20, 2023
1 parent 8c6f03a commit 73ec03e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ on:
jobs:
test:
name: Unit Test
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 1.17
distribution: corretto
java-version: 21
cache: maven
- name: Maven test
run: mvn -B clean test
- name: Maven Verify
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 maven:3.9.5-amazoncorretto-17-debian-bookworm
FROM maven:3.9.6-amazoncorretto-21-debian-bookworm

RUN apt update && apt upgrade -y

Expand Down
11 changes: 6 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -99,11 +99,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.12.0</version>
<configuration>
<verbose>true</verbose>
<source>17</source>
<target>17</target>
<source>21</source>
<target>21</target>
<release>21</release>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -132,7 +133,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.0</version>
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private static void run(CommandLine commandLine) {
switch (selectedSite) {
default:
UrlBuilder urlBuilder = createSearchUrlBuilder(selectedSite, commandLine);
realEstateRepository = new SpanishEstateHomeMySqlRepository(); // temporarily coupled here
realEstateRepository = new SpanishEstateHomeMySqlRepository();
crawler = new SpanishEstateWebCrawlerFactory(urlBuilder).build();
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public PlaywrightSiteCollector(
}

@Override
synchronized public Optional<Document> collect(String url) {
public Optional<Document> collect(String url) {
var retries = 0;
while (retries <= maxRetries) {
try (Page page = browser.newPage()) {
Expand Down

0 comments on commit 73ec03e

Please sign in to comment.