function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lin Zhang 4Lin Zhang 4 

ant migration tool to reference ant-salesforce.jar file at arbitrary location

I am building a continuous delivery pipline with ant migration tool and encounted one issue. where do I put ant-salesforce.jar? I can't put it in apache-ant lib folder on host because host created on demand. I was hoping I can specify its locatoin in build.xml file. I took sample build.xml file to try:
build.xml:
    <taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
        <classpath>
            <pathelement location="../ant-salesforce.jar" />
        </classpath>
    </taskdef>

It doesn't work when running ant tool. it complanins about ant-salesforce.jar is not a JAR.
Can someone suggest a solution?
Thanks!
Lin 
Ajay K DubediAjay K Dubedi
Hi Lin,
Hey if want to to run the ANT Migration tool than you must copy the jar file into the lib folder which is located in ANT folder and for more information for installation use this link below:
http://ant.apache.org/manual/install.html
Shreyas Dhond 16Shreyas Dhond 16
Hey Lin,

The location described in you your taskdef in a folder above your build.xml. Is this where the ant-salesforce.jar resides?
If that's the case then this is correct.

Regards,
Shreyas
sanket mahajan 1sanket mahajan 1
Hello All, 

Please go through my blog. I have setup with both Proxy and Non proxy settings.

https://sfdc-concepts.blogspot.com/2019/12/how-to-setup-ant-for-salesforce.html

Hope this will help!

Thanks,
Sanket