deploy eclipse utility project as jar file in ear lib folder - eclipse

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!

Related

Difference between Tomcat war file and eclipse war file

What is the difference and similarity between war file which we are creating in eclipse and which we are creating in tomcat folder ?
war files are not generated by the tomcat. When web project build, war files are generated and it can be automatically deploy to the configured tomcat by in the eclipse.

Eclipse Juno with m2eclipse builds ear but omits war

I'm trying to build an application no one has touched in quite a while. It uses Spring and is an ear. The build environment is Eclipse Juno with Maven. When I build the app, an ear file is created but there is no war or other web resources in it. No web-inf folder.
if I go to the project -> properties -> Deployment Assembly there are mappings for source to deploy path, for example:
/src/main/java WEB-INF/classes
/src/main/resources WEB-INF/classes
/src/main/webapp /
/src/test/java WEB-INF/classes
/src/test/resources WEB-INF/classes
The packaging type in the pom is set to ear.
What else do I need to check?

Deploying an EJB .jar to jBoss/WildFly from Eclipse

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.

maven and eclipse builds differently the same project

I have a java ear maven project.
When I publish the ear to jboss7 via eclipse it generates an ear and deploys it to jboss.
But when I manually run a maven build of the same project I get a different ear in size and also the name is different.
When eclise builds the project when executing "publish to server", doesnt it use the same build as maven?
I use eclipse juno and maven3. I'm new to maven.
Eclipse uses the .classpath to package the ear that gets deployed to jboss. When you do a manual maven build it is using the pom.xml file to package the ear. If those aren't in sync you could get differences in your ears.

Deploy "exploded" folder to Tomcat in Eclipse

I just installed Eclipse for Java EE developers, Created a New Project by checking out files through SVN from a repository.
I was able to successfully generate an "exploded" web app folder through an ANT build.
How do I deploy this exploded folder (not .war file) to Tomcat? Any configuration that needs to be done?
Thanks.
Just make an ant target that copies the folder directly into the deploy folder of tomcat, usually $TOMCAT_HOME/webapps. Tomcat should then deploy the app in it's container.