我一直在試圖拆分一個存儲庫來運行特定的測試,並且由於surefire我已經運行測試有一些問題。爲什麼maven surefire甚至沒有運行?
當試圖通過簡單地調用mvn test
來運行任何東西時,看起來該插件甚至沒有被訪問。輸出結束爲:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building {repository_name} 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.132 s
[INFO] Finished at: 2017-08-10T12:07:46-04:00
[INFO] Final Memory: 8M/309M
[INFO] ------------------------------------------------------------------------
爲什麼萬不會啓動?我的設置有什麼問題?
這是我的POM的插件部分,我嘗試指定要使用的套件。我認爲這是在命令行參數中定義的。
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXMLFile}</suiteXmlFile>
</suiteXmlFiles>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>${listener-list}</value>
</property>
</properties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
猜測:你'pom.xml'包含' POM ' –
就是這樣!!!!我從一個存儲庫移動測試,並複製到父節點上。那肯定會導致沒有任何測試被拿起。謝謝!! – SmashedBug