1 package de.akquinet.innovation.play.maven;
2
3 import org.apache.commons.exec.CommandLine;
4 import org.apache.commons.exec.DefaultExecutor;
5 import org.apache.maven.plugin.MojoExecutionException;
6
7 import java.io.IOException;
8
9
10
11
12
13
14
15
16 public class Play2DebugMojo extends AbstractPlay2Mojo {
17
18 public void execute() throws MojoExecutionException {
19
20 String line = getPlay2().getAbsolutePath();
21
22 CommandLine cmdLine = CommandLine.parse(line);
23
24 String[] args = {"debug", "run"};
25
26 cmdLine.addArguments(args);
27 DefaultExecutor executor = new DefaultExecutor();
28
29
30
31
32 executor.setExitValue(0);
33 try {
34 executor.execute(cmdLine, getEnvironment());
35 } catch (IOException e) {
36
37 }
38 }
39 }