You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2018/06/27 12:21:30 UTC

[sling-org-apache-sling-feature-launcher] branch master updated: Add a cache config option

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1b7262a  Add a cache config option
1b7262a is described below

commit 1b7262a4c112a4d5465aa1afd29f5fff0ec30140
Author: Karl Pauls <ka...@gmail.com>
AuthorDate: Wed Jun 27 14:21:25 2018 +0200

    Add a cache config option
---
 src/main/java/org/apache/sling/feature/launcher/impl/Main.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/java/org/apache/sling/feature/launcher/impl/Main.java b/src/main/java/org/apache/sling/feature/launcher/impl/Main.java
index 8b990c5..1b7b35e 100644
--- a/src/main/java/org/apache/sling/feature/launcher/impl/Main.java
+++ b/src/main/java/org/apache/sling/feature/launcher/impl/Main.java
@@ -83,12 +83,14 @@ public class Main {
         debugOption.setArgs(0);
         final Option installerOption = new Option("I", false, "Use OSGi installer for additional artifacts.");
         installerOption.setArgs(0);
+        final Option cacheOption = new Option("c", true, "Set cache dir");
         options.addOption(repoOption);
         options.addOption(appOption);
         options.addOption(modelOption);
         options.addOption(fwkProperties);
         options.addOption(debugOption);
         options.addOption(installerOption);
+        options.addOption(cacheOption);
 
         final CommandLineParser clp = new BasicParser();
         try {
@@ -118,6 +120,10 @@ public class Main {
             if ( cl.hasOption(appOption.getOpt()) ) {
                 config.setApplicationFile(cl.getOptionValue(appOption.getOpt()));
             }
+
+            if (cl.hasOption(cacheOption.getOpt())) {
+                config.setCacheDirectory(new File(cl.getOptionValue(cacheOption.getOpt())));
+            }
         } catch ( final ParseException pe) {
             Main.LOG().error("Unable to parse command line: {}", pe.getMessage(), pe);
             System.exit(1);