private void addDeploymentScanner() throws Exception {
WebArchive war = ShrinkWrap.create(WebArchive.class, "SimpleServlet.war");
war.addClass(SimpleServlet.class);
warFile = new File(deployDir.getAbsolutePath() + File.separator + "SimpleServlet.war");
new ZipExporterImpl(war).exportTo(warFile, true);
// add deployment scanner
String path = deployDir.getAbsolutePath();
path = path.replaceAll("\\\\", "/");
cli.sendLine("/subsystem=deployment-scanner/scanner=testScanner:add(scan-interval=1000,path=\"" + path +"\")");