From ab4b73a8f2da72b1aaca16e2a274290377b919c3 Mon Sep 17 00:00:00 2001 From: Stephan Krusche Date: Sun, 22 Dec 2024 12:35:35 +0100 Subject: [PATCH] Development: Additional dependency updates --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy-container.yml | 2 +- .husky/pre-commit | 6 +-- Dockerfile | 2 +- build.gradle | 40 ++++++++++++------- docker-compose.prod.yml | 2 +- docker-compose.yml | 2 +- gradle.properties | 1 + src/main/docker/mysql.yml | 2 +- .../cit/aet/config/MysqlTestContainer.java | 2 +- 10 files changed, 34 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6f021f6..1b87aad0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: jobs: test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/deploy-container.yml b/.github/workflows/deploy-container.yml index bc656ef4..39eebe19 100644 --- a/.github/workflows/deploy-container.yml +++ b/.github/workflows/deploy-container.yml @@ -5,7 +5,7 @@ on: jobs: deploy: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest environment: name: artemis-performance-test0.artemis.cit.tum.de url: https://artemis-performance-test0.artemis.cit.tum.de diff --git a/.husky/pre-commit b/.husky/pre-commit index adefefb3..48aed4bb 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - - -"$(dirname "$0")/../npmw" exec --no-install lint-staged +lint-staged --shell diff --git a/Dockerfile b/Dockerfile index 44b68ded..1b237cf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM gradle:8.7-jdk21 AS build +FROM gradle:8.12-jdk21 AS build COPY --chown=gradle:gradle . /home/gradle/src WORKDIR /home/gradle/src diff --git a/build.gradle b/build.gradle index 124adafb..4e5d1d33 100644 --- a/build.gradle +++ b/build.gradle @@ -148,6 +148,10 @@ repositories { } dependencies { + annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen:${hibernateVersion}" + annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}" + annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}" + // import JHipster dependencies BOM implementation platform("tech.jhipster:jhipster-dependencies:${jhipsterDependenciesVersion}") @@ -159,8 +163,6 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-hibernate6" implementation "com.fasterxml.jackson.datatype:jackson-datatype-hppc" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" - testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}" - testImplementation "org.testcontainers:testcontainers:${testcontainersVersion}" implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:2.7.0" implementation "com.zaxxer:HikariCP:6.2.1" implementation "org.apache.commons:commons-lang3:3.17.0" @@ -168,31 +170,26 @@ dependencies { // Openapi generator uses javax namespace for now https://github.com/OpenAPITools/openapi-generator/pull/13593 implementation "javax.annotation:javax.annotation-api:1.3.2" implementation "javax.validation:validation-api:2.0.1.Final" - annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen:${hibernateVersion}" implementation "org.hibernate.orm:hibernate-core" implementation "org.hibernate.validator:hibernate-validator:8.0.2.Final" implementation "org.mapstruct:mapstruct:${mapstructVersion}" - annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}" - annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}" implementation "org.springframework.boot:spring-boot-loader-tools:${springBootVersion}" implementation "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}" implementation "org.springframework.boot:spring-boot-starter-cache:${springBootVersion}" implementation "org.springframework.boot:spring-boot-starter-webflux:${springBootVersion}" implementation "org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}" - testImplementation "org.testcontainers:jdbc:${testcontainersVersion}" implementation "org.springframework.boot:spring-boot-starter-logging:${springBootVersion}" implementation "org.springframework.boot:spring-boot-starter-mail:${springBootVersion}" implementation "org.springframework.boot:spring-boot-starter-security:${springBootVersion}" implementation "org.springframework.boot:spring-boot-starter-thymeleaf:${springBootVersion}" - testImplementation "org.springframework.boot:spring-boot-starter-test:${springBootVersion}" - testImplementation "org.springframework.boot:spring-boot-test:${springBootVersion}" - testImplementation "org.springframework.security:spring-security-test:${springSecurityVersion}" - testImplementation("com.tngtech.archunit:archunit-junit5-api:${archunitJunit5Version}") { - exclude group: "org.slf4j", module: "slf4j-api" - } - testRuntimeOnly("com.tngtech.archunit:archunit-junit5-engine:${archunitJunit5Version}") { - exclude group: "org.slf4j", module: "slf4j-api" - } + + // NOTE: the following dependencies use the newer versions explicitly to avoid other dependencies to use older versions + implementation "ch.qos.logback:logback-classic:${logbackVersion}" + implementation "ch.qos.logback:logback-core:${logbackVersion}" + + // use newest version of commons-compress to avoid security issues through outdated dependencies + implementation "org.apache.commons:commons-compress:1.27.1" + implementation("org.springframework.boot:spring-boot-starter-web:${springBootVersion}") { exclude module: "spring-boot-starter-undertow" } @@ -210,6 +207,19 @@ dependencies { implementation "io.reactivex.rxjava3:rxjava:3.1.10" implementation 'io.netty:netty-resolver-dns-native-macos:4.1.116.Final:osx-aarch_64' implementation 'com.opencsv:opencsv:5.9' + + testImplementation "org.testcontainers:jdbc:${testcontainersVersion}" + testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}" + testImplementation "org.testcontainers:testcontainers:${testcontainersVersion}" + testImplementation "org.springframework.boot:spring-boot-starter-test:${springBootVersion}" + testImplementation "org.springframework.boot:spring-boot-test:${springBootVersion}" + testImplementation "org.springframework.security:spring-security-test:${springSecurityVersion}" + testImplementation("com.tngtech.archunit:archunit-junit5-api:${archunitJunit5Version}") { + exclude group: "org.slf4j", module: "slf4j-api" + } + testRuntimeOnly("com.tngtech.archunit:archunit-junit5-engine:${archunitJunit5Version}") { + exclude group: "org.slf4j", module: "slf4j-api" + } } tasks.register("cleanResources", Delete) { diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index f6beee9f..418646bc 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,7 +1,7 @@ version: '3.8' services: nginx: - image: nginx:1.26.0-alpine-slim + image: nginx:1.27.3-alpine-slim ports: - '80:80' - '443:443' diff --git a/docker-compose.yml b/docker-compose.yml index 254e3e95..0e958b36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: restart: always mysql: - image: mysql:8.4.0 + image: mysql:9.1.0 volumes: - artemis-mysql-data:/var/lib/mysql env_file: diff --git a/gradle.properties b/gradle.properties index ef014f9b..12b4a7b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,6 +18,7 @@ mapstructVersion=1.6.3 archunitJunit5Version=1.3.0 jacksonDatabindNullableVersion=0.2.6 hazelcastSpringVersion=5.5.0 +logbackVersion=1.5.15 mysqlVersion=9.1.0 testcontainersVersion=1.20.4 diff --git a/src/main/docker/mysql.yml b/src/main/docker/mysql.yml index 08d9bdbb..79f98b72 100644 --- a/src/main/docker/mysql.yml +++ b/src/main/docker/mysql.yml @@ -2,7 +2,7 @@ name: artemis-benchmarking services: mysql: - image: mysql:8.4.0 + image: mysql:9.1.0 volumes: - ./config/mysql:/etc/mysql/conf.d # - ~/volumes/jhipster/artemis-benchmarking/mysql/:/var/lib/mysql/ diff --git a/src/test/java/de/tum/cit/aet/config/MysqlTestContainer.java b/src/test/java/de/tum/cit/aet/config/MysqlTestContainer.java index b4b7718c..ecae4f0f 100644 --- a/src/test/java/de/tum/cit/aet/config/MysqlTestContainer.java +++ b/src/test/java/de/tum/cit/aet/config/MysqlTestContainer.java @@ -23,7 +23,7 @@ public void destroy() { @Override public void afterPropertiesSet() { if (null == mysqlContainer) { - mysqlContainer = new MySQLContainer<>("mysql:8.2.0") + mysqlContainer = new MySQLContainer<>("mysql:9.1.0") .withDatabaseName("artemis-benchmarking") .withTmpFs(Collections.singletonMap("/testtmpfs", "rw")) .withLogConsumer(new Slf4jLogConsumer(log))