Choosing metadata

While the build.xml and build.properties files are relatively static, the package.xml file has the possibility of changing every time you make a deploy. At it's simplest, the package.xml file can be as bare bones as this:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <name>ApexClass</name>
    <members>*</members>
  </types>
  <types>
   <name>ApexPage</name>
    <members>*</members>
  </types>
  <version>31.0</version>
</Package>

This package.xml file specifies two metadata types: ApexClass and ApexPage. And,it directs the Ant migration tool to include all metadata of these two types in the deployment. Essentially, this package.xml affects all classes and pages. Note the package node's ...

Get Mastering Application Development with Force.com now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.