views:

296

answers:

3

I admit it is not the best title, but I don't know how to prase it without having a title of three lines.

I have a project with the (for instance) dependency JTA, using the scope "provided" (JBOSS brings its own JTA implementation). If I use m2eclipse it resolves all dependencies just fine. My problem is, if I deploy this project to jboss (within eclipse) those provided dependencies are put in the war file as well, but this is just wrong.

Any ideas how to solve that?

EDIT:

I guess it is following bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=242476

but it seems, the fix will only get included in the next eclipse version

A: 

In your pom.xml use scope as provided for the JTA library. When the pom creates the war file it will not have that jta jar in the war.

Bhushan
please read my question again. My war file doesn't have the JTA jar, only the war file eclipse creates for deployment in jboss.
Mauli
+2  A: 

I'll answer this question with my answer from a previous question - basically, create your own pom for jta and either exclude or set the provided scope for all of those transitive dependencies yourself. In your project, set your jta dependency on the pom you just created.

Here's the text of my previous answer to a (sorta) similar question.

whaley
+1  A: 

As I mentioned in the question, it is fixed in Eclipse 3.5.

I tested it, and it finally works.

Mauli