I am new to Java EE. I use Maven, Eclipse and jBoss/WildFly.
I have a war
project. When I build the project all its dependencies are packaged inside the war
file in WEB-INF/lib
.
Now I am trying to create a ejb
project (I have <packaging>ejb</packaging>
in the pom.xml
). I want to deploy it as a separate project (not as a part of the war
). When I build the ejb
project Maven does not package any dependencies in the jar
.
How can I package/deploy a ejb
.jar
with its dependencies?
UPDATE: I'd like to avoid packaging EJBs in an .ear
if it is possible. (I do not want to create one more Maven project).
The best solution is package your project as ear. But if don't want use ear, maven assembly plugin can help you to package all needed jars in one file. This solution is only for "proof of concept" variant, and cannot be used in production mode, by licences limitation for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With