Eclipse run configuration that excludes jars from classpath

980 Views Asked by At

How can I create an Eclipe Run Configuration that exclude some jars from the classpath?!

BACKGROUND EXPLANATION:

I'm working on webapp that uses Embedded Jetty as Web Server, Ektorp library to fetch data from a CouchDB database, Jersey to provide REST service and GWT for the frontend.

All these four libraries are imported in the same Eclipse project: - Ektorp, Embedded Jetty and Jersey imported through Maven - GWT imported with jars

Unfortunately Ektorp and GWT somehow enters in conflict using a different version of the class: org.apache.http.conn.scheme.Scheme

I've tried moving the GWT packages to another project and importing the Jetty/Ektorp/Jersey project but then GWT wasn't able to find the Jersey resources...

So reformulating the question for this specific project:

How can I create an Eclipe Run Configuration that runs the Embedded Jetty server and excludes the GWT jars from the classpath?!

Thanks!

1

There are 1 best solutions below

0
On

What should work:

  1. Go to the run configuration menu
  2. Select your run configuration
  3. Click on the classpath tab
  4. Remove the default classpath under User Entries
  5. Select User Entries and add your project with Add Projects...
  6. Select the added project and add your libs with Add JARs... leaving out the unwanted ones.