Hi,
I'm trying to create an eclipse project from scratch using m2eclipse plugin to help resolving dependencies.
The project consists of the following modules:
test-ear test-ejb test-war
The ear references both other projects, and pom files are ready and working in each project.
Still I have one situation:
Instead of just maven building my project, I want to be able to export the ear from eclipse and have a working project, so I could be able to hot-deploy it in a server.
But I have one problem ... the ejb uses an external jar (jbpm), the dependency is correctly specified in pom, and it appears in the "Maven Dependencies" user lib definition, and I have no compilation errors.
But to successfully export the EAR, I have to add the jar (jbpm) to the ejb manifest file. Going to project properties "Java EE Module Dependencies" I only have the entry "Maven Dependencies" lib, and selecting it will not add any info to the manifest file.
After that, exporting the EAR will show the dependency jar files in EAR root, but opening the included EJB shows that the manifest has no classpath entry at all.
Deploying the EAR then fails with info about a ClassNotFoundException in the EJB, on a class that is inside the dependency jar.
To bypass this, I can include the jar into the EAR module (project->properties->Java EE Module Dependencies), then I can add it in the EJB, and the manifest file is updated accordingly.
But the project will have tons of jars, and I don't want to include them all by hand in the EAR and then pick them all in each project.
I know that those entries are in .settings/org.eclipse.wst.common.component file, but shouldn't maven plugin update it automatically in EAR project? At least on the Java EE Module Dependency, so I could just check the jars on each sub-project (ejb, war, ...)
Thanks