SLING-4149: adding component factories based on resources

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1637904 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/resources/SLING-CONTENT/libs/sling/distribution/install.author/org.apache.sling.distribution.component.impl.ContentBasedDistributionComponentFactory-agents.json b/src/main/resources/SLING-CONTENT/libs/sling/distribution/install.author/org.apache.sling.distribution.component.impl.ContentBasedDistributionComponentFactory-agents.json
new file mode 100644
index 0000000..012616c
--- /dev/null
+++ b/src/main/resources/SLING-CONTENT/libs/sling/distribution/install.author/org.apache.sling.distribution.component.impl.ContentBasedDistributionComponentFactory-agents.json
@@ -0,0 +1,8 @@
+{
+    "jcr:primaryType": "sling:OsgiConfig",
+    "name": "agents",
+
+    "kind": "agent",
+    "path": "/libs/sling/distribution/jcrsettings/agents",
+    "servicename" : "distributionService"
+}
\ No newline at end of file
diff --git a/src/main/resources/SLING-CONTENT/libs/sling/distribution/jcrsettings/agents/jpublish.json b/src/main/resources/SLING-CONTENT/libs/sling/distribution/jcrsettings/agents/jpublish.json
new file mode 100644
index 0000000..17c1dd9
--- /dev/null
+++ b/src/main/resources/SLING-CONTENT/libs/sling/distribution/jcrsettings/agents/jpublish.json
@@ -0,0 +1,38 @@
+{
+    "name": "jpublish",
+    "jcr:primaryType" : "nt:unstructured",
+
+    "serviceName" : "distributionService",
+
+    "requestAuthorizationStrategy" : {
+        "type" : "privilege",
+        "jcrPrivilege" : "jcr:read"
+    },
+
+    "packageExporter":  {
+        "type": "local",
+        "packageBuilder" : { "type"  : "vlt" }
+
+    },
+
+    "packageImporter": {
+        "type" : "remote",
+
+        "transportAuthenticationProvider" : {
+            "type" : "user",
+            "username" : "admin",
+            "password" : "admin"
+        },
+
+        "endpoints" : [
+            "http://localhost:4503/libs/sling/distribution/services/importers/default"
+        ],
+
+        "packageBuilder" : { "type" : "vlt" }
+
+    },
+
+    "queueDistributionStrategy" :  { "type" : "single" },
+
+    "queueProvider" : { "type" : "job", "name" : "jpublish" }
+}
\ No newline at end of file