I've a Payara5 application server running. I've deployed a JAR which contains one stateless EJB.
I've a second Java EE project which is a JAX-RS. One of the resource classes needs to access this EJB.
I'm using maven. So I have put a depency to my pom.xml for the JAX-RS application which refers to the EJB project.
<dependency>
<groupId>diagro.be</groupId>
<artifactId>HelloWorld</artifactId> <!-- EJB project -->
<version>1.0</version>
<scope>provided</scope>
</dependency>
In my resource class I inject the EJB.
@Inject HelloWorld hw;
The JAX-RS compiles and the war package is build. On deploy I get the error that the HelloWorld class is not found.
Is what I do possible? Or do I need to do something else to link?