I'm providing a quick and easy way for users to deploy my Java EE 6 application via glassfish-embedded-maven-plugin, so they don't have to install and configure a standalone glassfish. However, I'm running into trouble with resource deployment.
The app needs a JavaMail resource from the container, and needs a JAAS realm with a suitable role->user/group mapping.
When deploying to a standalone glassfish this is easily provided with a sun-resources.xml file and/or a couple of asadmin commands. However, I'm struggling to figure out how to do it with glassfish embedded.
Is there a way I can auto-deploy a glassfish-resources.xml in my pom as part of the glassfish-embedded-maven-plugin invocation? The documentation for the plugin is nearly nonexistent or refers to the badly out of date 2.1 version, and I'm increasingly stuck.