Error saying FATAL command execution failed Maybe you need to configure the job to choose one of your Ant installations - Jenkins

0 votes

I'm trying to execute a java code on Jenkins and it throws me the following error:

FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations?

I've executed the exact thing on Eclipse and it works perfectly fine.

May 16, 2019 in Jenkins by Mihir

2 answers to this question.

0 votes

Hey @Mihir,

Changing Ant version from default to Ant fixed the errors.

answered May 16, 2019 by Vedant
0 votes

To begin with, the best possible way :

  • Jenkins will install Ant (and other tools for you during the installation of jenkins). 

  • On the Global Configuration (Manage Jenkins), configure Ant installation, by choosing the version and the source. 

  • At that point, when you run an Ant build step, you can pick a version, either default or the one you've recently configured. 

  • When the build is executed, Jenkins will download, install, and configure that specific rendition/version for you (within jenkins), without affecting the OS.

The default way :

  • That default version is a fallback that Jenkins utilizes when you haven't configured a appropriate version to utilize. 

  • It attempts to utilize whatever is accessible on command line, by executing ant from current working directory. 

So to fix your issue, either utilize the first way with Jenkins,installing the tool or appropriately configure the tool on OS level for jenkins user. 

answered Aug 1, 2019 by Sirajul
• 59,230 points

Related Questions In Jenkins

0 votes
1 answer
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
5 answers

How to resolve this error “Jenkins Host key verification failed”?

HI Mam, Please check the following solution:: 1. Switch ...READ MORE

answered May 3, 2019 in Jenkins by anonymous
+2 votes
5 answers
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP