Java program to build and run a maven project -
i trying create java application automatically build project.is possible create java program run maven project?
you can follow below approach start:
- create batch/shell file build project using mvn/ant/gradle command. need maven/ant/gradle installed in system , environment variable needs setup properly.
- run batch/shell file using java taking advantage of runtime class. runtime.getruntime().exec("cmd /c start build.bat");
- to schedule java program, use executorservice or quartz. or can take advantage of operating system schedulers well.
hope helps.
Comments
Post a Comment