The normal strategy for your situation is to combine your two artifacts into a third artifact, being an EAR file.
You make use of the Maven EAR Plugin to build this and configure it like the following for JBossAS/WildFly:
This will also automatically include any other project dependencies that you have.
Hey! Thanks for answering.
Well, I tried to do it, I could deploy, but it seems that my EJBs was not deployeds, I mean... You know, when you deploy an EJB Project on JBoss AS 7, it shows in the console every EJB that you have on your project, and, when I deploy my project it doesn't show any EJB in there. And when I try to lookup some EJB it says that there's no EJB.
Also I tried to use the packing EJB, but I get this message: Error executing FORCE_DEPLOY.
Well, sorry, I didn't understand what you meant at first, I tried to change my EJB Project to an EAR Project, so it didn't work. haha
After that, I declared every module (ejb, war, jar) inside an EAR project, with all dependencies, and, in the others modules, I declared the dependencies with provided scope.
Everything is working fine, thanks!