我需要在我的maven干净安装中运行ActiveMQ,以便它启动activemq,然后运行我的测试。我在pom.xml中包含了插件,并添加了mq配置文件,用于配置mq详细信息。当我在一个控制台上运行activeMq并在其他控制台上运行maven干净安装(在两个不同的控制台上运行两个单独的命令)时,它成功运行,并且所有测试都通过。但是,是否有一种方法可以在同一个控制台上使用1命令运行activemq并清除安装?基本上,我希望当我做mvn清洁测试安装时,它应该首先自动启动mq,然后继续测试.
我试过使用命令,如mvn :运行干净测试安装或mvn干净测试安装activemq:运行。但它要么进行清洁安装要么运行activemq..。
如何将这2 commands(activemq:run和mvn干净测试安装结合起来)?
发布于 2015-03-27 18:32:35
使用<build><plugins> 构造附加maven目标和插件.
<build>
<plugins>
<plugin>
<groupId>org.apache.activemq.tooling</groupId>
<artifactId>maven-activemq-plugin</artifactId>
<version>...</version>
<executions>
<execution>
<goals>
<goal>run</goal>
</goals>
<phase>process-test-classes</phase> <!-- or other phase before the test phase -->
</execution>
</executions>
</plugin>
</plugins>
</build>https://stackoverflow.com/questions/29307763
复制相似问题