I still haven't found any documentation on the Embedded API. By looking at the sources of the artifact mentioned above and by trial and error, I ended up with the following which seems to work:
File jbossHomeDir = new File("/path/to/my/jboss-as-7.0.2");
StandaloneServer server = EmbeddedServerFactory.create(jbossHomeDir, System.getProperties(), System.getenv());
I'm just wondering if this is really the recommended way of using Embedded JBoss. The server.deploy() method is marked as deprecated, but the alternative is not clearly indicated.
I don't really like the fact that this way of starting the server depends on an existing installation, that's not what you'd expect of an "embedded server". Isn't there a self-contained Maven artifact for an embedded JBoss? (This is how it works for GlassFish or Resin.)