Exclude items from weblogic.jar that are part of the manifest of the jar


(Ed Ross) #1

I’m trying to use gradle but having problems of exclusions. I want to include the JPA 2 jar, but we are using WebLogic 11g which uses the JPA 1 api. When I try and compile, gradle seems to include all of the jars that are in the weblogic jar classpath in the manifest. Consequently, I get compile errors on some of my JPA2 classes.

I’ve tried the normal excludes in the compile section, in the configuration section, I’ve tried the transitive=false, I’ve tried making the WebLogic jar last in the list. Nothing seems to work.

The gradle dependency report does not show the JPA 1 api, only the JPA 2 api.


(Ed Ross) #2

Further information.

Using Release candidate 2 When i do a gradle dependency my list is as expected When I do a gradle eclipse - my eclipse referenced libs have the entire WebLogic modules directory as part of the classpath. Many of these webLogic modules are older versions which I wish to exclude from the classpath.

This all seems to come from the root cause of the META-INF/MANIFEST.MF classpath.


(Ed Ross) #3

Gradle seems to be an outstanding build tool, but not quite ready for our application.

when I take out reference to the weblogic jar I have about 25 jars in my class-path. Unfortunately I need webLogic in the classpath. When that happens, I have close to 200 jars in the classpath, many using older versions of items we use in our application (jpa 1.0,. wrong versions of spring, wrong versions of hibernate, etc). There doesn’t seem to be a way to order these jars such that the newer jars are in the classpath first.

I believe this happens because of the manifest inside of the weblogic jar. It references other jars,. which reference other jars, ect.

Good luck - looking forward to version 1.x. Hope you address this soon. I’ve been fighting maven for about a year and spend more time finding ways around the product than uses for it.


(mor.anshuman) #4

Did you get any answer or workaround for this, I am facing exactly same issues and want to exclude all dependencies referenced from manifest class-path?