Eclipse + JBoss - some JAR files are not deployed

I have an Eclipse Indigo installation with its JBoss 6 server. I have a Maven project with several modules. These modules are all beautifully built from the command line.

One of the modules is EAR. It depends on two JAR modules and several WAR modules. When I pack 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, two module JAR files are missing from JBoss. WAR files are excellent. The Add and Remove ... dialog box also contains JAR files, but not during deployment. I checked the JBoss deployment folder and they are really missing there. The strange thing is, with the same POM and code, all my colleagues with the same (?) Installation do not have this problem.

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

Does anyone know how I can solve this problem? I can manually package and deploy the EAR, but 1) which takes longer, and 2) I cannot use the Eclipse debugging functions in this way.

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

+4
source share
4 answers

I encounter a similar problem, but my environment is much simpler than a web project with a utility project. Do not use maven at all and use for tomcat7.

The class file will not be deployed to web-inf as expected, although the utility project is referenced and marked as exportable.

However, with your problem, I came across this message:

http://blog.frankel.ch/better-maven-integration-leads-to-unforeseen-consequences-bugs#comments

which can give a key. Hope this helps.

+1
source

Right-click in the project → Maven → Update Project

+1
source

I had the same problem. I did not modify my code at all, I deleted all projects from the workspace, closed eclipse and reopened it. Then I did a clean and build project (which took a lot more time than before). This time, when I went to add the EAR project, it had all the dependencies listed and actually worked.

0
source

I experienced the same problem, another eclipse (Eclipse Mars, WildFly 8.1).

An integral part was that I did not change anything in the code or in the IDE (which I know), and it started to work incorrectly.

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

It seems stupid, but we tried everything but this, and this thing did the trick

0
source

Source: https://habr.com/ru/post/1412502/


All Articles