Issue deploying EAR project from eclipse to EAP 6.2.0 using JBoss Tools Plugin - eclipse

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.

Related

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.

Eclipse glassfish plugin not publishing maven dependency jars to ear lib folder

I'm using the Eclipse "Internal Glassfish 3.1.2.2" server with the Eclipse Glassfish plugin (http://download.java.net/glassfish/eclipse/juno). I'm also using Maven with the m2e Eclipse plugin. The Glassfish plugin correctly deploys my EAR modules to the Internal Glassfish, but it does not deploy my dependency jars, which I believe should end up in a folder called "lib".
I found a partial solution here, which is to add my maven target lib folder to the EAR Deployment Assembly (double-click in the Deploy Path box to edit). This works, but m2e (or m2e-wtp) undoes the config change when I do Maven > Update Project.
There ought to be a cleaner solution. The Eclipse Ear Module Assembly dialog has a field to name the "EAR library directory", so it's aware of the lib folder. Where does Eclipse EAR assembly (without Maven) look for jars to put in the lib folder? I assume the Glassfish plugin is looking in the same place.
You can use the following steps to find the source of the problem:
Take Eclipse out of the equation and build EAR on command line using Maven, does it turn out ok? If not, look for a solution in your pom.xml.
If ok so far, open Eclipse and perform Maven -> Update Project. Then export EAR using Eclipse (look for EAR export wizard under File -> Export). Did the exported EAR turn out ok? If not, file a bug report for m2e-wtp plugin. It is still pretty raw, so it wouldn't be surprising if it doesn't setup Eclipse metadata correctly in some cases.
If ok so far, then it is time to look for a problem in Glassfish plugin. I doubt that you will get this far, but if you do I will help you to follow up.

missing jars when publishing a web app to glassfish with eclipse juno and maven integration

I use eclipse juno with GlassFish Server Open Source Edition 3(java EE6), m2e and maven 3.0.4.
When I create a war file by 'mvn package' command and deploy it to a glassfish,
the war file works just fine.
However, when I publish a web app to a glassfish from the server view of eclipse,
the web app fails.
I guess the reason of this failure is that publishing from eclipse is not configured correctly
to get jars from my maven repository and then jar files in eclipseApps//WEB-INF/lib directory are missing.
Can I configure eclipse to use a maven configuration when publishing a web app to a glassfish?
Thanks.
I found the answer
"anyway I solved the issue by adding following row Properties > Deployment Assembly: /target/myapp/WEB-INF/lib -> WEB-INF/lib"
in
Glassfish Deployment out of Eclipse Helios SR2 fails
Thanks.

EAR with EJB and WAR modules fails to deploy WAR dependencies

I have an EAR that has many EJB modules and one WAR. The WAR dependencies are not picked up. There are only 3 of the WAR dependencies that are not already included in the EAR. These are ones that break the deployment. The target web logic server starts in Eclipse but the app fails to publish. As a test, when I add the missing WAR dependencies to any of the EJB modules they are picked up.
The problem was with certain versions of the m2eclipse plugin from Sonatype.
Some versions of the plugin do not correctly propogate the dependencies for the web project (WAR).
The plugin that works is the one that is installed in version 3.6.2 of eclipse. The one in 3.6.0 doesn't work.
Once I woved to version 3.6.2 of eclipse the problem went away.
Granted the issue may also have been tied to the plugin verions PLUS the version of eclipse.
Here are the maven plugin and eclipse details:
Works:
m2eclipse - 0.12.1.20110112-1712 running in Eclipse Java EE IDE for Web Developers Helios Service Release 2 Build id: 20110218-0911
Doesn't work:
m2eclipse - 0.12.0.20101115-1102 running in Eclipse Java EE Version: 3.6.0 Build id: I20100608-0911

Can not run maven project in eclipse

We have existing maven project. I have imported it with m2eclipse plugin.But
I can not run the project. Tomcat can not see resources(WAR files under target folder).
What am I missing? BTW we have multi-module project(2 WAR files).
Thanks in advance!
You need to add the tomcat server in your eclipse.
The maven project should be a web based project
You need to add the web project to the tomcat server.
You need to add J2EE Module Dependencies - Eclipse 3.3 ( To enable all library dependencies to be available at runtime to tomcat). Paths that point to your m2 repo & the lib files.
It may be Java EE Dependencies in earlier versions.
Both your projects needed to be added similarly.