开发者

Maven/Surefire not finding unit tests

I tried creating a test project with maven and the unit testing worked fine. However, when trying to do the same for a j2ee project, the unit tests cannot be found by surefire. The tests are in the correct directory (src/test/java) and they are being compiled.

The junit test is at src/test/java/unit/TestAddition.java

The surefire plugin config in pom.xml does not include/exclude any files.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.8</version>  
</plugin>

and junit, testng

<!-- Testing dependencies -->
<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.8.2</version>
  <scope>test</scope>
</dependency>

<dependency>
  <groupId>org.testng</groupId>
  <artifactId>testng</artifactId>
  <version>6.0.1</version>
  <scope>test</scope>
</dependency>

Here's the output of "mvn clean test"

[DEBUG]   (s) reportFormat = brief
[DEBUG]   (s) reportsDirectory = c:\workspace\JAdaptivLatest\target\surefire-reports
[DEBUG]   (s) runOrder = filesystem
[DEBUG]   (s) session = org.apache.maven.execution.MavenSession@1cf662f
[DEBUG]   (s) skip = false
[DEBUG]   (s) skipTests = false
[DEBUG]   (s) testClassesDirectory = c:\workspace\JAdaptivLatest\target\test-classes
[DEBUG]   (s) testFailureIgnore = false
[DEBUG]   (s) testNGArtifactName = org.testng:testng
[DEBUG]   (s) testSourceDirectory = c:\workspace\JAdaptivLatest\src\test\java
[DEBUG]   (s) trimStackTrace = true
[DEBUG]   (s) useFile = true
[DEBUG]   (s) useManifestOnlyJar = true
[DEBUG]   (s) useSystemClassLoader = true
[DEBUG]   (s) useUnlimitedThreads = false
[DEBUG]   (s) workingDirectory = c:\workspace\JAdaptivLatest
[DEBUG] -- end configuration --
[INFO] Surefire report directory: c:\workspace\JAdaptivLatest\target\surefire-reports
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG]   org.apache.maven.surefire:surefire-booter:jar:2.8:compile (selected for compile)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.8:compile (selected for compile)
[DEBUG] Adding to surefire booter test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-booter\2.8\surefire-booter-2.8.jar
Scope: compile
[DEBUG] Adding to surefire booter test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-api\2.8\surefire-api-2.8.jar Scope:
 compile
[DEBUG] Setting system property [user.dir]=[c:\workspace\JAdaptivLatest]
[DEBUG] Setting system property [localRepository]=[C:\Users\Croydon.IVSTEL1\.m2\repository]
[DEBUG] Setting system property [basedir]=[c:\workspace\JAdaptivLatest]
[DEBUG] Using JVM: C:\Program Files (x86)\Java\jdk1.6.0_24\jre\bin\java
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG]   org.apache.maven.surefire:surefire-testng:jar:2.8: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]     org.apache.maven.surefire:surefire-testng-utils:jar:2.8:test (selected for test)
[DEBUG]       org.testng:testng:jar:jdk15:5.7:test (selected for test)
[DEBUG]         junit:junit:jar:3.8.1:test (selected for test)
[DEBUG]       org.apache.maven.surefire:surefire-api:jar:2.8:test (selected for test)
[DEBUG]     org.testng:testng:jar:jdk15:5.7:test (selected for test)
[DEBUG]       junit:junit:jar:3.8.1:test (selected for test)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.8:test (selected for test)
[DEBUG] Adding to surefire test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-testng\2.8\surefire-testng-2.8.jar Scope:
test
[DEBUG] Adding to surefire test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\maven-artifact\2.0\maven-artifact-2.0.jar Scope: test
[DEBUG] Adding to surefire test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\codehaus\plexus\plexus-utils\1.0.4\plexus-utils-1.0.4.jar Scope: test
[DEBUG] Adding to surefire test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-testng-utils\2.8\surefire-testng-utils-2.8
.jar Scope: test
[DEBUG] Adding to surefire test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-api\2.8\surefire-api-2.8.jar Scope: test
[DEBUG] test classpath classpath:
[DEBUG]   c:\workspace\JAdaptivLatest\target\test-classes
[DEBUG]   c:\workspace\JAdaptivLatest\target\classes
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\junit\junit\4.8.2\junit-4.8.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\testng\testng\6.0.1\testng-6.0.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\beanshell\bsh\2.0b4\bsh-2.0b4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\com\beust\jcommander\1.12\jcommander-1.12.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\yaml\snakeyaml\1.6\snakeyaml-1.6.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\server\selenium-server\1.0.3\selenium-server-1.0.3-standalone.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\server\selenium-server-coreless\1.0.3\selenium-server-coreless-1.0.3.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\ant\ant\1.7.1\ant-1.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\ant\ant-launcher\1.7.1\ant-launcher-1.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\servlet\servlet-api\2.4\servlet-api-2.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\bouncycastle\bcprov-jdk15\135\bcprov-jdk15-135.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\core\selenium-core\1.0.1\selenium-core-1.0.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\client-drivers\selenium-java-client-driver\1.0.2\selenium-java-client-driver-1.0.2.jar

[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\uncommons\reportng\1.1.2\reportng-1.1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\testng\testng\5.0\testng-5.0-jdk15.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\velocity\velocity\1.4\velocity-1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\velocity\velocity-dep\1.5\velocity-dep-1.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\jtidy\jtidy\4aug2000r7-dev\jtidy-4aug2000r7-dev.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\easymock\easymock\3.0\easymock-3.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\cglib\cglib-nodep\2.2\cglib-nodep-2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\objenesis\objenesis\1.2\objenesis-1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\com\jcraft\jsch\0.1.42\jsch-0.1.42.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\snmp4j\snmp4j\1.8.1\snmp4j-1.8.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\extremecomponents\extremecomponents\1.0.1\extremecomponents-1.0.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-collections\commons-collections\3.0\commons-collections-3.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\tinyradius\tinyradius\1.0\tinyradius-1.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\commons\commons-email\1.2\commons-email-1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\mail\mail\1.4.1\mail-1.4.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-net\commons-net\2.2\commons-net-2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-pool\commons-pool\1.5.5\commons-pool-1.5.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-fileupload\commons-fileupload\1.2.2\commons-fileupload-1.2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\directwebremoting\dwr\3.0.M1\dwr-3.0.M1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\mortbay\jetty\cometd\6.1.4\cometd-6.1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\mortbay\jetty\jetty-util\6.1.4\jetty-util-6.1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javolution\javolution\5.5.1\javolution-5.5.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\net\java\dev\eval\eval\0.5\eval-0.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\javaee-api\6.0\javaee-api-6.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\slf4j\slf4j-log4j12\1.6.1\slf4j-log4j12-1.6.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\slf4j\slf4j-api\1.6.1\slf4j-api-1.6.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\aspectj\aspectjtools\1.6.10\aspectjtools-1.6.10.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xalan\xalan\2.7.1\xalan-2.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xalan\serializer\2.7.1\serializer-2.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\tomcat\tomcat-dbcp\7.0.5\tomcat-dbcp-7.0.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\cglib\cglib\2.2\cglib-2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\asm\asm\3.1\asm-3.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-core\3.3.2.GA\hibernate-core-3.3.2.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\antlr\antlr\2.7.6\antlr-2.7.6.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-annotations\3.4.0.GA\hibernate-annotations-3.4.0.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-commons-annotations\3.3.0.ga\hibernate-commons-annotations-3.3.0.ga.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-entitymanager\3.4.0.GA\hibernate-entitymanager-3.4.0.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javassist\javassist\3.4.GA\javassist-3.4.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-validator\3.1.0.GA\hibernate-validator-3.1.0.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\ejb3-persistence\1.0.2.GA\ejb3-persistence-1.0.2.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\mysql\mysql-connector-java\5.1.14\mysql-connector-java-5.1.14.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-core\2.2.1.1\struts2-core-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\xwork\xwork-core\2.2.1.1\xwork-core-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\freemarker\freemarker\2.3.16\freemarker-2.3.16.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\ognl\ognl\3.0\ognl-3.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-io\commons-io\1.3.2\commons-io-1.3.2.jar
[DEBUG]   C:\Program Files (x86)\Java\jdk1.6.0_24\jre\..\lib\tools.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-dojo-plugin\2.2.1.1\struts2-dojo-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-json-plugin\2.2.1.1\struts2-json-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-spring-plugin\2.2.1.1\struts2-spring-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-junit-plugin\2.2.1.1\struts2-junit-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-testng-plugin\2.2.1.1\struts2-testng-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\taglibs\standard\1.1.2\standard-1.1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-core\3.0.5.RELEASE\spring-core-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-asm\3.0.5.RELEASE\spring-asm-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-expression\3.0.5.RELEASE\spring-expression-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-beans\3.0.5.RELEASE\spring-beans-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-aop\3.0.5.RELEASE\spring-aop-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-context\3.0.5.RELEASE\spring-context-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-context-support\3.0.5.RELEASE\spring-context-support-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-tx\3.0.5.RELEASE\spring-tx-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-jdbc\3.0.5.RELEASE\spring-jdbc-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-orm\3.0.5.RELEASE\spring-orm-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-oxm\3.0.5.RELEASE\spring-oxm-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-web\3.0.5.RELEASE\spring-web-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-webmvc\3.0.5.RELEASE\spring-webmvc-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-webmvc-portlet\3.0.5.RELEASE\spring-webmvc-portlet-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-test\3.0.5.RELEASE\spring-test-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-testng-utils\2.8\surefire-testng-utils-2.8.jar
[DEBUG] provider classpath classpath:
[DEBUG]   c:\workspace\JAdaptivLatest\target\test-classes
[DEBUG]   c:\workspace\JAdaptivLatest\target\classes
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\junit\junit\4.8.2\junit-4.8.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\testng\testng\6.0.1\testng-6.0.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\beanshell\bsh\2.0b4\bsh-2.0b4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\com\beust\jcommander\1.12\jcommander-1.12.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\yaml\snakeyaml\1.6\snakeyaml-1.6.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\server\selenium-server\1.0.3\selenium-server开发者_如何学编程-1.0.3-standalone.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\server\selenium-server-coreless\1.0.3\selenium-server-coreless-1.0.3.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\ant\ant\1.7.1\ant-1.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\ant\ant-launcher\1.7.1\ant-launcher-1.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\servlet\servlet-api\2.4\servlet-api-2.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\bouncycastle\bcprov-jdk15\135\bcprov-jdk15-135.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\core\selenium-core\1.0.1\selenium-core-1.0.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\seleniumhq\selenium\client-drivers\selenium-java-client-driver\1.0.2\selenium-java-client-driver-1.0.2.jar

[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\uncommons\reportng\1.1.2\reportng-1.1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\testng\testng\5.0\testng-5.0-jdk15.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\velocity\velocity\1.4\velocity-1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\velocity\velocity-dep\1.5\velocity-dep-1.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\jtidy\jtidy\4aug2000r7-dev\jtidy-4aug2000r7-dev.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\easymock\easymock\3.0\easymock-3.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\cglib\cglib-nodep\2.2\cglib-nodep-2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\objenesis\objenesis\1.2\objenesis-1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\com\jcraft\jsch\0.1.42\jsch-0.1.42.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\snmp4j\snmp4j\1.8.1\snmp4j-1.8.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\extremecomponents\extremecomponents\1.0.1\extremecomponents-1.0.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-collections\commons-collections\3.0\commons-collections-3.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\tinyradius\tinyradius\1.0\tinyradius-1.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\commons\commons-email\1.2\commons-email-1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\mail\mail\1.4.1\mail-1.4.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-net\commons-net\2.2\commons-net-2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-pool\commons-pool\1.5.5\commons-pool-1.5.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-fileupload\commons-fileupload\1.2.2\commons-fileupload-1.2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\directwebremoting\dwr\3.0.M1\dwr-3.0.M1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\mortbay\jetty\cometd\6.1.4\cometd-6.1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\mortbay\jetty\jetty-util\6.1.4\jetty-util-6.1.4.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javolution\javolution\5.5.1\javolution-5.5.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\net\java\dev\eval\eval\0.5\eval-0.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\javaee-api\6.0\javaee-api-6.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\slf4j\slf4j-log4j12\1.6.1\slf4j-log4j12-1.6.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\slf4j\slf4j-api\1.6.1\slf4j-api-1.6.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\aspectj\aspectjtools\1.6.10\aspectjtools-1.6.10.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xalan\xalan\2.7.1\xalan-2.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xalan\serializer\2.7.1\serializer-2.7.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\tomcat\tomcat-dbcp\7.0.5\tomcat-dbcp-7.0.5.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\cglib\cglib\2.2\cglib-2.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\asm\asm\3.1\asm-3.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-core\3.3.2.GA\hibernate-core-3.3.2.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\antlr\antlr\2.7.6\antlr-2.7.6.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-annotations\3.4.0.GA\hibernate-annotations-3.4.0.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-commons-annotations\3.3.0.ga\hibernate-commons-annotations-3.3.0.ga.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-entitymanager\3.4.0.GA\hibernate-entitymanager-3.4.0.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javassist\javassist\3.4.GA\javassist-3.4.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\hibernate-validator\3.1.0.GA\hibernate-validator-3.1.0.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\hibernate\ejb3-persistence\1.0.2.GA\ejb3-persistence-1.0.2.GA.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\mysql\mysql-connector-java\5.1.14\mysql-connector-java-5.1.14.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-core\2.2.1.1\struts2-core-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\xwork\xwork-core\2.2.1.1\xwork-core-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\freemarker\freemarker\2.3.16\freemarker-2.3.16.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\ognl\ognl\3.0\ognl-3.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\commons-io\commons-io\1.3.2\commons-io-1.3.2.jar
[DEBUG]   C:\Program Files (x86)\Java\jdk1.6.0_24\jre\..\lib\tools.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-dojo-plugin\2.2.1.1\struts2-dojo-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-json-plugin\2.2.1.1\struts2-json-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-spring-plugin\2.2.1.1\struts2-spring-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-junit-plugin\2.2.1.1\struts2-junit-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\struts\struts2-testng-plugin\2.2.1.1\struts2-testng-plugin-2.2.1.1.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\taglibs\standard\1.1.2\standard-1.1.2.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-core\3.0.5.RELEASE\spring-core-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-asm\3.0.5.RELEASE\spring-asm-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-expression\3.0.5.RELEASE\spring-expression-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-beans\3.0.5.RELEASE\spring-beans-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-aop\3.0.5.RELEASE\spring-aop-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-context\3.0.5.RELEASE\spring-context-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-context-support\3.0.5.RELEASE\spring-context-support-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-tx\3.0.5.RELEASE\spring-tx-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-jdbc\3.0.5.RELEASE\spring-jdbc-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-orm\3.0.5.RELEASE\spring-orm-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-oxm\3.0.5.RELEASE\spring-oxm-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-web\3.0.5.RELEASE\spring-web-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-webmvc\3.0.5.RELEASE\spring-webmvc-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-webmvc-portlet\3.0.5.RELEASE\spring-webmvc-portlet-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\springframework\spring-test\3.0.5.RELEASE\spring-test-3.0.5.RELEASE.jar
[DEBUG]   C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-testng-utils\2.8\surefire-testng-utils-2.8.jar
Forking command line: cmd.exe /X /C ""C:\Program Files (x86)\Java\jdk1.6.0_24\jre\bin\java" -jar c:\workspace\JAdaptivLatest\target\surefire\surefirebooter39500
41630399073451.jar c:\workspace\JAdaptivLatest\target\surefire\surefire6724894077046045670tmp c:\workspace\JAdaptivLatest\target\surefire\surefire55036177478980
48974tmp"

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.193 sec
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.072s
[INFO] Finished at: Mon Apr 04 14:21:23 EST 2011
[INFO] Final Memory: 14M/53M
[INFO] ------------------------------------------------------------------------

PasteBin link of the log.


As Cedric said above, Surefire has some problems with TestNG and JUnit tests in the same project. I found that when running "mvn test -X", Surefire was using the testng plugin instead of junit even though the actual test was a JUnit one.

[DEBUG] Adding to surefire test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-testng\2.8\surefire-testng-2.8.jar Scope:test

I checked the dependency hierarchy and didn't find any other plugin requiring testng. Then I found the spring testng dependency.

<dependency>
  <groupId>org.apache.struts</groupId>
  <artifactId>struts2-testng-plugin</artifactId>
  <version>${org.apache.struts.version}</version>
  <scope>test</scope>
</dependency>

After disabling it,

[DEBUG] Adding to surefire test classpath: C:\Users\Croydon.IVSTEL1\.m2\repository\org\apache\maven\surefire\surefire-junit4\2.8\surefire-junit4-2.8.jar Scope: test

Surefire uses the junit plugin and the tests are detected.


Surefire has a few problems when you tell it to run both TestNG and JUnit tests. There is a trick to make this work, though, but I can't remember what it is right now. Try to search around, you'll probably find the answer on SO somewhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜