Hi Nihal, It could be due to permission issue. Can you create another task to change the permission to execute this jar file. I.e.
chmod 777 example.jar And then add the task java -jar example.jar. When the agent is assigned the job it updates the material in the working directory. Adding this chmod task before the jar execution task will always ensure the permission is given to any agent which is trying to run this job. Else you can uncheck the "Fetch material" option from the pipeline stage setting to avoid material update check and you can change the permission to the jar file at once from the terminal. Hope this helps. Thanks, Padma On Mon, Jun 6, 2016 at 4:59 PM, <[email protected]> wrote: > Hi, > > I want to deploy a example.jar file for that I define a stage having a job > and a task " java -jar example.jar". > But I getting the error: > > Please make sure [java -jar example.jar] can be executed on this agent. > > I correctly define the working directly. > > And when I run the same command from terminal window of agent it is > executing perfectly fine. > > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
