Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse + JBoss - some JAR files not deployed

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

like image 436
Rob Spoor Avatar asked May 15 '12 06:05

Rob Spoor


2 Answers

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

like image 85
Krzysztof Sz Avatar answered Oct 12 '22 08:10

Krzysztof Sz


I experienced the exact same issue, different eclipse (Eclipse Mars, WildFly 8.1 ).

The unsettling part was that I didn't change anything in the code or in the IDE (that I am aware of) and it started malfunctioning.

I suspect it has something to do with the cached memory of eclipse for it's plugins, anyway, after many hours of trying different things we fixed it by deleting the folder .eclipse under your user in windows.

Seems silly, but we tried everything except that, and that thing did the trick

like image 27
justo.eladio Avatar answered Oct 12 '22 09:10

justo.eladio