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:

  1. create batch/shell file build project using mvn/ant/gradle command. need maven/ant/gradle installed in system , environment variable needs setup properly.
  2. run batch/shell file using java taking advantage of runtime class. runtime.getruntime().exec("cmd /c start build.bat");
  3. to schedule java program, use executorservice or quartz. or can take advantage of operating system schedulers well.

hope helps.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -