Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 2.09 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Maven surefire 2.12 does not run a specific test using -Dtest parameter
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4.     <modelVersion>4.0.0</modelVersion>
  5.  
  6.     <groupId>foo</groupId>
  7.     <artifactId>bar</artifactId>
  8.     <version>1.0-SNAPSHOT</version>
  9.  
  10.     <properties>
  11.         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  12.     </properties>
  13.  
  14.     <dependencies>
  15.         <dependency>
  16.             <groupId>junit</groupId>
  17.             <artifactId>junit</artifactId>
  18.             <version>4.10</version>
  19.             <scope>test</scope>
  20.         </dependency>
  21.     </dependencies>
  22.  
  23.     <build>
  24.         <plugins>
  25.             <plugin>
  26.                 <groupId>org.apache.maven.plugins</groupId>
  27.                 <artifactId>maven-surefire-plugin</artifactId>
  28.                 <version>2.11</version>
  29.             </plugin>
  30.         </plugins>
  31.     </build>
  32. </project>
  33.        
  34. -------------------------------------------------------  T E S T S
  35. ------------------------------------------------------- Running foo.AppTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
  36. elapsed: 0.031 sec
  37.  
  38. Results :
  39.  
  40. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
  41.  
  42. [INFO]
  43. ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO]
  44.        
  45. -------------------------------------------------------  T E S T S
  46.  
  47. Results :
  48.  
  49. Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
  50.  
  51. [INFO]
  52. ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
  53. ------------------------------------------------------------------------ [INFO] Total time: 0.907s [INFO] Finished at: Fri Mar 02 10:37:12 CET
  54. 2012 [INFO] Final Memory: 3M/15M [INFO]
  55. ------------------------------------------------------------------------ [ERROR] Failed to execute goal
  56. org.apache.maven.plugins:maven-surefire-plugin:2.12:test
  57. (default-test) on project bar: No tests were executed!  (Set -D
  58. failIfNoTests=false to ignore this error.) -> [Help 1]