1

I have maven project with Spring boot, in which I am using Process command as below:

Process process = Runtime.getRuntime().exec("cmd /c mvn compiler:testCompile", null, new File(UPLOADED_FOLDER));

UPLOADED_FOLDER: contains the path of main project directory, where pom.xml file is available. Command executes successfully.

This command executes in a running application, so when it executes it stops my server, i.e Shutting down ExecutorService.

Purpose of using this command is:

I want to compile the newly uploaded Test cases (TestNg), but some how my server service is getting shutdown.

Help is required, in executing it with avoid shutdown of service or any other way around to compile the test cases (.java files).

Das Khatri
  • 93
  • 6

0 Answers0