Skip to content

Commit

Permalink
Development: Update server dependencies
Browse files Browse the repository at this point in the history
Development: Update server dependencies
  • Loading branch information
krusche committed Sep 27, 2024
1 parent de59823 commit 6840edf
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 85 deletions.
13 changes: 0 additions & 13 deletions .idea/runConfigurations/Artemis__Server__Aeolus_.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/runConfigurations/Artemis__Server__GitLabCI___Gitlab_.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/runConfigurations/Artemis__Server__Jenkins___Gitlab_.xml

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,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.5"
implementation "net.sourceforge.plantuml:plantuml:1.2024.7"
implementation "org.jasypt:jasypt:1.9.3"
implementation "me.xdrop:fuzzywuzzy:1.4.0"
implementation("org.yaml:snakeyaml") {
Expand Down Expand Up @@ -368,7 +368,7 @@ dependencies {
implementation "javax.cache:cache-api:1.1.1"
implementation "org.hibernate.orm:hibernate-core:${hibernate_version}"

implementation "com.zaxxer:HikariCP:5.1.0"
implementation "com.zaxxer:HikariCP:6.0.0"

implementation "org.apache.commons:commons-text:1.12.0"
implementation "org.apache.commons:commons-math3:3.6.1"
Expand Down Expand Up @@ -447,7 +447,7 @@ dependencies {
implementation "org.apache.maven:maven-model:3.9.9"
// NOTE: 3.0.2 is broken for splitting lecture specific PDFs
implementation "org.apache.pdfbox:pdfbox:3.0.1"
implementation "org.apache.commons:commons-csv:1.11.0"
implementation "org.apache.commons:commons-csv:1.12.0"
implementation "org.commonmark:commonmark:0.23.0"
implementation "commons-fileupload:commons-fileupload:1.5"
implementation "net.lingala.zip4j:zip4j:2.11.5"
Expand All @@ -457,7 +457,7 @@ dependencies {
implementation "org.apfloat:apfloat:1.14.0"

// use newest version of guava to avoid security issues through outdated dependencies
implementation "com.google.guava:guava:33.3.0-jre"
implementation "com.google.guava:guava:33.3.1-jre"
implementation "com.sun.activation:jakarta.activation:2.0.1"

// use newest version of gson to avoid security issues through outdated dependencies
Expand Down Expand Up @@ -531,7 +531,7 @@ dependencies {
testImplementation "io.github.classgraph:classgraph:4.8.176"
testImplementation "org.awaitility:awaitility:4.2.2"
testImplementation "org.apache.maven.shared:maven-invoker:3.3.0"
testImplementation "org.gradle:gradle-tooling-api:8.10.1"
testImplementation "org.gradle:gradle-tooling-api:8.10.2"
testImplementation "org.apache.maven.surefire:surefire-report-parser:3.5.0"
testImplementation "com.opencsv:opencsv:5.9"
testImplementation("io.zonky.test:embedded-database-spring-test:2.5.1") {
Expand Down Expand Up @@ -613,7 +613,7 @@ tasks.withType(Test).configureEach {
}

wrapper {
gradleVersion = "8.10.1"
gradleVersion = "8.10.2"
}

tasks.register("stage") {
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ node_version=20.16.0
npm_version=10.8.0

# Dependency versions
jhipster_dependencies_version=8.7.0
jhipster_dependencies_version=8.7.1
spring_boot_version=3.3.4
spring_security_version=6.3.3
# TODO: upgrading to 6.6.0 currently leads to issues due to internal changes in Hibernate and potentially wrong use in Artemis server code
Expand All @@ -16,26 +16,26 @@ opensaml_version=4.3.2
jwt_version=0.12.6
jaxb_runtime_version=4.0.5
hazelcast_version=5.5.0
fasterxml_version=2.17.2
fasterxml_version=2.18.0
jgit_version=7.0.0.202409031743-r
sshd_version=2.13.2
checkstyle_version=10.18.1
jplag_version=5.1.0
# not really used in Artemis, nor Jplag, nor the used version of Stanford CoreNLP, but we use the latest to avoid security vulnerabilities
# NOTE: we do not need to use the latest version 9.x here as long as Stanford CoreNLP does not reference it
lucene_version=8.11.3
lucene_version=8.11.4
slf4j_version=2.0.16
sentry_version=7.14.0
liquibase_version=4.29.2
docker_java_version=3.4.0
logback_version=1.5.8
java_parser_version=3.26.2
byte_buddy_version=1.15.1
byte_buddy_version=1.15.3

# testing
# make sure both versions are compatible
junit_version=5.11.0
junit_platform_version=1.11.0
junit_platform_version=1.11.1
mockito_version=5.13.0


Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/
public class ReportParser {

private final ObjectMapper mapper = new ObjectMapper();

// Reports that are bigger then the threshold will not be parsed
// and an issue will be generated. The unit is in megabytes.
private static final int STATIC_CODE_ANALYSIS_REPORT_FILESIZE_LIMIT_IN_MB = 1;
Expand All @@ -36,7 +38,6 @@ public class ReportParser {
public String transformToJSONReport(File file) throws ParserException {
try {
StaticCodeAnalysisReportDTO report = transformToReport(file);
ObjectMapper mapper = new ObjectMapper();
return mapper.writeValueAsString(report);
}
catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
Expand All @@ -25,22 +26,18 @@ record FileViolation(@JacksonXmlProperty(isAttribute = true, localName = "name")
}

@JsonIgnoreProperties(ignoreUnknown = true)
record Violation(@JacksonXmlProperty(isAttribute = true, localName = "rule") String rule,

@JacksonXmlProperty(isAttribute = true, localName = "ruleset") String ruleset,

@JacksonXmlProperty(isAttribute = true, localName = "priority") String priority,

@JacksonXmlProperty(isAttribute = true, localName = "beginline") int beginLine,

@JacksonXmlProperty(isAttribute = true, localName = "endline") int endLine,

@JacksonXmlProperty(isAttribute = true, localName = "begincolumn") int beginColumn,

@JacksonXmlProperty(isAttribute = true, localName = "endcolumn") int endColumn,

@JacksonXmlProperty(localName = "") @JacksonXmlText String message // inner text
) {
record Violation(String rule, String ruleset, String priority, int beginLine, int endLine, int beginColumn, int endColumn, String message) {

// NOTE: we need the json creator here, otherwise parsing does not work with the newest version of Jackson (2.18.0)
@JsonCreator
public static Violation createViolation(@JacksonXmlProperty(isAttribute = true, localName = "rule") String rule,
@JacksonXmlProperty(isAttribute = true, localName = "ruleset") String ruleset, @JacksonXmlProperty(isAttribute = true, localName = "priority") String priority,
@JacksonXmlProperty(isAttribute = true, localName = "beginline") int beginLine, @JacksonXmlProperty(isAttribute = true, localName = "endline") int endLine,
@JacksonXmlProperty(isAttribute = true, localName = "begincolumn") int beginColumn, @JacksonXmlProperty(isAttribute = true, localName = "endcolumn") int endColumn,
@JacksonXmlProperty(localName = "") @JacksonXmlText String message // inner text
) {
return new Violation(rule, ruleset, priority, beginLine, endLine, beginColumn, endColumn, message);
}
}

class PMDParser implements ParserStrategy {
Expand All @@ -54,7 +51,7 @@ public StaticCodeAnalysisReportDTO parse(String xmlContent) {
return createReportFromPMDReport(pmdReport);
}
catch (IOException e) {
throw new RuntimeException("Failed to parse XML", e);
throw new RuntimeException("Failed to parse XML: " + e.getMessage(), e);
}
}

Expand Down

0 comments on commit 6840edf

Please sign in to comment.