You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2020/09/21 20:58:36 UTC

[sling-org-apache-sling-app-cms] 04/06: Updated to create multiple artifacts to support the different modes

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 8e103a06e28954e4a69bac1f3039c7a2ecf39edc
Author: Dan Klco <dk...@apache.org>
AuthorDate: Mon Sep 21 16:10:41 2020 -0400

    Updated to create multiple artifacts to support the different modes
---
 feature/pom.xml                                    | 46 +++++++++++++++++++---
 .../main/assembly/{standalone.xml => author.xml}   | 17 +++-----
 .../main/assembly/{standalone.xml => renderer.xml} | 17 +++-----
 feature/src/main/assembly/standalone.xml           | 15 +++----
 feature/src/main/features/distribution.json        | 28 -------------
 .../features/runmode-author/runmode-author.json    |  3 ++
 .../runmode-renderer/runmode-renderer.json         | 33 +++++++++++++++-
 .../java/org/apache/sling/cms/feature/Main.java    |  2 +-
 8 files changed, 94 insertions(+), 67 deletions(-)

diff --git a/feature/pom.xml b/feature/pom.xml
index 5f71fc2..c1edf3e 100644
--- a/feature/pom.xml
+++ b/feature/pom.xml
@@ -74,16 +74,35 @@
                     </framework>
                     <aggregates>
                         <aggregate>
-                            <classifier>slingcms-segment</classifier>
+                            <classifier>slingcms-standalone</classifier>
                             <filesInclude>**/*.json</filesInclude>
                             <filesExclude>node-store-composite/composite-*.json</filesExclude>
-                            <title>Sling CMS -</title>
+                            <filesExclude>runmode-author/*.json</filesExclude>
+                            <filesExclude>runmode-renderer/*.json</filesExclude>
+                            <title>Sling CMS - Standalone</title>
+                        </aggregate>
+                        <aggregate>
+                            <classifier>slingcms-author</classifier>
+                            <filesInclude>**/*.json</filesInclude>
+                            <filesExclude>node-store-composite/composite-*.json</filesExclude>
+                            <filesExclude>runmode-renderer/*.json</filesExclude>
+                            <filesExclude>runmode-standalone/*.json</filesExclude>
+                            <title>Sling CMS - Author</title>
+                        </aggregate>
+                        <aggregate>
+                            <classifier>slingcms-renderer</classifier>
+                            <filesInclude>**/*.json</filesInclude>
+                            <filesExclude>node-store-composite/composite-*.json</filesExclude>
+                            <filesExclude>runmode-author/*.json</filesExclude>
+                            <filesExclude>runmode-standalone/*.json</filesExclude>
+                            <title>Sling CMS - Renderer</title>
                         </aggregate>
                         <aggregate>
                             <classifier>slingcms-composite-seed</classifier>
                             <filesInclude>**/*.json</filesInclude>
                             <filesExclude>node-store-composite/composite-runtime.json</filesExclude>
                             <filesExclude>node-store-segment/segment.json</filesExclude>
+                            <filesExclude>runmode*/*.json</filesExclude>
                             <title>Sling CMS - Composite Node Store Seed</title>
                         </aggregate>
                         <aggregate>
@@ -91,6 +110,7 @@
                             <filesInclude>**/*.json</filesInclude>
                             <filesExclude>node-store-composite/composite-seed.json</filesExclude>
                             <filesExclude>node-store-segment/segment.json</filesExclude>
+                            <filesExclude>runmode*/*.json</filesExclude>
                             <title>Sling CMS - Composite Node Store Runtime</title>
                         </aggregate>
                     </aggregates>
@@ -102,13 +122,27 @@
                             <includeClassifier>slingcms-composite-seed</includeClassifier>
                         </scan>
                         <scan>
-                            <includeClassifier>slingcms-segment</includeClassifier>
+                            <includeClassifier>slingcms-standalone</includeClassifier>
+                        </scan>
+                        <scan>
+                            <includeClassifier>slingcms-author</includeClassifier>
+                        </scan>
+                        <scan>
+                            <includeClassifier>slingcms-renderer</includeClassifier>
                         </scan>
                     </scans>
                     <archives>
                         <archive>
-                            <classifier>slingcms_far</classifier>
-                            <includeClassifier>slingcms-segment</includeClassifier>
+                            <classifier>slingcms_standalone_far</classifier>
+                            <includeClassifier>slingcms-standalone</includeClassifier>
+                        </archive>
+                        <archive>
+                            <classifier>slingcms_author_far</classifier>
+                            <includeClassifier>slingcms-author</includeClassifier>
+                        </archive>
+                        <archive>
+                            <classifier>slingcms_renderer_far</classifier>
+                            <includeClassifier>slingcms-renderer</includeClassifier>
                         </archive>
                     </archives>
                 </configuration>
@@ -150,6 +184,8 @@
                     </archive>
                     <descriptors>
                         <descriptor>src/main/assembly/standalone.xml</descriptor>
+                        <descriptor>src/main/assembly/author.xml</descriptor>
+                        <descriptor>src/main/assembly/renderer.xml</descriptor>
                     </descriptors>
                 </configuration>
             </plugin>
diff --git a/feature/src/main/assembly/standalone.xml b/feature/src/main/assembly/author.xml
similarity index 89%
copy from feature/src/main/assembly/standalone.xml
copy to feature/src/main/assembly/author.xml
index 7656c49..4dff857 100644
--- a/feature/src/main/assembly/standalone.xml
+++ b/feature/src/main/assembly/author.xml
@@ -12,7 +12,7 @@
     -->
 <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
 
-    <id>standalone</id>
+    <id>author</id>
     <includeBaseDirectory>false</includeBaseDirectory>
     <formats>
         <format>jar</format>
@@ -29,18 +29,13 @@
         </dependencySet>
     </dependencySets>
 
-    <fileSets>
-        <fileSet>
-            <directory>${basedir}/target</directory>
-            <includes>
-                <include>*-slingcms_far.far</include>
-            </includes>
-            <outputDirectory>lib</outputDirectory>
-        </fileSet>
-    </fileSets>
-
     <files>
         <file>
+            <source>${basedir}/target/org.apache.sling.cms.feature-${project.version}-slingcms_author_far.far</source>
+            <outputDirectory>lib</outputDirectory>
+            <destName>slingcms.far</destName>
+        </file>
+        <file>
             <source>target/classes/org/apache/sling/cms/feature/Main.class</source>
             <outputDirectory>org/apache/sling/cms/feature</outputDirectory>
         </file>
diff --git a/feature/src/main/assembly/standalone.xml b/feature/src/main/assembly/renderer.xml
similarity index 89%
copy from feature/src/main/assembly/standalone.xml
copy to feature/src/main/assembly/renderer.xml
index 7656c49..455ce7d 100644
--- a/feature/src/main/assembly/standalone.xml
+++ b/feature/src/main/assembly/renderer.xml
@@ -12,7 +12,7 @@
     -->
 <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
 
-    <id>standalone</id>
+    <id>renderer</id>
     <includeBaseDirectory>false</includeBaseDirectory>
     <formats>
         <format>jar</format>
@@ -29,18 +29,13 @@
         </dependencySet>
     </dependencySets>
 
-    <fileSets>
-        <fileSet>
-            <directory>${basedir}/target</directory>
-            <includes>
-                <include>*-slingcms_far.far</include>
-            </includes>
-            <outputDirectory>lib</outputDirectory>
-        </fileSet>
-    </fileSets>
-
     <files>
         <file>
+            <source>${basedir}/target/org.apache.sling.cms.feature-${project.version}-slingcms_renderer_far.far</source>
+            <outputDirectory>lib</outputDirectory>
+            <destName>slingcms.far</destName>
+        </file>
+        <file>
             <source>target/classes/org/apache/sling/cms/feature/Main.class</source>
             <outputDirectory>org/apache/sling/cms/feature</outputDirectory>
         </file>
diff --git a/feature/src/main/assembly/standalone.xml b/feature/src/main/assembly/standalone.xml
index 7656c49..60d81ec 100644
--- a/feature/src/main/assembly/standalone.xml
+++ b/feature/src/main/assembly/standalone.xml
@@ -29,18 +29,13 @@
         </dependencySet>
     </dependencySets>
 
-    <fileSets>
-        <fileSet>
-            <directory>${basedir}/target</directory>
-            <includes>
-                <include>*-slingcms_far.far</include>
-            </includes>
-            <outputDirectory>lib</outputDirectory>
-        </fileSet>
-    </fileSets>
-
     <files>
         <file>
+            <source>${basedir}/target/org.apache.sling.cms.feature-${project.version}-slingcms_standalone_far.far</source>
+            <outputDirectory>lib</outputDirectory>
+            <destName>slingcms.far</destName>
+        </file>
+        <file>
             <source>target/classes/org/apache/sling/cms/feature/Main.class</source>
             <outputDirectory>org/apache/sling/cms/feature</outputDirectory>
         </file>
diff --git a/feature/src/main/features/distribution.json b/feature/src/main/features/distribution.json
index bf9080a..c471d7c 100644
--- a/feature/src/main/features/distribution.json
+++ b/feature/src/main/features/distribution.json
@@ -43,34 +43,6 @@
         "org.apache.sling.distribution.agent.impl.PrivilegeDistributionRequestAuthorizationStrategyFactory~default": {
             "name": "default",
             "jcrPrivilege": "sling:publish"
-        },
-        "org.apache.sling.distribution.serialization.impl.vlt.VaultDistributionPackageBuilderFactory~default": {
-            "fileThreshold": 1,
-            "cleanupDelay": 60,
-            "autoSaveThreshold": -1,
-            "package.roots": "",
-            "type": "jcrvlt",
-            "MEGA_BYTES": "MEGA_BYTES",
-            "property.filters": [
-                ""
-            ],
-            "pathsMapping": [
-                ""
-            ],
-            "strictImport": true,
-            "aclHandling": "IGNORE",
-            "importMode": "",
-            "digestAlgorithm": "MD5",
-            "tempFsFolder": "",
-            "monitoringQueueSize": 0,
-            "useOffHeapMemory": false,
-            "cugHandling": "",
-            "useBinaryReferences": false,
-            "package.filters": [
-                "/home/users|-.*/.tokens",
-                "/home/users|-.*/.rep:cache"
-            ],
-            "name": "default"
         }
     },
     "repoinit:TEXT|true": [
diff --git a/feature/src/main/features/runmode-author/runmode-author.json b/feature/src/main/features/runmode-author/runmode-author.json
index 31bb8f6..91c331c 100644
--- a/feature/src/main/features/runmode-author/runmode-author.json
+++ b/feature/src/main/features/runmode-author/runmode-author.json
@@ -1,6 +1,9 @@
 {
     "id": "org.apache.sling:org.apache.sling.cms.feature:slingfeature:runmode-author:${cms.version}",
     "configurations": {
+        "org.apache.sling.cms.core.publication.ForwardAgentEndpointSynchronization": {
+            "agentTarget": "(name=default)"
+        },
         "org.apache.sling.cms.core.publication.PublicationManagerFactoryImpl": {
             "publicationMode": "CONTENT_DISTRIBUTION",
             "agents": []
diff --git a/feature/src/main/features/runmode-renderer/runmode-renderer.json b/feature/src/main/features/runmode-renderer/runmode-renderer.json
index ac2bcd0..7b3eb6c 100644
--- a/feature/src/main/features/runmode-renderer/runmode-renderer.json
+++ b/feature/src/main/features/runmode-renderer/runmode-renderer.json
@@ -1,13 +1,44 @@
 {
-    "id": "org.apache.sling:org.apache.sling.cms.feature:slingfeature:runmode-author:${cms.version}",
+    "id": "org.apache.sling:org.apache.sling.cms.feature:slingfeature:runmode-renderer:${cms.version}",
     "configurations": {
         "org.apache.sling.cms.core.publication.PublicationManagerFactoryImpl": {
             "publicationMode": "CONTENT_DISTRIBUTION",
             "agents": []
         },
+        "org.apache.sling.cms.core.publication.PublicationPropertyProvider": {
+            "endpointPath": "/libs/sling/distribution/services/importers/default"
+        },
         "org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory~default": {
             "packageBuilder.target": "(name=default)",
             "name": "default"
+        },
+        "org.apache.sling.discovery.oak.Config": {
+            "invertLeaderElectionPrefixOrder": false,
+            "enableSyncToken": true,
+            "hmacEnabled": false,
+            "soTimeout": 10,
+            "connectorPingTimeout": 120,
+            "enableEncryption": false,
+            "gzipConnectorRequestsEnabled": false,
+            "backoffStandbyFactor": "",
+            "topologyConnectorUrls": [
+                "http://localhost:8080/libs/sling/topology/connector"
+            ],
+            "hmacSharedKeyTTL": 14400000,
+            "leaderElectionPrefix": 1,
+            "discoveryLiteCheckInterval": 2,
+            "connectorPingInterval": 30,
+            "clusterSyncServiceInterval": 2,
+            "socketConnectTimeout": 10,
+            "clusterSyncServiceTimeout": 120,
+            "minEventDelay": 3,
+            "autoStopLocalLoopEnabled": false,
+            "backoffStableFactor": "",
+            "topologyConnectorWhitelist": [
+                "localhost",
+                "127.0.0.1"
+            ],
+            "sharedKey": ""
         }
     }
 }
\ No newline at end of file
diff --git a/feature/src/main/java/org/apache/sling/cms/feature/Main.java b/feature/src/main/java/org/apache/sling/cms/feature/Main.java
index 390c6f3..0780738 100644
--- a/feature/src/main/java/org/apache/sling/cms/feature/Main.java
+++ b/feature/src/main/java/org/apache/sling/cms/feature/Main.java
@@ -33,7 +33,7 @@ public class Main {
         String version = properties.getProperty("version");
         System.out.println("Version "+version);
 
-        URL farUrl = Main.class.getClassLoader().getResource("lib/org.apache.sling.cms.feature-"+version+"-slingcms_far.far");
+        URL farUrl = Main.class.getClassLoader().getResource("lib/slingcms.far");
         List<String> arguments = new ArrayList<>();
         arguments.addAll(Arrays.asList(args));
         if(!arguments.contains("-f")){