私たちは、どのように私は、この個々のテストを実行することができますMavenで個々のテストを実行するにはどうすればよいですか?
./src/test/java/com/myco/clearing/common/xml/TextNodeTest.java
...私たちは、このテストファイルを持っている...
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
をMavenの3.0.3を使用しているとJUnit 4.8.1を使用していますか?試してみると
mvn -Dtest=TextNodeTest test
私はテストが実行されなかったというエラーが表示されます。テスト全体にパッケージ名全体を指定すると、同じエラーが発生します。 ...
エラーメッセージが生成さmvn clean -Dtest=com.myco.clearing.common.xml.TextNodeTest test
...ここ
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project myco-productplus-web: No tests were executed!
(Set -DfailIfNoTests=false to ignore this 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/MojoFailureException
は、それが2.12バージョンのバグだように、私は
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<skip>false</skip>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
<additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
</additionalClasspathElements>
<useManifestOnlyJar>false</useManifestOnlyJar>
<forkMode>always</forkMode>
<systemProperties>
<property>
<name>gwt.args</name>
<value>-out "${webappDirectory}"</value>
</property>
</systemProperties>
<systemPropertyVariables>
<tomcat.port>${tomcat.servlet.port}</tomcat.port>
<project.artifactId>${project.artifactId}</project.artifactId>
</systemPropertyVariables>
</configuration>
</plugin>
デイブは、2.11にダウングレードしましたか? –