You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/12/11 13:03:54 UTC

[GitHub] markusthoemmes closed pull request #3059: Modify the unix script

markusthoemmes closed pull request #3059: Modify the unix script
URL: https://github.com/apache/incubator-openwhisk/pull/3059
 
 
   

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/build.gradle b/build.gradle
index 300a1ce982..135c13b792 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,4 +10,30 @@ buildscript {
 subprojects {
     apply plugin: 'scalafmt'
     scalafmt.configFilePath = gradle.scalafmt.config
+
+    afterEvaluate {
+        if (project.plugins.hasPlugin('application')
+                && project.plugins.hasPlugin('scala')) {
+            startScripts {
+                doLast {
+                    unixScript.text = configureUnixClasspath(unixScript)
+                }
+            }
+        }
+    }
+}
+
+def configureUnixClasspath(File script) {
+    script
+        .readLines()
+        .collect { line ->
+            // Looking for the line that starts with CLASSPATH=
+            line = line.replaceAll(~/^CLASSPATH=.*$/) { original ->
+
+                // Get original line and append it
+                // with the configuration directory.
+                original += ':$APP_HOME/ext-lib/*:$APP_HOME/config'
+            }
+        }
+        .join('\n')
 }
diff --git a/docs/spi.md b/docs/spi.md
index f4a614d19c..15029d1cee 100644
--- a/docs/spi.md
+++ b/docs/spi.md
@@ -62,3 +62,15 @@ Since SPI implementations are loaded from the classpath, and a specific implemen
 * Include all implementations, and only use the specified implementations.
 * Include some combination of defaults and alternative implementations, and use the specified implementations for the alternatives, and default implementations for the rest.
 
+## Including the implementation
+
+Base openwhisk docker images provide 2 extension points in the classpath for including the implementation.
+
+### Application Jars
+
+The application jars can be added to `$APP_HOME/ext-lib` for e.g. in `openwhisk/controller` image the implementation jars can be added to `/controller/ext-lib` and for `openwhisk/invoker` they can be added to `/invoker/ext-lib`.
+
+### Application Configuration
+
+The configuration files can be added to `$APP_HOME/config`.
+


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services