Questions tagged [ant]

Apache Ant is a software tool for automating software build processes.

Filter by
Sorted by
Tagged with
23
votes
4answers
16k views

best way to delete unused apex classes and triggers in production [duplicate]

We currently have around 20 apex classes and 5 triggers which are not used in our production org. We want to delete them in our production instance. We dont have ant scripts ready yet to be used for ...
23
votes
4answers
12k views

Deployment issues with Process Builder Flows

Deploying Process Builder Flows from one org to a target org only works via the ant migration tool if the existing process builder flows are deleted first using destructive changes. However, if the ...
21
votes
2answers
4k views

Resetting my development org to an empty state

I would like to clear out my development org of all artefacts on a regular basis and then do a deploy of the development package from my local source. I realise there are retrieve and list tasks ...
20
votes
1answer
9k views

Force.com IDE profile deployment - You cannot deploy to a required field Object_Name__c.Field_Name__c

The following error pops up when I am trying to move all the meta data from one environment to another (with Profiles). You cannot deploy to a required field Object_Name__c.Field_Name__c Upon ...
14
votes
3answers
14k views

Why am I getting a not in package.xml error on custom fields when the custom object is in my package.xml?

Question Doing a deployment with ANT that includes some apex and a custom object. However, when I test deploy I'm getting errors about fields not being in the package.xml. Has something changed ...
14
votes
1answer
422 views

How can I delete a Development Package (not an Installed Package) programatically?

Under Setup > Create > Packages, I have deployed "packages" with prefix 033 Under Setup > App Setup > Installed Packages, I have installed "packages" also with prefix 033 I understand that it is ...
13
votes
4answers
8k views

Ant Migration tool - sf:compileAndTest

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the ...
11
votes
2answers
3k views

Execute an Apex class using Ant build script

We are in the process of setting up automatic build using Ant. We want to do some start up activities like read an xml file which is stored as a static resource and verify it with a custom object data ...
11
votes
4answers
12k views

How to retrieve customFields on standard objects using Ant Migration Tool

Background I'm trying to reset a dev org by using this ant script. Most part of the customisations added by default are removed. However, I'm not being able to retrieve custom fields on Opportunity,...
10
votes
2answers
1k views

Unable to deploy code to Sandbox as installed Managed Package test methods are failing

I am using ant tool to deploy code to Sandbox which has Managed package test methods failures. Build error shows the validation rule message. Build is executed by Jenkins schedule job, so turning on ...
10
votes
1answer
276 views

Independent Auto-Number Sequence

How do I specify API 30.0's new Independent Auto-Number sequence feature for tests run while migrating code from Sandbox into Production? I see the checkbox for this on Test Options, but how do you ...
10
votes
1answer
3k views

Is it possible to deploy workflow rules and field update actions which reference PersonAccount record types?

I am performing a deployment from one sandbox to another using ant. The sandboxes both have PersonAccount functionality enabled. The source org has a PersonAccount record type with the name of HCP and ...
9
votes
3answers
9k views

How to retrieve or deploy Custom Metadata Records by ANT Migration Tool?

How to retrieve or deploy Custom Metadata Records by ANT Migration Tool? Is this possible? I guess it should be possible if this is available for packages and changesets but can't find a way ...
9
votes
2answers
2k views

Ant Migration Tool - Not retrieving Task fields

I'm not able to retrieve any custom fields on the Task object. I'm able to get Contact custom fields fine. These fields are included in a managed package, but I don't understand why the Contact ...
8
votes
1answer
7k views

Deploy “Rename Tabs and Labels” Object

I have seen a few stories touching on this topic but all I have found so far are for creating packages, not deployment from org to org. My question is simple - is there a way (either through data or ...
7
votes
1answer
9k views

How to deploy approval process using ANT/Eclipse in salesforce

I am trying to deploy approval process to cutomer Production orgs. It is difficult to do the manual creation of approval in each customer org. Anybody know this can be done by ANT/Eclipse ? Thanks in ...
7
votes
2answers
3k views

How to retrieve action overrides?

Question Is there any trick to retrieving action overrides via the metadata api? Background The docs seem to indicate this is straightforward, just use object dot notation and a type of ...
7
votes
1answer
190 views

Can anything be done to accelerate Ant deployment times?

We are using Ant (a mix of command line, as well as through Atlassian Bamboo/AWS) to do sandbox-to-sandbox deployments. To narrow the focus of this question, let's assume unit tests are not being run. ...
6
votes
2answers
4k views

How do I retrieve Lightning Web Components using Ant Migration tool or mdapi:retrieve command from SFDX?

This is not clear or obvious how can anyone retrieve Lightning Web Components using Ant Migration tool or mdapi:retrieve command from SFDX? What is appropriate metadata API component which ...
6
votes
1answer
617 views

Any way of resetting my development org to an empty state?

Is there currently any way to reset a salesforce development org to an empty state using the Migration tool. I am aware of destructiveChanges.xml but this seems to be giving me issues because of ...
6
votes
2answers
4k views

Run Specific Tests with Ant Deploy specified by command line or file

When deploying with ant you have the option to specify which tests to run, e.g. <target name="deploy"> <sf:deploy username="${sf.username}" password="${sf.password}" ...
6
votes
1answer
1k views

What is a good and free static apex code review plugin for IDEA, eclipse and ANT?

Java has a number of useful and FREE tools for reviewing not just formatting and style but quality of code and bad coding habits. Checkmarx and Code scan could work but they are not free and open ...
6
votes
1answer
4k views

“Error: Must specify the metadata file” reported with Force.com migration tool

I have brought down a copy of a Salesforce org from a Git repository. When attempting to deploy it to a sandbox I'm getting the following error (suitably anonymised): <sf:deploy username="${sf....
6
votes
1answer
121 views

Get Lightning Web Component (LWC) definition on a describe

I need to describe a Salesforce Org that contains LWC, but the JSON obtained with the command: sfdx force: mdapi: describemetadata -a 44.0 -u username does not define me the LWC that should be ...
6
votes
1answer
844 views

are there alternatives to Salesforce ANT

Today, we are using the combination of Jenkins and the Salesforce ANT migration toolkit. The problem is that all our other projects in the company are not using ant anymore and have moved to either ...
6
votes
2answers
5k views

Standard Picklist Fields in Metadata API v39

Standard Picklist Fields were renamed in the Metadata API from "CustomField" (v37) to "StandardValueSet" (v38). Now, in v39 they are back to "CustomField", but when you retrieve one of this Standard ...
6
votes
2answers
3k views

Unable to use destructiveChanges.xml with multiple developers

(Sorry, long post) We have a team of 4 developers, each with their own DE org We are struggling with propagating destructive changes between orgs. From our reading of the docs, we should be able to ...
6
votes
4answers
3k views

'content' missing in xml file for Static Resource

While deploying code by ANT, i am receiving following error for all Static Resources: staticresources/myResource.resource-meta.xml -- Error: Required field is missing: content Could this be ...
6
votes
1answer
1k views

Jenkins + Force.com Migration Tool - REQUEST_RUNNING_TOO_LONG

I am currently receiving a REQUEST_RUNNING_TOO_LONG error when using the Force.com Mirgration Tool and Ant with Jenkins. I've read quite a few posts about this error and understand that this is ...
6
votes
2answers
6k views

Ant deployment: Error: Unknown user permission: EditPublicReports

I'm trying to get ant to deploy successfully. My package.xml pulls in profiles such as this: <types> <members>Admin</members> <members>Planning Administrators&...
6
votes
1answer
206 views

How can I dynamically create build.xml so the only tests that run are related to the code I'm deploying?

I'm looking into routing my code through Git and am wanting to do builds using Ant. However, I do not want to run all tests on each build and only want to run tests for the files that have changed ...
6
votes
1answer
700 views

Deploying Metadata to sandboxes using ant build

We are using subversion to commit all our meta data changes from our sandboxes. When we deploy to a testing environment, we want to get only the changed meta data which we can get from svn and ...
6
votes
1answer
848 views

How to dynamically retrieve ANY report in a folder using package.xml

In ANT or Eclipse I want to retrieve ALL reports of a given folder WITHOUT declaring each report in package.xml line-by-line expressis verbis. What Eclipse is generation, when I subscribe to a folder ...
6
votes
1answer
1k views

error deploying entitlement process via ant migration tool and changeset

I'm trying to deploy a new version of an existing entitlement process from one dev sandbox to a full copy sandbox using the ant migration tool. <Package> <types> <members&...
6
votes
2answers
2k views

How to do incremental builds in Jenkins using ANT Migration Tool

I am able to run ANT build in Jenkins , how can I configure Jenkins to only build recent revisions or to skip commits which were build in previous run. By build , I mean to deploy changes to other ...
5
votes
1answer
869 views

Ant migration tool and own required test coverage value

Does somebody know about the following scenario: I need to - calculate an apex code coverage during deployment with Migration tool - give the result on console, - after that I need to decide about ...
5
votes
3answers
2k views

Unknown user permission: ManageSandboxes

Using the Force.com Migration Tool (Ant) v1.9.4 to deploy from one sandbox to another both on Spring '17 results in 21. profiles/Admin.profile -- Error: Unknown user permission: ManageSandboxes 22. ...
5
votes
1answer
631 views

Destroying dependencies with Ant Migration Tool

I have a very simple case that I'm surprised Salesforce migration tool can't deal with. I have two date fields on Account: Open and Closed. I then have a formula field that sets a boolean to true if ...
5
votes
2answers
1k views

Required value missing - sourceValue

I am receiving this error while deploying Reports through ANT. After investigation I found that the below 'backets' tag don't have tag 'sourceValues'. However the thing is that I have just got ...
5
votes
1answer
591 views

How to detect ant retrieve failure in script?

Question Is there a way to detect if an ant retrieve call fails due to a login issue? Background I've got a pretty basic bash script that uses ant to retrieve the latest changes from our production ...
5
votes
1answer
344 views

Deploying >10k Records within Custom Metadata Type Object

I have created a Custom Metadata Type object (lets say I have called it CMDObject__mdt). I have uploaded all of my configuration records into there but there are 12k records and so I cannot deploy ...
5
votes
1answer
3k views

Building package.xml for Continuous Integration Or Ant Deployment

I am in the process of setting up version control and automated builds using Git and ANT and eventually we might setup Jenkins for continuous integration. My plan is to utilize Git branches by ...
5
votes
1answer
72 views

Issue with re-creating a Big Object with the same API Name

As part of a POC, someone had created a big object called StatusTracking__b. After a few stuff-ups they ended up keeping StatusTracking3__b in the system. The time has come for things to get ...
5
votes
1answer
331 views

Release community, A site with those parameters is already in use

We have created a community in a sandbox and would like to release it using ANT or Change sets. But we are now getting an error: A site with those parameters is already in use. I realize now that we ...
5
votes
1answer
153 views

Default permissions that are granted when using InstalledPackage?

I have been using InstalledPackage for a while now as a quick way to install managed packages in different orgs without having to log in. It appears that the default permissions that are granted is ...
5
votes
4answers
2k views

Deploying destructiveChanges.xml - Error parsing package.xml

Wondering if someone can help me with this. I'm trying to delete some components with the migration tool (Ant). However when I try to deploy, I'm getting the following error: *********** ...
4
votes
2answers
4k views

Apex class has Batchable or Future jobs pending or in progress

I am deploying to production using the Ant migration tool. Every class is reporting the error: Apex class has Batchable or Future jobs pending or in progress Even classes such as StringUtils and such ...
4
votes
2answers
4k views

Failed to login: UNSUPPORTED_API_VERSION - Invalid Api version specified on URL

I'm using the Force Migration Tool (Ant Task) and getting an error on a deploy command: <target name="deployCode"> <sf:deploy username="${sf.usernameDestination}" ...
4
votes
1answer
7k views

Error: “Picklist value in picklist not found” while deploying using ANT

on my account object, I created a picklist field - testPicklist1__c. The picklist field has various values in it. One picklist value is "abc t" & its API name is "abc". I retrieved the Account ...
4
votes
1answer
5k views

Deploying Business processes with ANT

I have tried to deploy business processes with ant. I seem to have the syntax wrong. I am seeing Entity type: 'businessProcesses' is unknown <?xml version="1.0" encoding="UTF-8"?> <Package ...