Lloyd Meinholz wrote:
Caused by: org.jboss.modules.ModuleNotFoundException: MyappModel:main
In the pom for the ear, I have MyappModel and MyappWeb listed as dependencies. In the pom for the MyappWeb web module, I also have MyappModel listed as a dependency. eclipse/JBoss Tools show no errors. I am able to build the ear with maven and deploy it to Wildfly via the admin console. Enabling the deployment from the admin console is when I get the error.
Why are you adding your submodules as dependency entries into manifest.mf? no need to do that.
by ee spec inside EAR you should use Class-Path entry.
Dependencies entry is wildfly / AS7 specific and is useful when you want to depend to other system modules (think of it as static / global libs)
i think if you remove all dependencies entries from all manifest files it should deploy or at least it will give you different problem from which we can go on.
I'm not creating the manifest.mf directly, maven is creating that via its ear, ejb and war plugins. The manifest.mf that is created for each of the modules are all empty. This is pretty much what the project I created with the jboss-javaee6-webapp-ear archetype looks like also.
If I remove the dependencies from the ear's pom.xml, the project is empty (no projects included in the ear). If I remove the dependency for the MyappModel from MyappWeb's pom.xml, then the project will not compile.
Thanks for your reply.
In case anyone else runs in to this...
Thanks Tomaz for getting me pointed in the right direction. The issue was related to the missing Class-Path entry in the maven generated MANIFEST.MF. I added:
to the maven-war-plugin section of my pom.xml and the Class-Path entries were created.
What I don't understand is why a simple app created with the jboss-javaee6-webapp-ear archetype didn't require the <archive> entry, but mine did. I guess once you start having more dependencies you need to be explicit.