0

I could not invoke ant from Jenkins.

I am new to this CI/CD, I was able to invoke ant from cmd but I could not do it with jenkins. If I need to upload futher code, please let me know.

The error is referring to this line in my build.xml file:

<project name="Sample usage of Salesforce Ant tasks" default="fetcheddata" basedir="." xmlns:sf="antlib:com.salesforce">

Error:

Target "fetcheddata" does not exist in the project "Sample usage of Salesforce Ant tasks". 

Total time: 1 second
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE```
2
  • consider using sfdx instead of old ant metadata. sfdx is a new tool with all capabilities of ant and has additional useful functionality. Nov 26, 2021 at 7:33
  • @OleksandrBerehovskyi, it is working with sfdx, thank you for the advice. How to close this question? Nov 26, 2021 at 7:42

1 Answer 1

1

In order not to invest time in an old tool ant migration tool, I recommend you take a look at sfdx. sfdx is a new tool with all capabilities of ant and has additional useful functionality. Here is a documentation with detailed instructions on how to work with it. Here is just a few examples of deploying metadata.

deploy sfdx metadata format sfdx force:source:deploy -p path/to/source

retrieve sfdx format metadata from org sfdx force:source:retrieve -p path/to/source

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .