-
Bug
-
Resolution: Done
-
Minor
-
7.0.0.ER5
-
None
The client-side pom of the ejb-remote quickstart contains this
<!-- Import the transaction spec API, we use runtime scope because we aren't using any direct reference to the spec API in our client code --> <dependency> <groupId>org.jboss.spec.javax.transaction</groupId> <artifactId>jboss-transaction-api_1.2_spec</artifactId> <scope>runtime</scope> </dependency> <!-- Import the EJB API, we use runtime scope because we aren't using any direct reference to EJB spec API in our client code --> <dependency> <groupId>org.jboss.spec.javax.ejb</groupId> <artifactId>jboss-ejb-api_3.2_spec</artifactId> <scope>runtime</scope> </dependency>
The first thing is that the implication that "if we don't have direct reference to API then the dependency needs to be in runtime scope" is a nonsense - because if we don't have direct reference to the API on the client side, we don't need this dependency at all. Only the server needs to depend on an implementation, but that's a different story.
Now the fact is that the EJB api will be imported transitively anyway, because the client-side project depends on the server-side bean interfaces, and these interfaces actually do have a direct reference to EJB api.
That means that currently, the EJB api is imported twice - once from the root project, once imported by the jboss-ejb-remote-server-side dependency.
The Transaction (JTA) api is imported once, and it's not needed, because the client side doesn't have any dependencies on JTA api (nor in the code, neither in runtime, because it will be the server side that will handle transactions)
So what I would like to change...
The two mentioned dependencies are not needed in the client's pom (ejb-remote/client/pom.xml) at all. It could confuse some users to add these dependencies when it's not needed
- is related to
-
JBEAP-3354 Scope of some dependencies for EJB client applications is wrong
- Closed