Re: making an API / SPI available to other deployments...
See https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7 for background and details on the following.
A war, ear, or any other deployment can specify a dependency on external modules either by adding a jboss-deployment-structure.xml in its META-INF dir or by adding a Dependencies: manifest entry in MANIFEST.MF. See "Dependencies: Manifest Entries" and "JBoss Deployment Structure File" in the above doc.
That module can either be one of the modules in the $JBOSS_HOME/modules dir, or it can be a module the AS dynamically creates when a deployment (e.g. a jar containing the API/SPI) is deployed. For modules dynamically created for deployments, the name of the module is "deployment.xxx". See "Deployment Module Names" in the above doc for details on "xxx".
Simple example, if you had a jar "my-spi.jar" that included your SPI, you could deploy it, and then a war that needed visibility to the classes in that module could add this to its META-INF/MANIFEST.MF
Dependencies: deployment.my-spi.jar