Maven failsafe plugin throwing InvocationTargetException when trying to setAdditionalClasspathElements

145 views Asked by At

I am trying to setup maven failsafe plugin for my integration tests. Below is the POM configuration for the integration test profile and the error I am getting. I have not been able to run the integration test successfully yet. I had to install some of the POM and jar dependencies into my local repository since it was no available in my companies maven repositories. I cannot add dependencies to public repositories, it is blocked off by the company firewall. Hope somebody has run into this and knows what is causing this error.

POM configuration:

<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.
0

There are 0 answers