我最近開始嘗試將應用程序轉換爲使用wildfly swarm,我在Windows上使用maven,並使用wildfly swarm maven插件來:創建超級jar,啓動它進行集成測試,並在構建結束時停止。蜻蜓蟲羣+填充臨時目錄的Maven
下面是來自POM片段:
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>${version.wildfly.swarm}</version>
<configuration>
<useUberJar>true</useUberJar>
<debug>8000</debug>
</configuration>
<executions>
<execution>
<id>swarm-package</id>
<phase>package</phase>
<goals>
<goal>package</goal>
</goals>
</execution>
<execution>
<id>swarm-start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>swarm-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
我還使用mvn wildfly-swarm:run
從命令行啓動應用程序,所以我可以做一些手工測試Maven構建之外。
每次運行構建時,C:\Users\myusername\AppData\Local\Temp
都會填滿大量未被拆除的數據。我不得不手動清理我的臨時目錄,因爲它佔用了我所有的磁盤空間。
有什麼,我失蹤?是否可以將所有這些臨時數據放入項目target
目錄中,以便使用mvn clean
來處理?
什麼是你的'version.wildfly.swarm'? – nullpointer
我使用'2017.8.1' –