Skip to content

Commit

Permalink
upgrade dependencies to PMD 7.0.0 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
Strohgelaender authored Apr 27, 2024
1 parent adf5be3 commit 539e55b
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 96 deletions.
17 changes: 9 additions & 8 deletions artemis-java-template/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id 'checkstyle'
id 'pmd'
id 'com.github.spotbugs' version '5.1.1'
id 'com.github.spotbugs' version '6.0.9'
id 'maven-publish'
id 'com.teamscale' version '30.1.1'
id 'org.openjfx.javafxplugin' version '0.0.14'
id 'org.springframework.boot' version '3.1.2'
id 'io.spring.dependency-management' version '1.1.2'
id 'org.checkerframework' version '0.6.30'
id 'com.teamscale' version '33.1.2'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.checkerframework' version '0.6.37'
}

apply plugin: 'java'
Expand All @@ -20,9 +20,9 @@ repositories {

dependencies {
testImplementation 'de.tum.in.ase:artemis-java-test-sandbox:1.13.0'
testImplementation 'net.bytebuddy:byte-buddy:1.12.21'
testImplementation 'net.bytebuddy:byte-buddy:1.14.13'

implementation 'org.apache.commons:commons-lang3:3.13.0'
implementation 'org.apache.commons:commons-lang3:3.14.0'
}

def assignmentSrcDir = "assignment/src"
Expand Down Expand Up @@ -110,6 +110,7 @@ pmd {
ruleSets = ["$scaConfigDirectory/pmd-configuration.xml"]
rulesMinimumPriority = 5
ignoreFailures = true
toolVersion = '7.0.0'
// exclude the test files
pmdTest.enabled = false
pmdMain.reports {
Expand Down
Binary file modified artemis-java-template/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions artemis-java-template/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions artemis-java-template/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
62 changes: 31 additions & 31 deletions artemis-java-template/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<argLine>-Dfile.encoding=UTF-8</argLine>
<javafx.version>17.0.8</javafx.version>
<mockito.version>5.5.0</mockito.version>
<springboot.version>3.1.4</springboot.version>
<bytebuddy.version>1.14.5</bytebuddy.version>
<mockito.version>5.11.0</mockito.version>
<springboot.version>3.2.4</springboot.version>
<bytebuddy.version>1.14.13</bytebuddy.version>
<scaConfigDirectory>${project.basedir}/staticCodeAnalysisConfig</scaConfigDirectory>
<analyzeTests>false</analyzeTests>
</properties>
Expand All @@ -25,18 +25,18 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.13.0</version>
<version>3.14.0</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.10.0</version>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-testkit</artifactId>
<version>1.10.0</version>
<version>1.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -47,7 +47,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230618</version>
<version>20240303</version>
</dependency>
<dependency>
<groupId>me.xdrop</groupId>
Expand Down Expand Up @@ -77,7 +77,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.15.2</version>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.jsonschema2pojo</groupId>
Expand All @@ -87,12 +87,12 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.7.0.202309050840-r</version>
<version>6.9.0.202403050737-r</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.20.0</version>
<version>2.23.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -142,7 +142,7 @@
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<version>1.1.0</version>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.jasypt</groupId>
Expand All @@ -157,7 +157,7 @@
<dependency>
<groupId>net.jqwik</groupId>
<artifactId>jqwik</artifactId>
<version>1.7.4</version>
<version>1.8.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -178,12 +178,12 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
<version>1.26</version>
<version>1.27</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-components</artifactId>
<version>14.1</version>
<version>14.2</version>
<type>pom</type>
</dependency>
<dependency>
Expand All @@ -194,7 +194,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>4.0.0</version>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.sonatype.spice</groupId>
Expand All @@ -211,7 +211,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -231,7 +231,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.13.0</version>
<configuration>
<source>17</source>
<target>17</target>
Expand Down Expand Up @@ -260,19 +260,19 @@
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>4.0.2</version>
<version>4.0.7</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.5</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
Expand All @@ -299,7 +299,7 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<!-- mvn clean compile assembly:single -->
<version>3.6.0</version>
<version>3.7.1</version>
<configuration>
<archive>
<manifest>
Expand All @@ -314,7 +314,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.7.3.4</version>
<version>4.8.4.0</version>
<configuration>
<!-- Do not analyze the files in the test directory -->
<includeTests>${analyzeTests}</includeTests>
Expand All @@ -334,12 +334,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.12.2</version>
<version>10.15.0</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -354,17 +354,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.21.0</version>
<version>3.22.0</version>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>6.55.0</version>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>6.55.0</version>
<version>7.0.0</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -389,7 +389,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-no-student-code-in-trusted-packages</id>
Expand Down Expand Up @@ -442,7 +442,7 @@
<dependency>
<groupId>com.teamscale</groupId>
<artifactId>impacted-test-engine</artifactId>
<version>30.1.1</version>
<version>33.1.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -451,7 +451,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<ares.security.trustedpackages>okhttp3,com.teamscale,retrofit2,shadow,com.squareup,okio</ares.security.trustedpackages>
Expand All @@ -461,7 +461,7 @@
<plugin>
<groupId>com.teamscale</groupId>
<artifactId>teamscale-maven-plugin</artifactId>
<version>30.1.1</version>
<version>33.1.2</version>
<configuration>
<teamscaleUrl>http://localhost</teamscaleUrl>
<accessToken>dummy</accessToken>
Expand Down
Loading

0 comments on commit 539e55b

Please sign in to comment.