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 in Jenkins by Mihir
274 views

2 answers to this question.

0 votes

Hey @Mihir,

Changing Ant version from default to Ant fixed the errors.

answered May 16 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 by Sirajul
• 25,700 points

Related Questions In Jenkins

0 votes
1 answer
0 votes
2 answers

Error Jenkins: Failed to connect to repository

Jenkins runs as another user, not as ...READ MORE

answered Aug 7 in Jenkins by Sirajul
• 25,700 points
584 views
+1 vote
4 answers
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
152 views
0 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 in Jenkins by anonymous
5,234 views
+2 votes
5 answers