Hi,
recently we switched to Junit5 in a new plugin project but discovered that the tests are not found in testing lifecycle. Right now we add
@RunWith(JUnitPlatform.class)
on every test class as workaround but want to get rid of that
I tried to analyze the issue (mvn test -X) and found, that the maven testing lifecycle runs on maven-surefire-plugin 2.12.4 what may be the reason for not running Junit5 tests. The question is, where does this old version come from and how can I fix this? The maven-confluence-plugin should use a newer version and there is no surefire anywhere included as dependency or plugin. Any ideas … ?
[INFO] --- maven-confluence-plugin:6.3.16:unit-test (default-unit-test) @ playground ---
[DEBUG] Configuring mojo com.atlassian.maven.plugins:maven-confluence-plugin:6.3.16:unit-test from plugin realm ClassRealm[extension>com.atlassian.maven.plugins:maven-confluence-plugin:6.3.16, parent: sun.misc.Launcher$AppClassLoader@33909752]
[DEBUG] Configuring mojo 'com.atlassian.maven.plugins:maven-confluence-plugin:6.3.16:unit-test' with basic configurator -->
[DEBUG] (f) buildTestPlugin = false
[DEBUG] (f) closureJsCompiler = false
[DEBUG] (f) encoding = UTF-8
[DEBUG] (f) excludeAllTestDependencies = false
[DEBUG] (f) forceUpdateCheck = false
[DEBUG] (f) offline = false
[DEBUG] (f) pluginArtifactId = maven-confluence-plugin
[DEBUG] (f) pluginVersion = 6.3.16
[DEBUG] (f) project = MavenProject: net.my:playground:1.0.0-SNAPSHOT @ /home/my/project/playground/pom.xml
[DEBUG] (f) reactor = [MavenProject: net.my:playground:1.0.0-SNAPSHOT @ /home/my/project/playground/pom.xml]
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@314a31b0
[DEBUG] (f) skipAllPrompts = false
[DEBUG] (f) skipAmpsPomCheck = false
[DEBUG] (f) skipMinifiedJs = false
[DEBUG] (f) skipUTs = false
[DEBUG] (f) useFastdevCli = true
[DEBUG] (f) versionOverrides = []
[DEBUG] -- end configuration --
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=153217, ConflictMarker.markTime=134496, ConflictMarker.nodeCount=132, ConflictIdSorter.graphTime=122339, ConflictIdSorter.topsortTime=44111, ConflictIdSorter.conflictIdCount=27, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=567491, ConflictResolver.conflictItemCount=77, DefaultDependencyCollector.collectTime=53702972, DefaultDependencyCollector.transformTime=1054908}
**[DEBUG] org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4:**
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.9:compile
[DEBUG] org.apache.maven.surefire:surefire-booter:jar:2.12.4:compile
[DEBUG] org.apache.maven.surefire:surefire-api:jar:2.12.4:compile
[DEBUG] org.apache.maven.surefire:maven-surefire-common:jar:2.12.4:compile
[DEBUG] org.apache.commons:commons-lang3:jar:3.1:compile
[DEBUG] org.apache.maven.shared:maven-common-artifact-filters:jar:1.3:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.8:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-project:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-settings:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-model:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.9:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG] junit:junit:jar:3.8.1:test
[DEBUG] org.apache.maven:maven-core:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9:compile
[DEBUG] org.apache.maven.reporting:maven-reporting-api:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-error-diagnostics:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-descriptor:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-monitor:jar:2.0.9:compile
[DEBUG] classworlds:classworlds:jar:1.1:compile
[DEBUG] org.apache.maven:maven-toolchain:jar:2.0.9:compile
[DEBUG] org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.1:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.4
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.4
Thanks in advance
Manuel