2
votes

I have Master Slave configuration under Jenkins.I wanted to run a job on the slave system under Jenkins I order to do that I have copied the required scripts and files But I have been getting the following error

Started by user anonymous [EnvInject] - Loading node environment variables. Building remotely on MySlave in workspace C:\Users\prathamesh.n\workspace\MasterSlave

FATAL: Cannot find executable from the chosen Ant installation "apache-ant-1.9.4" Build step 'Invoke Ant' marked build as failure

Archiving artifacts [htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at PROJECT level C:\Users\sudharshan.r\workspace\Ant\exec\reports\Test 1 to C:\Users\sudharshan.r.jenkins\jobs\Project 11\htmlreports\HTML_Report ERROR: Specified HTML directory 'C:\Users\sudharshan.r\workspace\Ant\exec\reports\Test 1' does not exist. TestNG Reports Processing: START Looking for TestNG results report in workspace using pattern: C:/Users/sudharshan.r/workspace/Ant/exec/reports/Test 1/testng-results.xml Did not find any matching files. [BFA] Scanning build for known causes...

[BFA] Done. 0s Finished: FAILURE

need help on executing ant on slave

2
Do you have ant installed on your slave? If yes what's the path? - SMA
I have ant installed on my slave.Path Is C:\apache-ant-1.9.4\bin - RCBian

2 Answers

0
votes

Click on Jenkins - > Manage Jenkins -> configure system -> Under Ant, define your installer and then in your job select that ant configuration.

0
votes

Whats your configuration in your build? Default or let's assume my 1.9.

Now in "configure jenkins": Add a specific ant e.g. with name my 1.9.

  • easiest way is automatic installation and installation from Apache
  • if you don't want to do this: uncheck automatic installation and give your path were you installed ant in the field: ANT_HOME