Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 7.4.0
-
Fix Version/s: None
-
Component/s: Maven
-
Labels:None
-
Number of attachments :
Description
Hi guys,
First, thanks for a great appserver in Jetty, and for a wonderful Maven plugin in jetty-maven-plugin.
I am trying to run my Maven integration-tests against both Jetty and Tomcat using jetty-maven-plugin and tomcat-maven-plugin (see attached pom fragment). It pretty much works.
However it fails because Jetty, when run in the same Maven VM as Tomcat, tries to load org.apache.naming.java.javaURLContextFactory (ie. Tomcat's implementation). I imagine it should be trying org.eclipse.jetty.jndi.java.javaURLContextFactory instead. Clearly there is some kind of VM-level setting going on, but I can't unset it?
I tried adding this to jetty-maven-plugin...
<systemProperties>
<systemProperty>
<name>java.naming.factory.initial</name>
<value>org.eclipse.jetty.jndi.java.javaURLContextFactory</value>
...but that didn't do it.
Is there any way I can get these two to co-exist in the same Maven VM run? Like I said, it's almost working. It'd be really cool to see them both start up, run webtests, and shut down together!
I don't think it is possible to run Jetty and Tomcat within the same VM at the same time, given that they both implement a number of the same APIs and interfaces. That said, you should be able to use Maven profiles to separate the Jetty plugin execution from Tomcat plugin execution, and thus be able to test either one or the other in each run by activating different profiles from the command line.