Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Maven Jetty Plugin 9.2.6.v20141205 run-forked goal not working with our webapp


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.

				    <jvmArgs>${argLine} -Dweb.builddir=${basedir}</jvmArgs>
							<!-- <scanIntervalSeconds>0</scanIntervalSeconds> -->

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
	<Set name="overrideDescriptor">
	<SystemProperty name="web.builddir" />/jetty-override-web.xml</Set>
	<Set name="contextPath">/myContext</Set>


Back to the top