0

I have a web service WebService1 that is deployed on JBoss (4.2.3.GA).
WebService1's endpoint is Endpoint1.

I wrote a WebService2 which dependends on WebService1. When Maven creates the .EAR file, it places the .JAR with WebService1 in WebService2's .EAR.

So, when I deploy WebService2 in JBoss I get the exception:

Endpoint1 has already registered.

If I remove class with Endpoint1 from the .JAR in the .EAR, then it's all normally deployed. But I can't remove this class after every project building.
Any ideas?

4

1 回答 1

1

If you have a dependency that you don't want packaged with your maven build, use the "provided" dependency scope like this:

<dependency>
  ..
  <scope>provided</scope>
  ..
</dependency>

This will allow Maven to compile the project, but won't include said dependency with the final package. More information here.

Is this what you were looking for?

于 2012-04-25T12:18:22.763 回答