Eclipse + JBoss – some JAR files not deployed

eclipsejbossmaven

I have an Eclipse Indigo installation with a JBoss 6 server managed by it. I have a Maven project with a few modules. These modules all build just fine from the command line.

One of the modules is an EAR. This is dependent on two JAR modules and a couple of WAR modules. When I package the EAR from the command line (mvn clean package), the EAR contains all the necessary JAR and WAR files. However, when I deploy it from Eclipse, the two module JAR files are missing from JBoss. The WAR files are just fine. Inside the "Add and Remove…" dialog the JAR files are also present, but not when deployed. I've checked JBoss' deployments folder and there they are indeed missing. The strange thing is, with the exact same POMs and code, all of my colleagues with the same(?) setup don't have this problem.

The two JAR modules are listed in the dependency management part of the parent POM. They are also listed as dependencies in the EAR POM. Still, Eclipse refuses to deploy them with the EAR.

Does anybody have any idea how I can solve this issue? I can manually package and deploy the EAR, but 1) that takes longer, and 2) I can't use Eclipse's debugging functionality this way.

Note: previously asked at http://www.coderanch.com/t/580959/vc/Eclipse-JBoss-some-JAR-files

Best Answer

Right mouse button on project -> Maven -> Update project