Stephane Nicoll wrote:
Reading the docs for the ear:ear goal doesn't specify any minumum requiredconfiguration for the ear plugin to work.The doc is up-to-date, provided that your pom.xml has a dependency on the ejb (either by explicitelty declaring it or by getting it through transitive dependencies) is enough. You can just check that by yourself and see that your ejb module is bundled in the EAR file and defined in the application.xml correctly (?!)
The docs need to explicitly state "to generate an ear file, make sure the components of the ear file are listed as dependencies, and run ear:ear". Again, the docs assume a priori knowledge from the user that this is the case.
I know from experience with maven 1 that ear:ear required no external config over and above dependencies, but no corresponding statement was present in the maven 2 docs.
Reading "Better builds with maven" it suggests that each jar and ejb file needs to be explicitly defined within the <plugin> tag for maven-ear-plugin, over and above the dependancy mechanism.Read this section again. The book does not suggest that at all. If you want to *customize* the way the EAR plugin works, just configure the modules within the configuration/modules element of your plugin's config (see the doc again for pom samples)
This is the impression I got from reading the book. Because it didn't explicitly state "at a minimum, dependancies need to be set, and the ear:ear goal, and you should have a working ear file", when the ear:ear plugin didn't produce a working ear file, the logical assumption was that a configuration step had been missed. Again, the docs assumed a priori knowledge from the reader.
I would suggest to read the doc again and if does not help, investigate why JBoss does not find your class. IMO it has nothing to do with the EAR and/or maven
Now that the docs have been clarified, it seems that I have configured maven correctly (set dependencies, run ear:ear).
Lots of Googling shows the error I was getting was caused by an incorrect classpath inside the manifest file. The manifest file is generated by maven. Therefore, all evidence suggests the problem is with maven.
Regards, Graham --
smime.p7s
Description: S/MIME Cryptographic Signature