In my war, i am trying to use @Inject IHelloWorld helloWorld; to get access to this EJB

I'm using maven, so i added the dependecy for the other project so the war will compile.

this is were i'm not sure what to do, i set the scope of the dependecy in the war to provided so i don't get a copy of the ejb jar in the web-inf/lib . however if i do this then the war won't deplot because of class loading errors.

All the quickstarts i've looked at are either deploying the EJB inside a war or ear. The accessing a remote ejb from a client quickstart might work but i thought that i could access an EJB with @Inject if i was running on the same jvm

first, your EJB should be remote (in case your WAR is not in your EAR) or put at least @Local to the interface. When the WAR is outside, the only reliable possibility is using InitialContext and skipping the auto injection (to get things running). After that you can give the annotations a try.

in an ideal world you would have a ejb-impl and a ejb-api artifact. The API artifact carries all model objects, exceptions and interfaces, which you can give to your clients, so you are not depending on the EJB implementation. I'd suggest to put the EJB dependencies to WEB-INF/lib of your WAR file