Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Maven Jetty Plugin 9.2.6.v20141205 run-forked goal not working with our webapp(Maven Jetty Plugin version 9.2.6.v20141205 run-forked goal issues)
Maven Jetty Plugin 9.2.6.v20141205 run-forked goal not working with our webapp [message #1746388] Fri, 28 October 2016 01:50
Ram Ko is currently offline Ram KoFriend
Messages: 2
Registered: March 2016
Junior Member
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 [b]Jacoco agent[/b] as JVM args parameter 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 overrideDescriptors 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.

Not sure we missed any configurations or 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>
Previous Topic:Installing Lucene
Next Topic:Startup errors
Goto Forum:
  


Current Time: Wed Jun 26 08:21:00 GMT 2019

Powered by FUDForum. Page generated in 0.03200 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top