DominikSuess closed pull request #18: SLING-7991 - setting order to 
Integer.MAX_VALUE for processing last i…
URL: https://github.com/apache/sling-whiteboard/pull/18
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.gitmodules b/.gitmodules
index c366639..e69de29 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +0,0 @@
-[submodule "scripting-resolver/sling-org-apache-sling-scripting-sightly"]
-       path = scripting-resolver/sling-org-apache-sling-scripting-sightly
-       url = 
https://github.com/apache/sling-org-apache-sling-scripting-sightly.git
-       branch = experimental-scripting-resolver
diff --git 
a/featuremodel/feature-content-extension/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
 
b/featuremodel/feature-content-extension/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
index e19ba12..8a84ddb 100644
--- 
a/featuremodel/feature-content-extension/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
+++ 
b/featuremodel/feature-content-extension/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
@@ -95,7 +95,14 @@ public boolean handle(Extension extension, 
LauncherPrepareContext prepareContext
                 && 
extension.getName().equals(FeatureConstants.EXTENSION_NAME_CONTENT_PACKAGES)) {
             MultiValueMap orderedArtifacts = MultiValueMap.decorate(new 
LinkedHashMap<Integer, Collection<Artifact>>());
             for (final Artifact a : extension.getArtifacts()) {
-                orderedArtifacts.put(Integer.valueOf(a.getStartOrder()), a);
+                int order;
+                // content-packages without explicit start-order to be 
installed last
+                if (a.getMetadata().get(Artifact.KEY_START_ORDER) != null) {
+                    order = Integer.valueOf(a.getStartOrder());
+                } else {
+                    order = Integer.MAX_VALUE;
+                }
+                orderedArtifacts.put(order, a);
             }
             List<String> executionPlans = new ArrayList<String>();
             for (Object key : orderedArtifacts.keySet()) {
diff --git a/scripting-resolver/sling-org-apache-sling-scripting-sightly 
b/scripting-resolver/sling-org-apache-sling-scripting-sightly
deleted file mode 160000
index 81312ca..0000000
--- a/scripting-resolver/sling-org-apache-sling-scripting-sightly
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 81312cae81b0ebf2b78f0a78e13e11a276435e94


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to