Ban JUnit 4 imports #369
Merged
Ban JUnit 4 imports #369
ci.jenkins.io / Jenkins
failed
Aug 15, 2025 in 2m 59s
linux-17/Build (linux-17): error in 'junit' step
linux-21 / Checkout (linux-21) / Check out from version control
Error in checkout step.
null
Build log
[2025-08-15T11:00:06.630Z] ERROR: Checkout failed
[2025-08-15T11:00:06.630Z] java.lang.InterruptedException
[2025-08-15T11:00:06.630Z] at java.base/java.lang.Object.wait0(Native Method)
[2025-08-15T11:00:06.630Z] at java.base/java.lang.Object.wait(Unknown Source)
[2025-08-15T11:00:06.630Z] at hudson.remoting.Request.call(Request.java:179)
[2025-08-15T11:00:06.630Z] at hudson.remoting.Channel.call(Channel.java:1107)
[2025-08-15T11:00:06.630Z] at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:306)
[2025-08-15T11:00:06.630Z] Caused: hudson.remoting.RemotingSystemException
[2025-08-15T11:00:06.630Z] at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:328)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for git-client/jdk.proxy129/jdk.proxy129.$Proxy290.addCredentials(Unknown Source)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl.addCredentials(RemoteGitImpl.java:218)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for git//hudson.plugins.git.GitSCM.createClient(GitSCM.java:925)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for git//hudson.plugins.git.GitSCM.createClient(GitSCM.java:846)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1300)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
[2025-08-15T11:00:06.631Z] at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:49)
[2025-08-15T11:00:06.631Z] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[2025-08-15T11:00:06.631Z] at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
[2025-08-15T11:00:06.631Z] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[2025-08-15T11:00:06.631Z] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[2025-08-15T11:00:06.631Z] at java.base/java.lang.Thread.run(Unknown Source)
[2025-08-15T11:00:06.631Z] ERROR: Maximum checkout retry attempts reached, aborting
linux-17 / Build (linux-17) / Shell Script
Error in sh step, with arguments mvn --batch-mode --show-version --errors --no-transfer-progress --update-snapshots -Dmaven.repo.local=/home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369@tmp/m2repo -Dmaven.test.failure.ignore -Dspotbugs.failOnError=false -Dcheckstyle.failOnViolation=false -Dcheckstyle.failsOnError=false -Dpmd.failOnViolation=false -Penable-jacoco clean install.
script returned exit code 1
Build log
[2025-08-15T10:59:51.811Z] + mvn --batch-mode --show-version --errors --no-transfer-progress --update-snapshots -Dmaven.repo.local=/home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369@tmp/m2repo -Dmaven.test.failure.ignore -Dspotbugs.failOnError=false -Dcheckstyle.failOnViolation=false -Dcheckstyle.failsOnError=false -Dpmd.failOnViolation=false -Penable-jacoco clean install
[2025-08-15T10:59:51.913Z] -XX:ConcGCThreads=1 -XX:G1ConcRefinementThreads=4 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=187499968 -XX:MarkStackSize=4194304 -XX:MaxHeapSize=2999999488 -XX:MinHeapSize=6815736 -XX:+PrintCommandLineFlags -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:-THPStackMitigation -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
[2025-08-15T10:59:52.127Z] Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
[2025-08-15T10:59:52.128Z] Maven home: /usr/share/apache-maven-3.9.11
[2025-08-15T10:59:52.128Z] Java version: 17.0.16, vendor: Eclipse Adoptium, runtime: /opt/jdk-17
[2025-08-15T10:59:52.128Z] Default locale: en_US, platform encoding: UTF-8
[2025-08-15T10:59:52.129Z] OS name: "linux", version: "6.1.144-170.251.amzn2023.x86_64", arch: "amd64", family: "unix"
[2025-08-15T10:59:53.034Z] [INFO] Error stacktraces are turned on.
[2025-08-15T10:59:53.034Z] [INFO] Scanning for projects...
[2025-08-15T10:59:57.471Z] [INFO]
[2025-08-15T10:59:57.471Z] [INFO] -----------< org.jenkins-ci.plugins:generic-webhook-trigger >-----------
[2025-08-15T10:59:57.472Z] [INFO] Building Generic Webhook Trigger Plugin 2.4.2-SNAPSHOT
[2025-08-15T10:59:57.472Z] [INFO] from pom.xml
[2025-08-15T10:59:57.473Z] [INFO] --------------------------------[ hpi ]---------------------------------
[2025-08-15T11:00:00.787Z] [INFO]
[2025-08-15T11:00:00.788Z] [INFO] --- clean:3.5.0:clean (default-clean) @ generic-webhook-trigger ---
[2025-08-15T11:00:00.788Z] [INFO]
[2025-08-15T11:00:00.788Z] [INFO] --- hpi:3.66:validate (default-validate) @ generic-webhook-trigger ---
[2025-08-15T11:00:00.789Z] [INFO] Created marker file /home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369/target/java-level/17
[2025-08-15T11:00:00.789Z] [INFO]
[2025-08-15T11:00:00.789Z] [INFO] --- hpi:3.66:validate-hpi (default-validate-hpi) @ generic-webhook-trigger ---
[2025-08-15T11:00:01.391Z] [INFO]
[2025-08-15T11:00:01.392Z] [INFO] --- enforcer:3.6.1:enforce (display-info) @ generic-webhook-trigger ---
[2025-08-15T11:00:01.994Z] [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed
[2025-08-15T11:00:01.994Z] [INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed
[2025-08-15T11:00:02.597Z] [INFO] Rule 2: org.codehaus.mojo.extraenforcer.dependencies.EnforceBytecodeVersion passed
[2025-08-15T11:00:02.598Z] [INFO] Rule 3: org.apache.maven.enforcer.rules.dependency.BannedDependencies passed
[2025-08-15T11:00:02.699Z] [INFO] Rule 4: org.apache.maven.enforcer.rules.dependency.BannedDependencies passed
[2025-08-15T11:00:02.699Z] [INFO] Ignoring requireUpperBoundDeps in org.ow2.asm:asm
[2025-08-15T11:00:02.699Z] [INFO] Rule 5: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps passed
[2025-08-15T11:00:02.700Z] [INFO]
[2025-08-15T11:00:02.700Z] [INFO] --- enforcer:3.6.1:enforce (no-snapshots-in-release) @ generic-webhook-trigger ---
[2025-08-15T11:00:02.700Z] [INFO] Rule 0: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps passed
[2025-08-15T11:00:02.701Z] [INFO]
[2025-08-15T11:00:02.701Z] [INFO] --- jacoco:0.8.13:prepare-agent (default) @ generic-webhook-trigger ---
[2025-08-15T11:00:03.303Z] [INFO] argLine set to -javaagent:/home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369@tmp/m2repo/org/jacoco/org.jacoco.agent/0.8.13/org.jacoco.agent-0.8.13-runtime.jar=destfile=/home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369/target/jacoco.exec,excludes=**/Messages.class:org/htmlunit/** -Xms768M -Xmx768M -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1 @{jenkins.addOpens} @{jenkins.insaneHook} @{jenkins.javaAgent}
[2025-08-15T11:00:03.304Z] [INFO]
[2025-08-15T11:00:03.304Z] [INFO] --- localizer:1.31:generate (default) @ generic-webhook-trigger ---
[2025-08-15T11:00:03.806Z] [INFO]
[2025-08-15T11:00:03.807Z] [INFO] --- enforcer:3.6.1:enforce (check-junit-imports) @ generic-webhook-trigger ---
[2025-08-15T11:00:03.807Z] [WARNING] ruleName restrictImports with implementation org.apache.maven.plugins.enforcer.RestrictImportsuses the deprecated Maven Enforcer Plugin API. This will not be supported in a future version of the plugin. Please contact the rule maintainer to upgrade the rule implementation to the current API.
[2025-08-15T11:00:03.908Z] [INFO] ------------------------------------------------------------------------
[2025-08-15T11:00:03.908Z] [INFO] BUILD FAILURE
[2025-08-15T11:00:03.909Z] [INFO] ------------------------------------------------------------------------
[2025-08-15T11:00:03.909Z] [INFO] Total time: 10.813 s
[2025-08-15T11:00:03.909Z] [INFO] Finished at: 2025-08-15T11:00:03Z
[2025-08-15T11:00:03.909Z] [INFO] ------------------------------------------------------------------------
[2025-08-15T11:00:03.909Z] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.1:enforce (check-junit-imports) on project generic-webhook-trigger:
[2025-08-15T11:00:03.910Z] [ERROR] Rule 0: org.apache.maven.plugins.enforcer.RestrictImports failed with message:
[2025-08-15T11:00:03.910Z] [ERROR]
[2025-08-15T11:00:03.910Z] [ERROR] Banned imports detected in TEST code:
[2025-08-15T11:00:03.910Z] [ERROR]
[2025-08-15T11:00:03.911Z] [ERROR] Reason: Use JUnit 5 (org.junit.jupiter.*)
[2025-08-15T11:00:03.911Z] [ERROR] in file:///home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369/src/test/java/org/jenkinsci/plugins/gwt/bdd/RunTest.java
[2025-08-15T11:00:03.911Z] [ERROR] org.junit.platform.suite.api.IncludeEngines (Line: 3, Matched by: org.junit.**)
[2025-08-15T11:00:03.911Z] [ERROR] org.junit.platform.suite.api.SelectClasspathResource (Line: 4, Matched by: org.junit.**)
[2025-08-15T11:00:03.912Z] [ERROR] org.junit.platform.suite.api.Suite (Line: 5, Matched by: org.junit.**)
[2025-08-15T11:00:03.912Z] [ERROR]
[2025-08-15T11:00:03.912Z] [ERROR] Analysis of 53 files took less than 1 second
[2025-08-15T11:00:03.912Z] [ERROR] -> [Help 1]
[2025-08-15T11:00:03.913Z] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.1:enforce (check-junit-imports) on project generic-webhook-trigger:
[2025-08-15T11:00:03.913Z] Rule 0: org.apache.maven.plugins.enforcer.RestrictImports failed with message:
[2025-08-15T11:00:03.913Z]
[2025-08-15T11:00:03.913Z] Banned imports detected in TEST code:
[2025-08-15T11:00:03.914Z]
[2025-08-15T11:00:03.914Z] Reason: Use JUnit 5 (org.junit.jupiter.*)
[2025-08-15T11:00:03.914Z] in file:///home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369/src/test/java/org/jenkinsci/plugins/gwt/bdd/RunTest.java
[2025-08-15T11:00:03.914Z] org.junit.platform.suite.api.IncludeEngines (Line: 3, Matched by: org.junit.**)
[2025-08-15T11:00:03.914Z] org.junit.platform.suite.api.SelectClasspathResource (Line: 4, Matched by: org.junit.**)
[2025-08-15T11:00:03.915Z] org.junit.platform.suite.api.Suite (Line: 5, Matched by: org.junit.**)
[2025-08-15T11:00:03.915Z]
[2025-08-15T11:00:03.915Z] Analysis of 53 files took less than 1 second
[2025-08-15T11:00:03.915Z]
[2025-08-15T11:00:03.916Z] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
[2025-08-15T11:00:03.916Z] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
[2025-08-15T11:00:03.916Z] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
[2025-08-15T11:00:03.916Z] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
[2025-08-15T11:00:03.916Z] at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
[2025-08-15T11:00:03.917Z] at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
[2025-08-15T11:00:03.917Z] at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
[2025-08-15T11:00:03.917Z] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
[2025-08-15T11:00:03.917Z] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
[2025-08-15T11:00:03.917Z] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
[2025-08-15T11:00:03.918Z] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
[2025-08-15T11:00:03.918Z] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
[2025-08-15T11:00:03.918Z] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
[2025-08-15T11:00:03.918Z] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
[2025-08-15T11:00:03.919Z] at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
[2025-08-15T11:00:03.919Z] at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
[2025-08-15T11:00:03.919Z] at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
[2025-08-15T11:00:03.919Z] at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
[2025-08-15T11:00:03.919Z] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[2025-08-15T11:00:03.920Z] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
[2025-08-15T11:00:03.920Z] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[2025-08-15T11:00:03.920Z] at java.lang.reflect.Method.invoke (Method.java:569)
[2025-08-15T11:00:03.920Z] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
[2025-08-15T11:00:03.921Z] at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
[2025-08-15T11:00:03.921Z] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
[2025-08-15T11:00:03.921Z] at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[2025-08-15T11:00:03.921Z] Caused by: org.apache.maven.plugin.MojoExecutionException:
[2025-08-15T11:00:03.921Z] Rule 0: org.apache.maven.plugins.enforcer.RestrictImports failed with message:
[2025-08-15T11:00:03.922Z]
[2025-08-15T11:00:03.922Z] Banned imports detected in TEST code:
[2025-08-15T11:00:03.922Z]
[2025-08-15T11:00:03.922Z] Reason: Use JUnit 5 (org.junit.jupiter.*)
[2025-08-15T11:00:03.922Z] in file:///home/jenkins/agent/workspace/ic-webhook-trigger-plugin_PR-369/src/test/java/org/jenkinsci/plugins/gwt/bdd/RunTest.java
[2025-08-15T11:00:03.923Z] org.junit.platform.suite.api.IncludeEngines (Line: 3, Matched by: org.junit.**)
[2025-08-15T11:00:03.923Z] org.junit.platform.suite.api.SelectClasspathResource (Line: 4, Matched by: org.junit.**)
[2025-08-15T11:00:03.923Z] org.junit.platform.suite.api.Suite (Line: 5, Matched by: org.junit.**)
[2025-08-15T11:00:03.923Z]
[2025-08-15T11:00:03.924Z] Analysis of 53 files took less than 1 second
[2025-08-15T11:00:03.924Z]
[2025-08-15T11:00:03.924Z] at org.apache.maven.plugins.enforcer.EnforceMojo.execute (EnforceMojo.java:271)
[2025-08-15T11:00:03.924Z] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
[2025-08-15T11:00:03.924Z] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
[2025-08-15T11:00:03.925Z] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
[2025-08-15T11:00:03.925Z] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
[2025-08-15T11:00:03.925Z] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
[2025-08-15T11:00:03.925Z] at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
[2025-08-15T11:00:03.925Z] at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
[2025-08-15T11:00:03.926Z] at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
[2025-08-15T11:00:03.926Z] at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
[2025-08-15T11:00:03.926Z] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
[2025-08-15T11:00:03.926Z] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
[2025-08-15T11:00:03.926Z] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
[2025-08-15T11:00:03.926Z] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
[2025-08-15T11:00:03.927Z] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
[2025-08-15T11:00:03.927Z] at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
[2025-08-15T11:00:03.927Z] at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
[2025-08-15T11:00:03.927Z] at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
[2025-08-15T11:00:03.927Z] at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
[2025-08-15T11:00:03.928Z] at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
[2025-08-15T11:00:03.928Z] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[2025-08-15T11:00:03.928Z] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
[2025-08-15T11:00:03.928Z] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[2025-08-15T11:00:03.929Z] at java.lang.reflect.Method.invoke (Method.java:569)
[2025-08-15T11:00:03.929Z] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
[2025-08-15T11:00:03.929Z] at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
[2025-08-15T11:00:03.929Z] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
[2025-08-15T11:00:03.929Z] at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[2025-08-15T11:00:03.930Z] [ERROR]
[2025-08-15T11:00:03.930Z] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[2025-08-15T11:00:03.930Z] [ERROR]
[2025-08-15T11:00:03.930Z] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[2025-08-15T11:00:03.930Z] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
linux-17 / Build (linux-17) / Archive JUnit-formatted test results
Error in junit step.
No test report files were found. Configuration error?
Build log
[2025-08-15T11:00:06.181Z] Recording test results
[2025-08-15T11:00:06.337Z] No test report files were found. Configuration error?
Details
Loading