You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2022/01/11 15:56:49 UTC

[sling-org-apache-sling-feature-launcher] 01/01: Merge pull request #35 from apache/issues/SLING-11046

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

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-launcher.git

commit 00e52dcdf84ffe2b3265b6078898647da1f91f24
Merge: 32aafd8 0310bb8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Jan 11 16:56:18 2022 +0100

    Merge pull request #35 from apache/issues/SLING-11046
    
    SLING-11046 : Make feature id configurable

 readme.md                                          | 26 +++++++++++++++++-----
 .../feature/launcher/impl/FeatureProcessor.java    |  3 +--
 .../feature/launcher/impl/LauncherConfig.java      | 24 +++++++++++++++++---
 .../apache/sling/feature/launcher/impl/Main.java   | 13 +++++++++++
 4 files changed, 55 insertions(+), 11 deletions(-)

diff --cc src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java
index 32a1faf,fb21db1..22cf777
--- a/src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java
+++ b/src/main/java/org/apache/sling/feature/launcher/impl/FeatureProcessor.java
@@@ -152,10 -152,17 +152,9 @@@ public class FeatureProcessor 
              }
          }
  
-         // TODO make feature id configurable
-         final Feature app = FeatureBuilder.assemble(ArtifactId.fromMvnId("group:assembled:1.0.0"), builderContext, features.toArray(new Feature[0]));
+         final Feature app = FeatureBuilder.assemble(config.getLaunchFeatureId(), builderContext, features.toArray(new Feature[0]));
          loadedFeatures.put(app.getId(), app);
  
 -        // TODO: this sucks
 -        for (Artifact bundle : app.getBundles()) {
 -            if ( bundle.getStartOrder() == 0) {
 -                final int so = bundle.getMetadata().get("start-level") != null ? Integer.parseInt(bundle.getMetadata().get("start-level")) : 1;
 -                bundle.setStartOrder(so);
 -            }
 -        }
 -
          FeatureBuilder.resolveVariables(app, config.getVariables());
  
          return app;