Java – run the compiled jar file in Jenkins
I tried to run the executable jar file through Jenkins What I want to achieve here is that I create an executable jar file and reside locally on my machine I want to put it in Git and run it in Jenkins What can I do that? I'm new to Jenkins. If someone can help, I'll save a lot of time
Solution
You can use Jenkins to do almost everything you need, because you can let it run any script / executable
If you want this Jar is placed in git, and Jenkins's job will retrieve it when it gets the repo Then you just need to add a script shell step to the build and put your command line Java my jar my. class ….
On the other hand, putting binaries in Git is sometimes frowned up Especially if Jar needs to be updated frequently Therefore, you may want to use an alternative method to convert Jar to Jenkins job For example, use the Maven repository