使用以下设置
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>9090</port>
<path>/</path>
<contextFile>src/main/resources/config/tomcat/context.xml</contextFile>
<executions>
<execution>
<id>start-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>stop-tomcat</id>
<phase>post-integration-test</phase>
<goals>
<goal>shutdown</goal>
</goals>
</execution>
</executions>
</plugin>
我跑的时候
mvn install tomcat7:run-war-only
我收到以下错误
...Caused by: java.lang.NoClassDefFoundError: javax/jms/ConnectionFactory...
将包含javax / jms / ConnectionFactory的jms.jar放入target \ tomcat \ lib并不能解决问题,我怎么能问javax这个嵌入式tomcat?
我很长时间都在努力,任何提示都会受到赞赏。
答案 0 :(得分:0)
只需在插件内部使用@ujulu建议:)