Java Maven Surefire没有找到测试
我在maven surefire方面遇到了困难,因为它不运行我的测试。 我知道这个问题以前已经被问过很多次了,我尝试过很多东西都没有成功Java Maven Surefire没有找到测试,java,maven,testing,maven-surefire-plugin,Java,Maven,Testing,Maven Surefire Plugin,我在maven surefire方面遇到了困难,因为它不运行我的测试。 我知道这个问题以前已经被问过很多次了,我尝试过很多东西都没有成功 我将测试目录的名称更改为src/test/java 我更改了测试的名称以适应*测试模式 我试过Junit3测试 我特别尝试在pom中包含一个测试 也许你们中的任何人都能指出我可能愚蠢的错误 下面列出了我的pom <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>BitTrader</groupId>
<artifactId>BitTrader</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>BitTrader</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.language>java</sonar.language>
<sonar.jdbc.url>
jdbc:h2:tcp://lustigsbusi.ch:9092/sonar
</sonar.jdbc.url>
<sonar.host.url>
http://lustigsbusi.ch:9000
</sonar.host.url>
</properties>
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<includes>
<include>CombinedOrderBookTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
</repositories>
<dependencies>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>3.6.6.Final</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-coyote</artifactId>
<version>7.0.41</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-core</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-examples</artifactId>
<version>1.8.0</version>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>logback-core</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-bitcoincharts</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-bitstamp</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-btce</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-campbx</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-cavirtex</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-mtgox</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchange</groupId>
<artifactId>xchange-openexchangerates</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
</dependencies>
</project>
4.0.0
比特交易商
如果测试类遵循命名约定,则无需指定包含项
真正的问题是“CombinedOrderBookTest.java”似乎无法匹配。如果测试类遵循命名约定,则无需指定包含项
真正的问题是,它似乎与“CombinedOrderBookTest.java”不匹配。对我来说似乎没有问题,请尝试“mvn clean install-X”,这将为您提供更多信息。对我来说似乎没有问题,请尝试“mvn clean install-X”,这将为您提供更多信息我同意我只是将其包括在内,以便让它看看是否可以工作->它没有如果您从cmdline运行它,您是否可以尝试添加-Dtest=CombinedOrderBookTest
(实际上,没有.java
)这很好,测试正在运行,但我仍然不知道为什么它不会自动运行测试如果您运行mvn test-X
,您能将surefire插件的输出粘贴到某个地方吗?它不接受这个测试肯定有很好的理由。[DEBUG](s)includes=[AllTest]
这个值从哪里来?我同意我只是为了让它看看它是否能工作->它不能工作->如果你从cmdline运行它,你能尝试添加-Dtest=combinederbooktest
(实际上,没有.java
)这很好,测试正在运行,但我仍然不知道为什么它不会自动运行测试如果您运行mvn test-X
,您能将surefire插件的输出粘贴到某个地方吗?它不接受此测试肯定有很好的原因。[DEBUG](s)includes=[AllTest]
此值来自何处?