我正在尝试为集成测试设置maven failsafe插件。下面是集成测试配置文件的POM配置和我得到的错误。我还没能成功运行集成测试。我不得不将一些POM和jar依赖项安装到我的本地存储库中,因为它在我公司的maven存储库中不可用。我无法将依赖项添加到公共存储库,它被公司防火墙阻止。希望有人遇到这个,并知道是什么导致了这个错误。
POM配置:
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.6.v20120903</version>
<configuration>
<contextPath>/xyzService</contextPath>
<scanIntervalSeconds>5</scanIntervalSeconds>
<maxIdleTime>3600000</maxIdleTime>
<stopPort>8005</stopPort>
<stopKey>STOP</stopKey>
<webAppSourceDirectory>
${project.build.directory}/${project.build.finalName}
</webAppSourceDirectory>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>maven-surefire-common</artifactId>
<version>2.10</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.10</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-toolchain</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
<version>0.4</version>
</dependency>
</dependencies>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
ERROR:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.
16:integration-test (integration-test) on project enterprise_ahr_services: Unabl
e to parse configuration of mojo org.apache.maven.plugins:maven-failsafe-plugin:
2.16:integration-test: Setter org.apache.maven.plugin.failsafe.IntegrationTestMo
jo.setAdditionalClasspathElements( java.util.List ) threw exception when called
with parameter '[]': org.apache.maven.plugin.failsafe.IntegrationTestMojo.setAdd
itionalClasspathElements(Ljava/util/List;)V: InvocationTargetException -> [Help
1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.