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?
Related
I'm starting to use Maven (M2E) on Eclipse.
I have two projects
->Tools
->Main
The Main project requires the Tools project. I add "Tools" under the "Main"->"Deployment assembly" option, and when exporting to WAR, the WAR will automatically contain also Tools.jar. This is correct.
Now I installed M2E on the Main Project, to manage some spring dependencies. When I edit the pom.xml, Maven starts, and correctly downloads the Spring jars, but it removes the Tools project from the "Deployment assembly" option (it disappear from the org.eclipse.wst.common.component eclipse configuration file)
As a result, when I export the WAR from Eclipse->Export, the war will not contain Tools.jar, so the webapp will not work.
How do I configure pom.xml to do what Eclipse does with the "deployment assembly"?
That is, package all classes and resources and jar dependencies of the Tools project?
I think that I'm missing some understanding of Maven, but I've not been able to google about it?
thank you
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!
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.
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 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.