backporting wildfly/wildfly-maven-plugin@95bfb7b with minor adaptations

Some changes of the original fix to cope for the fact that jboss-as is in java6 and not in java7
Plus commenting out the setting of the `-Djboss.modules.dir` since it is marked as deprecated in `org.jboss.as.server.ServerEnvironment`

Tested with JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14)