Package se.kth.depclean.util
Class MavenInvoker
java.lang.Object
se.kth.depclean.util.MavenInvoker
Utility class to execute Maven tasks from the command line.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]runCommand(String cmd, File directory) Creates a native process to execute a custom command.
-
Method Details
-
runCommand
public static String[] runCommand(String cmd, File directory) throws IOException, InterruptedException Creates a native process to execute a custom command. This method is used to invoke maven plugins directly.- Parameters:
cmd- The command to be executed.directory- The working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.- Returns:
- The console output.
- Throws:
IOException- In case of IO issues.InterruptedException- In case of IO issues.
-