**Source URL:** https://general.veevavault.dev/vault-sdk/deploying-code/create-vpk.md

# Create a VPK



Before you can create your VPK, you must verify that your source code is in the proper [file structure](/vault-sdk/deploying-code/create-vpk/#Verify_File_Structure) and prepare a valid [`vaultpackage.xml` manifest file](/vault-sdk/deploying-code/create-vpk/#Create_Manifest). This manifest file tells Vault whether you’re adding, replacing, or removing code.

Create a VPK by zipping your `javasdk` folder and the `vaultpackage.xml` manifest file and renaming it with the `.vpk` extension. For more detailed instructions, see [Getting Started](/vault-sdk/getting-started/).

### Verify File Structure {#Verify_File_Structure}

Your file structure must adhere to the following guidelines:

* Source files must be located under the `javasdk` folder in a maven project directory hierarchy as follows: `src.main.java.com.veeva.vault.custom`

* Source files may be located in any number of arbitrarily named subpackage folders under `custom`. For example, `custom.triggers` or `custom.actions`.

* You can have no more than 1,000 `.java` source files or 50MB of data in a single deploy. If you have more than 1,000 source files or a VPK larger than 50MB, the entire deploy will fail.

* The following files are ignored:

* Any files not in the structure defined above

* Any files without the .java extension

### Create Manifest File {#Create_Manifest}

Your manifest file must be named `vaultpackage.xml` and must be located in the root of your file structure.

Example `vaultpackage.xml`:

```
<vaultpackage xmlns="https://veevavault.com/">
  <name>PKG-DEPLOY</name>
  <source>
    <vault></vault>
    <author>mmurray@veepharm.com</author>
  </source>
  <summary>PromoMats RecordTrigger</summary>
  <description>Record trigger on the Product object for PromoMats.</description>
  <javasdk>
    <deployment_option>incremental</deployment_option>
  </javasdk>
</vaultpackage>

```

All of the following attributes must appear in the manifest file. Attributes marked as *Optional* must still be included, but can be left with a blank value.

| Attribute | Description |
| --- | --- |
| `` | Top-level attribute to hold all other attributes. Must include `xmlns="https://veevavault.com/"`. |
| `` | A name which identifies this package. |
| `` | A top-level attribute to hold the following sub-attributes:``: Optional: We recommend leaving this blank. This is the Vault ID of the source Vault, but because you are importing this VPK, this attribute is ignored. When you export a VPK from Vault, this field is automatically populated with the source Vault ID.``: The Vault user name of the user who created this package. |
| `` | Provide more information about this package. Appears in the Summary section of **Admin > Deployment > Inbound Packages**. |
| `` | A top-level attribute to hold the `` sub-attribute. This tells Vault how to deploy your package in Vaut. Valid values are:`incremental``replace_all``delete_all`Learn more in the [Deployment Options](/vault-sdk/deploying-code/create-vpk/#Deployment_Options) section. |
| `` | Optional: A description of your package. If omitted, the description will appear blank in **Admin > Deployment > Inbound Packages**. |

#### Deployment Options {#Deployment_Options}

* `incremental`: Add new or update existing code in the target Vault. This will never delete source files from the target Vault, but it may overwrite existing files.

* `replace_all`: Completely delete all existing source code in the target Vault and replace it with the code in this VPK. This may permanently delete source files from the target Vault.

* `delete_all`: Delete all of the existing source files in the target Vault. This setting only works if the VPK contains an empty `javasdk` folder, or if no such folder is included.



---

**Previous:** [Deploying Code](/vault-sdk/deploying-code)  
**Next:** [Import the VPK to Vault](/vault-sdk/deploying-code/import-vpk)