1

As described here http://andyinthecloud.com/2013/06/23/look-ma-no-hands-automating-install-and-uninstall-of-packages/ managed packages can be installed via ant or the APEX wrapper.

Is it possible to install unmanaged packages, too? If so, how?

1
  • Sorry for the erroneous comment (which I've deleted) -- I didn't read carefully enough before posting
    – daveespo
    Commented Apr 15, 2015 at 15:35

1 Answer 1

7

It's not possible with that method. The InstalledPackage metadata type requires a namespace and unmanaged packages don't have one.

What you can do is install the unmanaged package into an org and then do a retrieve of the package's metadata. You can use the retrieved package metadata to deploy into any other org via ant or any other deployment tool. It will create the package and add all the metadata into it the same as would be done if you install the unmanaged package through the installation url.

The way this works is the magical <fullName>PACKAGE_NAME</fullName> line in the package.xml when retrieved passing the packageNames parameter instead of a manifest to retrieve. Here's an example: https://github.com/SalesforceFoundation/CumulusCI/blob/master/build/cumulusci.xml#L252

1
  • Added bonus, you can actually "update" an unmanaged package this way :) Commented Apr 22, 2015 at 22:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .