-
Bug
-
Resolution: Fixed
-
Critical
-
-
1.0.2
Tests cannot be executed due to dependencies problems:
➜ aws-kinesis-consumer-plugin git:(master) ✗ mvn test➜ aws-kinesis-consumer-plugin git:(master) ✗ JAVA_HOME=$(dirname $(dirname $(jenv which java))) mvn test[INFO] Scanning for projects...[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:3.17 is missing, no dependency information available[WARNING] Failed to build parent project for io.jenkins.plugins:aws-kinesis-consumer:hpi:1.0-SNAPSHOT[WARNING][WARNING] Some problems were encountered while building the effective model for io.jenkins.plugins:aws-kinesis-consumer:hpi:1.0-SNAPSHOT[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: software.amazon.awssdk:aws-json-protocol:jar > duplicate declaration of version ${kinesis.version} @ io.jenkins.plugins:aws-kinesis-consumer:${revision}${changelist}, /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/pom.xml, line 124, column 21[WARNING][WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.[WARNING][WARNING] For this reason, future Maven versions might no longer support building such malformed projects.[WARNING][INFO][INFO] --------------< io.jenkins.plugins:aws-kinesis-consumer >-------------[INFO] Building AWS Kinesis Consumer Plugin 1.0-SNAPSHOT[INFO] --------------------------------[ hpi ]--------------------------------[INFO][INFO] — maven-hpi-plugin:3.17:validate (default-validate) @ aws-kinesis-consumer ---[INFO][INFO] — maven-hpi-plugin:3.17:validate-hpi (default-validate-hpi) @ aws-kinesis-consumer ---[INFO][INFO] — maven-enforcer-plugin:3.0.0-M3:display-info (display-info) @ aws-kinesis-consumer ---[INFO] Maven Version: 3.6.3[INFO] JDK Version: 1.8.0_181 normalized as: 1.8.0-181[INFO] OS Info: Arch: x86_64 Family: mac Name: mac os x Version: 10.16[INFO][INFO] — maven-enforcer-plugin:3.0.0-M3:enforce (display-info) @ aws-kinesis-consumer ---[INFO] Adding ignore: module-info[INFO][INFO] — maven-enforcer-plugin:3.0.0-M3:enforce (no-snapshots-in-release) @ aws-kinesis-consumer ---[INFO][INFO] — gmavenplus-plugin:1.12.1:addTestSources (test-in-groovy) @ aws-kinesis-consumer ---[INFO][INFO] — localizer-maven-plugin:1.31:generate (default) @ aws-kinesis-consumer ---[INFO][INFO] — maven-resources-plugin:3.2.0:resources (default-resources) @ aws-kinesis-consumer ---[INFO] Using 'UTF-8' encoding to copy filtered resources.[INFO] Using 'UTF-8' encoding to copy filtered properties files.[INFO] Copying 7 resources[INFO][INFO] — flatten-maven-plugin:1.2.5:flatten (flatten) @ aws-kinesis-consumer ---[INFO] Generating flattened POM of project io.jenkins.plugins:aws-kinesis-consumer:hpi:1.0-SNAPSHOT...[INFO][INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ aws-kinesis-consumer ---[INFO] Changes detected - recompiling the module![INFO] Compiling 12 source files to /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/target/classes[INFO] /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/src/main/java/io/jenkins/plugins/aws/kinesisconsumer/extensions/AWSKinesisStreamListener.java: /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/src/main/java/io/jenkins/plugins/aws/kinesisconsumer/extensions/AWSKinesisStreamListener.java uses or overrides a deprecated API.[INFO] /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/src/main/java/io/jenkins/plugins/aws/kinesisconsumer/extensions/AWSKinesisStreamListener.java: Recompile with -Xlint:deprecation for details.[INFO] /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/src/main/java/io/jenkins/plugins/aws/kinesisconsumer/KinesisStreamItem.java: /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/src/main/java/io/jenkins/plugins/aws/kinesisconsumer/KinesisStreamItem.java uses unchecked or unsafe operations.[INFO] /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/src/main/java/io/jenkins/plugins/aws/kinesisconsumer/KinesisStreamItem.java: Recompile with -Xlint:unchecked for details.[INFO][INFO] — access-modifier-checker:1.21:enforce (default-enforce) @ aws-kinesis-consumer ---[INFO][INFO] — maven-hpi-plugin:3.17:insert-test (default-insert-test) @ aws-kinesis-consumer ---[INFO][INFO] — gmavenplus-plugin:1.12.1:generateTestStubs (test-in-groovy) @ aws-kinesis-consumer ---[INFO] No sources specified for stub generation. Skipping.[INFO] Generated 0 stubs.[INFO][INFO] — maven-antrun-plugin:3.0.0:run (createTempDir) @ aws-kinesis-consumer ---[INFO] Executing tasks[INFO] Executed tasks[INFO][INFO] — maven-resources-plugin:3.2.0:testResources (default-testResources) @ aws-kinesis-consumer ---[INFO] Using 'UTF-8' encoding to copy filtered resources.[INFO] Using 'UTF-8' encoding to copy filtered properties files.[INFO] skip non existing resourceDirectory /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/src/test/resources[INFO][INFO] — maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ aws-kinesis-consumer ---[INFO] Changes detected - recompiling the module![INFO] Compiling 1 source file to /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/target/test-classes[INFO][INFO] — maven-hpi-plugin:3.17:test-hpl (default-test-hpl) @ aws-kinesis-consumer ---[INFO] Generating /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/target/test-classes/the.hpl[INFO][INFO] — maven-hpi-plugin:3.17:resolve-test-dependencies (default-resolve-test-dependencies) @ aws-kinesis-consumer ---[INFO][INFO] — gmavenplus-plugin:1.12.1:compileTests (test-in-groovy) @ aws-kinesis-consumer ---[INFO] No sources specified for compilation. Skipping.[INFO][INFO] — maven-surefire-plugin:3.0.0-M4:test (default-test) @ aws-kinesis-consumer ---[INFO][INFO] -------------------------------------------------------[INFO] T E S T S[INFO] -------------------------------------------------------[ERROR] java.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: Provider mockit.integration.junit5.JMockitTestEngine could not be instantiated[INFO][INFO] Results:[INFO][INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0[INFO][INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 9.451 s[INFO] Finished at: 2021-09-06T17:49:44+02:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project aws-kinesis-consumer: There are test failures.[ERROR][ERROR] Please refer to /Users/syntonyze/dev/source/aws-kinesis-consumer-plugin/target/surefire-reports for the individual test results.[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[ERROR] There was an error in the forked processjava.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: Provider mockit.integration.junit5.JMockitTestEngine could not be instantiated[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked processjava.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: Provider mockit.integration.junit5.JMockitTestEngine could not be instantiated[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:675)[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:248)[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1217)[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1063)[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:889)[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)[ERROR][ERROR] -> [Help 1][ERROR][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR][ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
This is to do with the introduction of mockito, which requires maven-surfire plugin to be configured with a provider and support for junit4.