I have a RESTful project that I've built with Maven3 as an EAR. I have created a module project (EAR, EJB),but not sure if that will deploy in JBOSS EAp
Is it possible to build Java RESTful project as EAR to make it work on JBoss EAP instead of WAR file?
Related
Below is my project deployment structure
myapp.ear
...META-INF
......application.xml
...lib
......myUtility.jar
...myejb.jar
...mywar.war
myUtility.jar is an eclipse project which I want to deploy in ear lib folder. But When I add the project in ear deployment assembly, it gets deployed in ear root as module instead of lib.
I am deploying my app on jboss EAP run time environment and maven is not used in my project.
Thanks!
I have a set of projects I am working on in eclipse. An ear with a number of jars in APP_INF/lib and several projects for the wars under the ear. They are all Dynamic web projects. In Kepler and Mars the jars in APP-INF/lib show up as a library in the war projects.
Now I am moving to Neon. I have pulled in the ear and one of the wars and the classes in the war won't compile because the jars from APP-INF/lib are not in the classpath of the war.
Did something change? Is there a settings change I need to make?
I even created a new dynamic web project. I added it the the ear as part of creation. But it too does not contain a library from the ear.
I am running the web app on JBOSS EAP 6.4
Neon.2 Release (4.6.2) Build id: 20161208-0600
I am not sure why it wasn't automatically included, but in the build path, I needed to add the Ear library.
I am new to Java EE. I use Eclipse, jBoss/WildFly and Maven. I have a multi module Maven project:
parent Maven project (pom)
web application (war)
EJB project (jar)
Currently, the EJB jar project is packaged inside the web application and the entire solution is deployed as one war file.
I want to change it: I need to deploy the war and the jar projects to the application server independently (as two independent applications). Then the web project could access the EJBs via their remote interfaces.
The problem:
I can deploy the war project in Eclipse with the Run As > Run On Server context menu, however when I attempt to deploy the jar project in the same way, I get an error message saying that the project cannot be deployed.
How can I deploy my projects independently from Eclipse?
Should I wrap the jar project into an ear project? If so, can I convert my jar project into an ear project, or do I have to keep my jar project and create one more project to wrap it into an ear? (I would no like to introduce one more project).
Look at your packaging for your EJB project. You should have
<packaging>ejb</packaging>
This will allow you to run the EJB project on the server.
I have a maven EAR project, which contains a couple of WAR and JAR files. I'm using Spring STS IDE with JBoss Tools 1.6.0 (latest).
When I try to deploy my EAR to JBoss EAP 6.2.0 with JBoss Tools from STS i'm facing the following issues.
My Jars (external jars and project jar) are getting copied into WEB-INF/lib and EAR/lib, where i expected it to be only in EAR/lib.
EAR application.xml is not getting copied into EAR/META-INF/ folder
But when i use terminal to build my project and deploy EAR, i'm not experiencing these issue and JBoss starts without any problem
Here's its solved JBIDE-19047 The main issues are,
jars are getting copied into WEB-INF/lib due to skinnywar not supported by eclipse m2e-wtp plugin and this can be solved by adding <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes> in war plugin configuration.
application.xml not getting copied into ear/META-INF/ folder, if you have any unresolved dependency in any of the pom then this would occur, so make sure all jar dependencies are available.
I have a spring project include java project and a web project, and I don't know which packaging to generate EAR or WAR, this choice it depend on the application server or on the project?
EAR is used to package web projects together with enterprise java beans so they can be deployed as a single bundle.
Since you use Spring I assume you don't have EJBs in your project so you can package everything as a single war file containing the jar of you java beans project and the spring libraries (with all their dependencies) in its WEB-INF/lib folder.
Most (if not all) of the application servers which accept EAR files also accept standalone WAR files.