Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 21 Upgrade #65

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pipeline {
sh "git checkout ${env.RELEASE_TAG}"
}
}
withMaven(maven: 'maven-latest', jdk: 'jdk11', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LINUX_MVN_RANDOM}') {
withMaven(maven: 'maven-latest', jdk: 'jdk21', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LINUX_MVN_RANDOM}') {
withCredentials([string(credentialsId: 'sonarqube-token', variable: 'SONAR_TOKEN')]) {
script {
// If this build is not a pull request, run sonar scan
Expand Down Expand Up @@ -247,7 +247,7 @@ pipeline {
}
}

withMaven(maven: 'maven-latest', jdk: 'jdk8-latest', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LINUX_MVN_RANDOM}') {
withMaven(maven: 'maven-latest', jdk: 'jdk21-latest', globalMavenSettingsConfig: 'default-global-settings', mavenSettingsConfig: 'codice-maven-settings', mavenOpts: '${LINUX_MVN_RANDOM}') {
sh 'mvn deploy -B -DskipStatic=true -DskipTests=true -DretryFailedDeploymentCount=10 -nsu $DISABLE_DOWNLOAD_PROGRESS_OPTS'
}
}
Expand Down
9 changes: 2 additions & 7 deletions dominion-pax-exam-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
Expand All @@ -138,8 +132,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
11 changes: 3 additions & 8 deletions dominion-pax-exam-invokers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<artifactId>osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
Expand All @@ -77,12 +77,6 @@
<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>pax-swissbox-tracker</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
Expand All @@ -91,8 +85,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
9 changes: 2 additions & 7 deletions dominion-pax-exam-options/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-karaf</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
Expand All @@ -72,8 +66,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
9 changes: 2 additions & 7 deletions dominion-pax-exam/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-karaf</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
Expand All @@ -73,8 +67,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
9 changes: 2 additions & 7 deletions dominion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
Expand All @@ -77,8 +71,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 3 additions & 1 deletion failsafe-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
<artifactId>failsafe</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<scope>compile</scope>
<type>pom</type>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class Action<R> {
private static final Set<String> PACKAGE_PREFIXES =
ImmutableSet.of(
FailsafeController.class.getPackage().getName() + ".",
"org.codehaus.groovy.",
"org.apache.groovy.",
"sun.",
"com.sun.",
"java.",
Expand Down
30 changes: 22 additions & 8 deletions internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,34 @@
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
<version>${project.version}</version>
<type>pom</type>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*/
package org.codice.test.commons

import org.junit.platform.runner.JUnitPlatform
import org.junit.runner.RunWith
import spock.lang.Specification
import spock.lang.Unroll

Expand All @@ -22,6 +24,7 @@ import java.lang.annotation.Retention
import java.lang.annotation.Target
import java.util.stream.Collectors

@RunWith(JUnitPlatform.class)
class ReflectionUtilsSpec extends Specification {
@Unroll
def "test annotationsByType() finds recursively from #from_what with no filters"() {
Expand Down
35 changes: 25 additions & 10 deletions junit-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,46 @@
<artifactId>javassist</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -122,7 +137,7 @@
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.40</minimum>
<minimum>0.38</minimum>
</limit>
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>COMPLEXITY</counter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.Arrays;
import java.util.List;
import org.codice.junit.impl.DeFinalizeClassLoader;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.Describable;
import org.junit.runner.Description;
import org.junit.runner.Runner;
Expand All @@ -28,7 +29,6 @@
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.JUnit4;
import org.junit.runners.model.InitializationError;
import org.spockframework.runtime.Sputnik;
import spock.lang.Specification;

/**
Expand Down Expand Up @@ -141,7 +141,7 @@ private Runner newTestRunner() throws InitializationError {
if (a != null) {
runnerClass = a.value();
} else if (Specification.class.isAssignableFrom(testClass)) {
runnerClass = Sputnik.class;
runnerClass = JUnitPlatform.class;
} else {
runnerClass = JUnit4.class;
}
Expand Down
9 changes: 2 additions & 7 deletions maven-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-aether</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
Expand All @@ -62,8 +56,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
11 changes: 3 additions & 8 deletions pax-exam-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<artifactId>osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
Expand All @@ -80,12 +80,6 @@
<groupId>org.apache.karaf.features</groupId>
<artifactId>org.apache.karaf.features.core</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.codice.test</groupId>
<artifactId>spock-all</artifactId>
Expand All @@ -94,8 +88,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Loading