{"id":21016665,"url":"https://github.com/gsa/sf_antbuildfiles","last_synced_at":"2026-02-26T12:04:17.699Z","repository":{"id":72309540,"uuid":"84352840","full_name":"GSA/sf_ANTbuildfiles","owner":"GSA","description":"Automating ANT - Salesforce Deployment Scripts","archived":false,"fork":false,"pushed_at":"2020-10-19T12:27:13.000Z","size":21,"stargazers_count":7,"open_issues_count":1,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-13T16:47:28.978Z","etag":null,"topics":["salesforce","salesforce-deployments","salesforce-devops"],"latest_commit_sha":null,"homepage":"","language":"Apex","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GSA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-08T18:24:48.000Z","updated_at":"2021-11-16T10:46:28.000Z","dependencies_parsed_at":"2023-09-17T04:47:55.811Z","dependency_job_id":null,"html_url":"https://github.com/GSA/sf_ANTbuildfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GSA/sf_ANTbuildfiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsf_ANTbuildfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsf_ANTbuildfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsf_ANTbuildfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsf_ANTbuildfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GSA","download_url":"https://codeload.github.com/GSA/sf_ANTbuildfiles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GSA%2Fsf_ANTbuildfiles/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259565565,"owners_count":22877347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["salesforce","salesforce-deployments","salesforce-devops"],"created_at":"2024-11-19T10:15:25.401Z","updated_at":"2026-02-26T12:04:17.657Z","avatar_url":"https://github.com/GSA.png","language":"Apex","funding_links":[],"categories":[],"sub_categories":[],"readme":"sf_ANTbuildfiles\n=================\n\nGSA Release Managment sample Salesforce.com deployment structure utilizing\n[Apache Ant](http://ant.apache.org/) and the\n[Force.com Migration Tool](https://developer.salesforce.com/page/Force.com_Migration_Tool).\n\nThis structure can be used as a base for your Salesforce deployments to quickly deploy metadata to your Salesforce org.\n\nGetting Started\n---------------\n\n#System Requirements\n1. **Apache Ant** - See [Installing Apache Ant](http://ant.apache.org/manual/install.html)\n   for details.\n2. **Force.com Migration Tool** - See\n   [Installing the Force.com Migration Tool](http://www.salesforce.com/us/developer/docs/daas/Content/forcemigrationtool_install.htm)\n   for details. \n3. After completing installations, you should have ``ant-salesforce.jar`` included in\n   your Ant libraries.\n\n#Contents\n* **``removecodepkg``** - Sample structure for deleting files from a Salesforce\n  org. Includes an empty ``package.xml`` and a ``destructiveChanges.xml``\n  that lists the files to be deleted.\n* **``static``** - A static file is created and uploaded to the folder which contains metadata that will be retrieved for each deployment. In case of a package with only permissionsets the ‘retrieveunpackaged’target will just retrieve the ``\u003cuserpermission\u003e`` as it is missing the supporting metadata while retrieving from the target org. Static package will ensure all the metadata components are included for a successful permissionset retrieve.\n* **``src``** - Sample struture for deploying files to Salesforce Org. Inludes ``pckage.xml`` and components that are mentioned in the ``package.xml``\n* **``build.properties``** - Ant properties file for individual\n  configurations (e.g. usernames and passwords/sessionId).\n* **``build.xml``** - Ant build file with shorthand targets to use the\n  Force.com Migration Tool targets.\n\n\n#Configurables\nList of configurable build properties from ``build.properties``:\n\n* **``sf.username``** - Username for the org you will be deploying to /\n  retrieving from.\n* **``sf.password``** - Password + security token for the user you wish\n  to login as for deploying/retrieving metadata.\n* **``sf.sessionId``** - Salesforce session Id for the user you wish \n  to login as for deploying/retrieving metadata. Session Id can be retrieved by using this command in the Devconsole : ``System.debug('The Session ID is ' + UserInfo.getSessionId());``\n* **``sf.serverurl``** - Login url for your Salesforce org type.  Prod/dev use\n  \u003chttp://login.salesforce.com\u003e, sandboxes use \u003chttp://test.salesforce.com\u003e.\n* **``sf.deployRoot``** - The directory containing the metadata to be deployed to\n  your Salesforce org.  \n\nUsage\n---------------\nUse CL or Git Bash and Run **``ant [target]``** from the ``deployment`` directory.\n\n\n### Targets\nShorthand targets included in the build file.\n\n#### deploy\nThis is a global target build to call out multiple short hand targets within the build.xml file. This target calls following targets\n``retrieveunpackaged``\n``retrieveunpackagedstatic``\n``deployCodeVerify``\n``deployCode``\n\nExample:\n\n```JAVA\n\n\u003ctarget name=\"deploy\"\u003e\n          \u003cecho\u003eRetrieving backup using the package.xml in \"src\"\u003c/echo\u003e\n                  \u003cantcall target=\"retrieveUnpackaged\" /\u003e\n\t  \u003cecho\u003eRetrieving backup using the static/package.xml\u003c/echo\u003e\n                  \u003cantcall target=\"retrieveUnpackagedStatic\" /\u003e\n\t  \u003cecho\u003ePerforming code verification to the target sandbox\u003c/echo\u003e\n\t\t  \u003cantcall target=\"deployCodeVerify\" /\u003e\n\t  \u003cecho\u003ePerforming code Deployment to the target sandbox\u003c/echo\u003e\t\n\t\t  \u003cantcall target=\"deployCode\" /\u003e\n\t\t  \n\u003c/target\u003e\n```\n\n\n#### retrieveUnpackaged\nretrieve and unpackaged set of metadata from your org.\n\n#### retrieveUnpackagedstatic\nRetrieve an unpackaged set of metadata from your org. The file ``static/package.xml`` lists what is to be retrieved.\n\n#### deployCodeVerify\nValidate the contents of the ``/src`` directory, running the tests for specified classes.\n\n#### deployCode\nDeploy the contents of the ``/src`` directory, running the tests for specified classes.\n\n#### undeploy\nRemove/Undeploy metadata specified in a ``destructiveChanges.xml`` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsa%2Fsf_antbuildfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsa%2Fsf_antbuildfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsa%2Fsf_antbuildfiles/lists"}