5

It looks like the metadata MavensMate suggests deploying is based off of the current package.xml. The way I worked in the past was using a second package.xml, stored in some different directory, containing only the components that have changed since the last deploy. This is to keep deploys small and minimize the risk of side effects. Is there any way I can tell MavensMate to look at this file to build the metadata list or am I left with either deploying the whole package.xml or manually checking/unchecking components?

  • I have this question too. Did you ever find an answer? – mscholtz Mar 31 '15 at 18:14
  • Sorry mscholtz, I have not – Bob Roberts Mar 31 '15 at 18:15
  • Kind of unrelated to your question...did you have a way to automatically update/generate your second package.xml whenever a component has changed or did you manually update that package.xml? – user7702 Apr 17 '15 at 19:02
  • That was all manual – Bob Roberts Apr 18 '15 at 11:30
4

You can get this to work by editing the deploy/.config file in your MavensMate project. If you look at the contents of this file (which is created after you make a successful deployment) it is a JSON object that you can edit manually. The object contains one property: "deployments" which in turn contains 2 arrays: "named" and "timestamped". Here's a picture of what this JSON object looks like when you put it into Chrome DevTools: enter image description here

You can edit that object (one-time or in an automated way) to point to a package.xml file in a different directory and then re-insert it into deploy/.config. This package.xml file will then appear in your list of options under metadata in the MM deployment window. enter image description here

  • Thanks, @adb3721! I'm going to try this. So it sounds like we need to create entries under the "named" node, right? Easy enough. One question I have is what do we put in for the "id" property? Does this have to be a particular value? Or can we put anything we want for id? – mscholtz Nov 19 '15 at 20:10
  • Sorry, I'm not sure. Those Id values are auto-generated by MavensMate when you perform a deployment. What you might try is performing a deployment using the correct set of metadata and let it auto-generate an id for you. You can then modify the name as needed and hopefully it will also allow you to change the location of the package.xml file. – abd3721 Nov 20 '15 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.