I am trying to integrate github with ant migration tool and here is the description of the problem I am facing:

I download code from Github everyday and upload to my server using force IDE by right clicking on the classes and triggers folder in eclipse..I would like to avoid this and let ant take care of this.

So here is what I am trying and the problem I am running into:

Below is my directory structure:

enter image description here

and here is inside the src folder...

├── applications
├── classes
├── components
├── documents
├── labels
├── layouts
├── objects
│   ├── CustomObject.object
├── package.xml
├── pages
├── permissionsets
├── profiles
├── staticresources
├── tabs
└── triggers

I modified the below section in the build.xml file as shown below:

<!-- Deploy the unpackaged set of metadata retrieved with retrieveUnpackaged -->
<target name="deployUnpackaged">
  <sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="src" rollbackOnError="true"/>

And when I run the command ant deployUnpackaged here is the error I am getting:

enter image description here

  • I think this question can be closed..I was so stupid..I just had to change the path for ant-salesforce.jar in the build.xml file
    – javanoob
    May 4, 2015 at 22:10

1 Answer 1


I think it might be a problem with the location of your ant-salesforce.jar file. I always include it in my repos in a lib folder. Take a look at my example repo for a structure that works.

Then, your command would include the -lib switch

ant -lib lib/ant-salesforce.jar deployunpackaged

Note, another way to deploy from Github is to use Andy Fawcett's fancy button.

  • You are correct..I just realized after looking at the error closely..but I have another question..In the above case..Do i need to have a package.xml file inside the src folder or package.xml in the same location as build.xml file??
    – javanoob
    May 4, 2015 at 22:12
  • 1
    package.xml should be in the src folder. May 4, 2015 at 22:13
  • I am sorry to ask another question here in the comments..Here is my package..xml pastebin.com/D9egAcsA and when I run the command ant deployUnPackaged It reports all these errors: objects/Case.object (Case.OwnerId) -- Error: Not in package.xml Why is it trying to deploy Case object when it is not specified in the package.xml file
    – javanoob
    May 4, 2015 at 22:20
  • 1
    You need to add that to package.xml. The type is CustomObject. If you ask it as another question, I can post with a real answer and formatting. May 4, 2015 at 22:23
  • Sure..I will post a new question..Thanks so much!!
    – javanoob
    May 4, 2015 at 22:24

You must log in to answer this question.

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