sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [sling-slingfeature-maven-plugin] 02/14: Start changing start level handling to start order handling
Date Fri, 27 Apr 2018 09:44:01 GMT
This is an automated email from the ASF dual-hosted git repository.

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git

commit 0b61a69f0d170a7da1d59ceeb1fc1afb3b2f520a
Author: Carsten Ziegeler <cziegeler@apache.org>
AuthorDate: Thu Jan 18 16:14:50 2018 +0100

    Start changing start level handling to start order handling
---
 .../apache/sling/feature/maven/Preprocessor.java   | 25 +++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/maven/Preprocessor.java b/src/main/java/org/apache/sling/feature/maven/Preprocessor.java
index 47a09c5..f7c011d 100644
--- a/src/main/java/org/apache/sling/feature/maven/Preprocessor.java
+++ b/src/main/java/org/apache/sling/feature/maven/Preprocessor.java
@@ -16,6 +16,16 @@
  */
 package org.apache.sling.feature.maven;
 
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 import org.apache.maven.model.Dependency;
 import org.apache.maven.project.MavenProject;
 import org.apache.sling.feature.Artifact;
@@ -30,16 +40,6 @@ import org.apache.sling.feature.support.FeatureUtil;
 import org.apache.sling.feature.support.json.FeatureJSONReader;
 import org.codehaus.plexus.logging.Logger;
 
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
 /**
  * The processor processes all feature projects.
  */
@@ -116,7 +116,8 @@ public class Preprocessor {
                         info.project.getVersion(),
                         null,
                         "jar"));
-                feature.getBundles().add(Integer.valueOf(config.getJarStartLevel()), jar);
+                jar.getMetadata().put(Artifact.KEY_START_ORDER, String.valueOf(config.getJarStartLevel()));
+                feature.getBundles().add(jar);
             }
         }
 
@@ -295,7 +296,7 @@ public class Preprocessor {
             final ProjectInfo info,
             final Feature assembledFeature,
             final String scope) {
-        for(final Map.Entry<Integer, org.apache.sling.feature.Artifact> entry : assembledFeature.getBundles())
{
+        for(final Map.Entry<Integer, org.apache.sling.feature.Artifact> entry : assembledFeature.getBundles().getAllBundles())
{
             final ArtifactId a = entry.getValue().getId();
             if ( a.getGroupId().equals(info.project.getGroupId())
                  && a.getArtifactId().equals(info.project.getArtifactId())

-- 
To stop receiving notification emails like this one, please contact
davidb@apache.org.

Mime
View raw message