Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>mvn -X</code> helped me to reveal the following:</p> <pre><code>... [INFO] [surefire:test {execution: default-test}] [DEBUG] dummy:dummy:jar:1.0 (selected for null) [DEBUG] org.apache.maven.surefire:surefire-booter:jar:2.4.3:runtime (selected for runtime) [DEBUG] org.apache.maven.surefire:surefire-api:jar:2.4.3:runtime (selected for runtime) [DEBUG] Adding to surefire booter test classpath: /home/mindas/.m2/repository/org/apache/maven/surefire/surefire-booter/2.4.3/surefire-booter-2.4.3.jar [DEBUG] Adding to surefire booter test classpath: /home/mindas/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire-api-2.4.3.jar [DEBUG] dummy:dummy:jar:1.0 (selected for null) [DEBUG] org.testng:testng:jar:jdk15:5.8:test (selected for test) [DEBUG] junit:junit:jar:3.8.1:test (selected for test) [DEBUG] Adding to surefire booter test classpath: /home/mindas/.m2/repository/org/testng/testng/5.8/testng-5.8-jdk15.jar [DEBUG] Adding to surefire booter test classpath: /home/mindas/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar [DEBUG] dummy:dummy:jar:1.0 (selected for null) [DEBUG] Retrieving parent-POM: org.apache.maven.surefire:surefire-providers:pom:2.4.3 for project: null:surefire-testng:jar:null from the repository. [DEBUG] Adding managed dependencies for unknown:surefire-testng [DEBUG] org.apache.maven.surefire:surefire-api:jar:2.4.3 [DEBUG] org.apache.maven.surefire:surefire-booter:jar:2.4.3 [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.5.1 [DEBUG] org.apache.maven.surefire:surefire-testng:jar:2.4.3:test (selected for test) [DEBUG] org.apache.maven:maven-artifact:jar:2.0:test (selected for test) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:test (selected for test) [DEBUG] junit:junit:jar:3.8.1:test (selected for test) [DEBUG] org.testng:testng:jar:jdk15:5.7:test (selected for test) [DEBUG] org.apache.maven.surefire:surefire-api:jar:2.4.3:test (selected for test) ... [DEBUG] Test Classpath : ... [DEBUG] /home/mindas/.m2/repository/junit/junit/4.7/junit-4.7.jar </code></pre> <p>So it seems that the problem was coming from <code>testng</code> jar requiring JUnit v3.8.1. Even though <code>Test Classpath</code> was set to depend on JUnit 4, it was too late.</p> <p><code>testng</code> dependency was located in my POM:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.testng&lt;/groupId&gt; &lt;artifactId&gt;testng&lt;/artifactId&gt; &lt;version&gt;5.8&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;classifier&gt;jdk15&lt;/classifier&gt; &lt;/dependency&gt; </code></pre> <p>Immediately after I have commented it out, tests started to execute.</p> <p>Lessons learned:</p> <ul> <li><code>mvn dependency:tree</code> is not always enough, <code>mvn -X</code> is a friend.</li> <li>surefire is not made for developer heaven (I have realized this while looking at project JIRA reports). This is especially true as there are no other alternatives if you use Maven.</li> </ul> <p>Thanks everybody for your help. Unfortunately there is no way to split answer points between Pascal and Kaleb, but Kaleb's advice to use <code>mvn -X</code> helped me to get on the right track so correct answer points go to him.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload