From df6b7899a8778e61b08a495f7b6024601cb70bc9 Mon Sep 17 00:00:00 2001 From: Stephan Krusche Date: Sun, 9 Jun 2024 17:24:46 +0200 Subject: [PATCH] Development: Update server dependencies --- build.gradle | 25 ++++++++-------- gradle.properties | 7 +++-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../artemis/config/LocaleConfiguration.java | 30 ------------------- .../service/RepositoryAccessServiceTest.java | 5 ++-- 5 files changed, 19 insertions(+), 50 deletions(-) delete mode 100644 src/main/java/de/tum/in/www1/artemis/config/LocaleConfiguration.java diff --git a/build.gradle b/build.gradle index fc917bec86e3..f6a219023724 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "jacoco" id "org.springframework.boot" version "${spring_boot_version}" id "io.spring.dependency-management" version "1.1.5" - id "com.google.cloud.tools.jib" version "3.4.2" + id "com.google.cloud.tools.jib" version "3.4.3" id "com.github.node-gradle.node" version "${gradle_node_plugin_version}" id "com.diffplug.spotless" version "6.25.0" // this allows us to find outdated dependencies via ./gradlew dependencyUpdates @@ -284,7 +284,7 @@ dependencies { implementation "org.apache.sshd:sshd-sftp:${sshd_version}" // https://mvnrepository.com/artifact/net.sourceforge.plantuml/plantuml - implementation "net.sourceforge.plantuml:plantuml:1.2024.4" + implementation "net.sourceforge.plantuml:plantuml:1.2024.5" implementation "org.jasypt:jasypt:1.9.3" implementation "me.xdrop:fuzzywuzzy:1.4.0" implementation("org.yaml:snakeyaml") { @@ -376,13 +376,13 @@ dependencies { implementation "org.springframework.ldap:spring-ldap-core:3.2.3" implementation "org.springframework.data:spring-data-ldap:3.3.0" - implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:4.1.1") { + implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:4.1.2") { // NOTE: these modules contain security vulnerabilities and are not needed exclude module: "commons-jxpath" exclude module: "woodstox-core" } - implementation "org.springframework.cloud:spring-cloud-starter-config:4.1.1" - implementation "org.springframework.cloud:spring-cloud-commons:4.1.2" + implementation "org.springframework.cloud:spring-cloud-starter-config:4.1.2" + implementation "org.springframework.cloud:spring-cloud-commons:4.1.3" implementation "io.netty:netty-all:4.1.110.Final" implementation "io.projectreactor.netty:reactor-netty:1.1.19" @@ -395,7 +395,7 @@ dependencies { implementation "org.springframework.security:spring-security-oauth2-core:${spring_security_version}" implementation "org.springframework.security:spring-security-oauth2-client:${spring_security_version}" // use newest version of nimbus-jose-jwt to avoid security issues through outdated dependencies - implementation "com.nimbusds:nimbus-jose-jwt:9.39.1" + implementation "com.nimbusds:nimbus-jose-jwt:9.40" implementation "org.springframework.security:spring-security-oauth2-jose:${spring_security_version}" implementation "org.springframework.security:spring-security-crypto:${spring_security_version}" @@ -436,7 +436,7 @@ dependencies { implementation "net.lingala.zip4j:zip4j:2.11.5" implementation "org.jgrapht:jgrapht-core:1.5.2" // use newest version of guava to avoid security issues through outdated dependencies - implementation "com.google.guava:guava:33.2.0-jre" + implementation "com.google.guava:guava:33.2.1-jre" // use newest version of gson to avoid security issues through outdated dependencies implementation "com.google.code.gson:gson:2.11.0" @@ -466,13 +466,13 @@ dependencies { } testImplementation "org.springframework.security:spring-security-test:${spring_security_version}" testImplementation "org.springframework.boot:spring-boot-test:${spring_boot_version}" - testImplementation "org.assertj:assertj-core:3.25.3" + testImplementation "org.assertj:assertj-core:3.26.0" testImplementation "org.mockito:mockito-core:${mockito_version}" testImplementation "org.mockito:mockito-junit-jupiter:${mockito_version}" - testImplementation "io.github.classgraph:classgraph:4.8.171" + testImplementation "io.github.classgraph:classgraph:4.8.173" testImplementation "org.awaitility:awaitility:4.2.1" testImplementation "org.apache.maven.shared:maven-invoker:3.3.0" - testImplementation "org.gradle:gradle-tooling-api:8.7" + testImplementation "org.gradle:gradle-tooling-api:8.8" testImplementation "org.apache.maven.surefire:surefire-report-parser:3.2.5" testImplementation "com.opencsv:opencsv:5.9" testImplementation("io.zonky.test:embedded-database-spring-test:2.5.1") { @@ -485,10 +485,9 @@ dependencies { } testImplementation("net.bytebuddy:byte-buddy") { version { - strictly "1.14.16" + strictly "1.14.17" } } - testImplementation "io.github.classgraph:classgraph:4.8.172" testImplementation "com.h2database:h2:2.2.224" // Lightweight JSON library needed for the internals of the MockRestServiceServer @@ -556,7 +555,7 @@ tasks.withType(Test).configureEach { } wrapper { - gradleVersion = "8.7" + gradleVersion = "8.8" } tasks.register("stage") { diff --git a/gradle.properties b/gradle.properties index 6204ca51c11b..8ef3fb7506de 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,9 +6,10 @@ node_version=20.10.0 npm_version=10.2.3 # Dependency versions -jhipster_dependencies_version=8.4.0 +jhipster_dependencies_version=8.5.0 spring_boot_version=3.3.0 spring_security_version=6.3.0 +# NOTE: Update to 6.5.x not possible due to issues with query performance hibernate_version=6.4.8.Final # TODO: can we update to 5.x? opensaml_version=4.3.2 @@ -20,10 +21,10 @@ mockito_version=5.12.0 fasterxml_version=2.17.1 jgit_version=6.9.0.202403050737-r sshd_version=2.12.1 -checkstyle_version=10.16.0 +checkstyle_version=10.17.0 jplag_version=5.1.0 slf4j_version=2.0.13 -sentry_version=7.9.0 +sentry_version=7.10.0 liquibase_version=4.28.0 docker_java_version=3.3.6 logback_version=1.5.6 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b82aa23a4f05..a4413138c96c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/java/de/tum/in/www1/artemis/config/LocaleConfiguration.java b/src/main/java/de/tum/in/www1/artemis/config/LocaleConfiguration.java deleted file mode 100644 index 165bade4c67a..000000000000 --- a/src/main/java/de/tum/in/www1/artemis/config/LocaleConfiguration.java +++ /dev/null @@ -1,30 +0,0 @@ -package de.tum.in.www1.artemis.config; - -import static de.tum.in.www1.artemis.config.Constants.PROFILE_CORE; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.springframework.web.servlet.LocaleResolver; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; - -import tech.jhipster.config.locale.AngularCookieLocaleResolver; - -@Profile(PROFILE_CORE) -@Configuration -public class LocaleConfiguration implements WebMvcConfigurer { - - @Bean - public LocaleResolver localeResolver() { - return new AngularCookieLocaleResolver("NG_TRANSLATE_LANG_KEY"); - } - - @Override - public void addInterceptors(InterceptorRegistry registry) { - LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); - localeChangeInterceptor.setParamName("language"); - registry.addInterceptor(localeChangeInterceptor); - } -} diff --git a/src/test/java/de/tum/in/www1/artemis/service/RepositoryAccessServiceTest.java b/src/test/java/de/tum/in/www1/artemis/service/RepositoryAccessServiceTest.java index 40cf61cdb011..a6704f662b99 100644 --- a/src/test/java/de/tum/in/www1/artemis/service/RepositoryAccessServiceTest.java +++ b/src/test/java/de/tum/in/www1/artemis/service/RepositoryAccessServiceTest.java @@ -101,9 +101,8 @@ void testShouldEnforceLockRepositoryPolicy() throws Exception { programmingExerciseGradingService.processNewProgrammingExerciseResult(participation, resultRequestBody); // Should throw an AccessForbiddenException because the submission limit is already reached. - AccessForbiddenException exception = catchThrowableOfType( - () -> repositoryAccessService.checkAccessRepositoryElseThrow(participation, student, programmingExercise, RepositoryActionType.WRITE), - AccessForbiddenException.class); + AccessForbiddenException exception = catchThrowableOfType(AccessForbiddenException.class, + () -> repositoryAccessService.checkAccessRepositoryElseThrow(participation, student, programmingExercise, RepositoryActionType.WRITE)); assertThat(exception.getMessage()).isEqualTo("You are not allowed to access the repository of this programming exercise."); }