I have created few lightning component in my GSO ORG and now I want to deploy it to my another ORG
I created a below mentioned package . It is retrieving the lightning components and creating a folder name 'Aura'under the SRC folder in my project(event, bundle etc… are inside that folder). However, when I am trying it to deploy to server, it is giving me this error: 'Unable to Deploy, no deployable resource found'. any Idea how to deploy lightning components?
Package I created for retrieving the lightning components:
<types>
<members>*</members>
<name>AuraDefinitionBundle</name>
</types>
Best Answer
You can retrieve and deploy all types of Lightning metadata, including Components, Applications, Interfaces, and Events, from/to any org using the Force.com Migration Tool, by deploying/retrieving the
AuraDefinitionBundle
metadata type.I have gotten this to work using the API v35 version of the Force.com Migration Tool --- I don't know whether it works with earlier versions of the tool, but judging by the Lightning_FAQ incorrectly saying that this is not possible when in fact it is, I'd guess that this only works in v33 or higher since Spring 15 (v33) was when Lightning Components went GA.
I have tested deploys to Developer Edition orgs with AND without namespaces, which further makes me think that the Lightning FAQ needs to be updated.
RETRIEVE
I did a simple "retrieve unpackaged" routine using the following SF Ant retrieve task:
With package.xml:
This dumps retrieved output into a specified folder, putting all Aura bundles within an
aura
folder. Each bundle --- whether it is a Lightning Application, Component, etc. --- will be displayed within a separate child folder within theaura
folder, with the name of the Bundle. Within each bundle's folder, the individual component pieces of each bundle are retrieved. For instance, if you've got a Lightning Component called "example", you might have the following child files withinretrieveUnpackaged/aura/example
:For other types of Bundles, e.g. Lightning Applications, the
-meta.xml
file will be attached to whatever the Bundle's principal file is, e.g. for a Lightning App named "test" there will be a "test.app-meta.xml` file in the directory.DEPLOY
To deploy this code to another org, I did a "deploy unpackaged" routine using the following SF Ant deploy task:
Where
retrieveUnpackaged
is the name of the directory that thesf:retrieve
task dumped its output into, which contains theaura
folder as well as the followingpackage.xml
file (again, this is generated automatically by the retrieve task, so no need to modify this at all, I'm only showing it here for illustrative purposes):