我使用Maven与神火插件来运行TestNG的测试,它出现的上下文不加载,即使它是在类路径中,试验工作正常我的IDE中,但不是在maven中。TestNG的+弹簧+的Maven =无法通过延长AbstractTestNGSpringContextTests加载上下文
@ContextConfiguration(位置= 阵列( “类路径*:/ COM/gottex/gottware /服务器/ offlinepuwithdummydatafeed.xml”)) 我的XML是在src /测试/ COM/gottex/gottware /服务器
我父POM包含:
<build>
<defaultGoal>package</defaultGoal>
<testResources>
<testResource>
<directory>src/test/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<verbose>true</verbose>
<forkMode>never</forkMode>
</configuration>
</plugin> ...
和我的孩子POM如果没有依赖关系不包含任何..
哪个Maven的版本?你怎么样? – khmarbaise