// so we might get target/classes instead of target/test-classes.
String resourceName = "log4j.xml";
String spec = getClass().getClassLoader().getResource(resourceName).toString();
URL deploymentURL = new URL(spec.substring(0, spec.length() - resourceName.length()));
log.info(deploymentURL);
ScopedClassLoader deploymentClassLoader = new ScopedClassLoader(new URL[] { deploymentURL });
// Bootstrap AOP
URL url = Thread.currentThread().getContextClassLoader().getResource("basic/jboss-aop.xml");
log.info("deploying AOP from " + url);
AspectXmlLoader.deployXML(url);