Hello,
We are using Eclipse Jetty maven plugin 9.2.6.v20141205 in our project , which
is using to run integration tests for our rest web services. This is working
fine with mvn jetty:run command or mvn clean install.
Now we got the requirement to integrate Jacoco code coverage. We are getting
code coverage for unit tests, but missing for Integration tests. After further
analysis, we observed, we need to pass Jacoco agent as JVM args to Jetty server.
As per the Jetty documentation, Jetty start/run goals does not accept JVM args.
We need to use run-forked goal to pass our custom JVM args.
We have updated our POM.xml to use run-forked goal and seeing the below issues.
1)We have overrideDescriptor configuration in our POM.xml. That is not working
well for run-forked. Build is abruptly ending.2)Run-forked not working with mvn
clean install. Jenkins continuous integration jobs are running good with forked
goal. Is it possible to use run-forked with mvn clean install?
Not sure we missed any configurations or using any mis-configuration.
Your help is highly appreciated in this regard. Java version we are using is
Java 1.8.
POM.xml
=======<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${maven.jetty.version}</version>
<configuration>
<jvmArgs>${argLine}
-Dweb.builddir=${basedir}</jvmArgs>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
<jettyXml>${basedir}/jetty.xml</jettyXml>
<contextXml>${basedir}/context.xml</contextXml>
<useTestClasspath>true</useTestClasspath>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run-forked</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>
Context.xml
==========<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="overrideDescriptor">
<SystemProperty name="web.builddir" />/jetty-override-web.xml</Set>
<Set name="contextPath">/myContext</Set>
</Configure>
Thanks,Ramesh
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users