But, I find that approach difficult to understand and would prefer a more classic "if-then-else" solution. One uses built in Ant tasks that can do one thing or another. Note, once a property is set in Ant it can not be modified.Ĭontributors provide two answers. So, how can I do this better? By using some form of if-then-else condition processing. Simple, but clearly not a scalable solution. Then, keeping it simple, I create two build.xml files that are identical except one uses the sandbox properties and the other uses the production. One for the sandbox and the other for production. What I need is an easy way to work with a project and have it quickly switch between a Sandbox and the main Production instance of Salesforce.Īt first this is easy enough: I just need to have two build.properties files. So, I am beginning to use the command line tool more and the IDE less. The Ant Migration Tool is significantly faster that using the IDE. I'm using a Mac so Window's users will need to make a few adjustments. I'll show you how to create ant build scripts to easily switch between a Sandbox and Production. This is a continuation of my previous post Getting Started with Salesforce Ant Migration with IDE Easily Switch Between Sandbox and Production Using the Force Migration Tool
0 Comments
Leave a Reply. |