I have a Java EE app that uses EJB 3, JPA, JAX-RS and CDI. I included jetty maven plugin and want to specify dependencies that implement the APIs that are missing in jetty. I used the following dependency list and jetty configuration.
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.3.v20150827</version>
<configuration>
<jettyXml>src/test/resources/jetty.xml</jettyXml>
</configuration>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.192</version>
</dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.2.2.Final</version>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-core</artifactId>
<version>4.7.4</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.23.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.23.2</version>
</dependency>
</dependencies>
</plugin>
Then my jetty.xml config is this
<Configure id ="h2" class="org.eclipse.jetty.webapp.WebAppContext">
<New id="h2Datasource" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg>jdbc/h2</Arg>
<Arg>
<New class="com.mchange.v2.c3p0.ComboPooledDataSource">
<Set name="driverClass">org.h2.Driver</Set>
<Set name="jdbcUrl">jdbc:h2:./target/db/testdb</Set>
<Set name="user">sa</Set>
<Set name="password"></Set>
</New>
</Arg>
</New>
</Configure>
But then when I do mvn clean package jetty:run I get this exception:
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.3.v20150827:run (default-cli) on project dip-cv-web: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.3.3.v20150827:run failed: An API incompatibility was encountered while executing org.eclipse.jetty:jetty-maven-plugin:9.3.3.v20150827:run: java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map;
I can provide more details if needed. Not sure what else you might find helpful to help me debug this issue.
Thanks!