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

pdesai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-devtools.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a0d987  Pre-cache typical init-run classes in JVM shared class cache 
(#288)
7a0d987 is described below

commit 7a0d9873eae09c777c797b0b3207e5151b001bf5
Author: Matt Rutkowski <mrutk...@us.ibm.com>
AuthorDate: Thu Sep 12 19:27:20 2019 -0500

    Pre-cache typical init-run classes in JVM shared class cache (#288)
    
    * Pre-cache typical init-run classes in JVM shared class cache
    
    * Pre-cache typical init-run classes in JVM shared class cache
    
    * Pre-cache typical init-run classes in JVM shared class cache
---
 knative-build/runtimes/java/WhiskSim/.classpath    |  44 +++++++
 .../runtimes/java/WhiskSim/{ => bin}/pom.xml       |   0
 knative-build/runtimes/java/WhiskSim/pom.xml       |  19 ++-
 .../src/main/java/org/apache/openwhisk/App.java    | 128 +++++++++++----------
 .../test/payload/init-test-1.json}                 |   0
 .../java/core/java8/proxy/compileClassCache.sh     |   6 +-
 .../base/tests/{clean_all.sh => README.md}         |  39 ++++---
 .../java8/proxy/profiles/base/tests/build_all.sh   |  21 +---
 .../java8/proxy/profiles/base/tests/clean_all.sh   |   6 +
 .../tests/helloworld/knative-data-init-run.json    |  18 ---
 .../helloworld/knative-data-init-run.json.tmpl     |  18 +++
 .../base/tests/helloworld/knative-data-init.json   |   8 --
 .../tests/helloworld/knative-data-init.json.tmpl   |   8 ++
 .../tests/helloworld/openwhisk-data-init.json.tmpl |   8 ++
 .../tests/helloworld/payload-knative-init-run.http |  25 ----
 .../helloworld/payload-knative-init-run.http.tmpl  |  25 ++++
 .../tests/helloworld/payload-knative-init.http     |  13 ---
 .../helloworld/payload-knative-init.http.tmpl      |  13 +++
 .../tests/helloworld/payload-openwhisk-init.http   |  13 ---
 .../helloworld/payload-openwhisk-init.http.tmpl    |  13 +++
 .../knative-data-init-run.json                     |  20 ----
 .../knative-data-init-run.json.tmpl                |  20 ++++
 .../helloworldwithparams/knative-data-init.json    |   8 --
 .../knative-data-init.json.tmpl                    |   8 ++
 .../helloworldwithparams/openwhisk-data-init.json  |   8 --
 .../openwhisk-data-init.json.tmpl                  |   8 ++
 .../payload-knative-init-run.http                  |  25 ----
 .../payload-knative-init-run.http.tmpl             |  25 ++++
 .../helloworldwithparams/payload-knative-init.http |  13 ---
 .../payload-knative-init.http.tmpl                 |  13 +++
 .../payload-openwhisk-init.http                    |  13 ---
 .../payload-openwhisk-init.http.tmpl               |  13 +++
 .../knative-data-init-run.json                     |  20 ----
 .../knative-data-init-run.json.tmpl                |  20 ++++
 .../knative-data-init.json                         |   9 --
 .../knative-data-init.json.tmpl                    |   9 ++
 .../openwhisk-data-init.json                       |   8 --
 .../openwhisk-data-init.json.tmpl                  |   8 ++
 .../payload-knative-init-run.http                  |  25 ----
 .../payload-knative-init-run.http.tmpl             |  25 ++++
 .../payload-knative-init.http.tmpl                 |  13 +++
 .../payload-openwhisk-init.http                    |  13 ---
 .../payload-openwhisk-init.http.tmpl               |  13 +++
 .../tests/{clean_all.sh => update_payloads.sh}     |  11 +-
 44 files changed, 438 insertions(+), 335 deletions(-)

diff --git a/knative-build/runtimes/java/WhiskSim/.classpath 
b/knative-build/runtimes/java/WhiskSim/.classpath
new file mode 100644
index 0000000..f0257c5
--- /dev/null
+++ b/knative-build/runtimes/java/WhiskSim/.classpath
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" output="target/classes" path="src/main/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" output="target/test-classes" 
path="src/test/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+                       <attribute name="test" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" 
path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" path="target/generated-sources/annotations">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+                       <attribute name="ignore_optional_problems" 
value="true"/>
+                       <attribute name="m2e-apt" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" output="target/test-classes" 
path="target/generated-test-sources/test-annotations">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+                       <attribute name="ignore_optional_problems" 
value="true"/>
+                       <attribute name="m2e-apt" value="true"/>
+                       <attribute name="test" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/knative-build/runtimes/java/WhiskSim/pom.xml 
b/knative-build/runtimes/java/WhiskSim/bin/pom.xml
similarity index 100%
copy from knative-build/runtimes/java/WhiskSim/pom.xml
copy to knative-build/runtimes/java/WhiskSim/bin/pom.xml
diff --git a/knative-build/runtimes/java/WhiskSim/pom.xml 
b/knative-build/runtimes/java/WhiskSim/pom.xml
index 79bf570..a2033b8 100644
--- a/knative-build/runtimes/java/WhiskSim/pom.xml
+++ b/knative-build/runtimes/java/WhiskSim/pom.xml
@@ -31,13 +31,14 @@
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>1.7</maven.compiler.source>
-    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven.compiler.source>1.8</maven.compiler.source>
+    <maven.compiler.target>1.8</maven.compiler.target>
     <!-- skip testCompile -->
     <maven.test.skip>true</maven.test.skip>
   </properties>
 
   <dependencies>
+
     <!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
     <dependency>
       <groupId>commons-cli</groupId>
@@ -45,6 +46,20 @@
       <version>1.4</version>
       <scope>compile</scope>
     </dependency>
+    <!-- https://mvnrepository.com/artifact/org.json/json -->
+    <dependency>
+      <groupId>org.json</groupId>
+      <artifactId>json</artifactId>
+      <version>20190722</version>
+      <scope>compile</scope>
+    </dependency>
+    <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.6</version>
+    </dependency>
+
   </dependencies>
 
   <build>
diff --git 
a/knative-build/runtimes/java/WhiskSim/src/main/java/org/apache/openwhisk/App.java
 
b/knative-build/runtimes/java/WhiskSim/src/main/java/org/apache/openwhisk/App.java
index b4fb88a..38b650e 100644
--- 
a/knative-build/runtimes/java/WhiskSim/src/main/java/org/apache/openwhisk/App.java
+++ 
b/knative-build/runtimes/java/WhiskSim/src/main/java/org/apache/openwhisk/App.java
@@ -18,83 +18,95 @@ package org.apache.openwhisk;
 
 import java.util.*;
 import java.io.*;
-import java.nio.file.Path;
-import java.nio.file.Paths;
 import org.apache.commons.cli.*;
 
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import org.apache.commons.io.FileUtils;
+
 /**
  * WhiskSim
  */
+
+// Formatter: 
https://github.com/redhat-developer/vscode-java/wiki/Formatter-settings
 public class App
 {
-   /**
-    * Open and reads a text file containing a list of "test" (subdirectories) 
to init/run
-    */
-    private List<String> readTestFile(String filename)
-    {
-        System.out.println("readTestFile():" + filename );
-        List<String> records = new ArrayList<String>();
-        try
-        {
-            BufferedReader reader = new BufferedReader(new 
FileReader(filename));
-            String line;
-            while ((line = reader.readLine()) != null)
-            {
-                System.out.println("readTestFile(): line=[" + line + "]" );
-                records.add(line);
-            }
-            reader.close();
-            return records;
-        }
-        catch (Exception e)
-        {
-            System.err.format("Unable to read test file '%s'.", filename);
-            e.printStackTrace();
-            return null;
-        }
+    private JSONObject readJSON(String filename) throws Exception {
+        File file = new File(filename);
+        String content = FileUtils.readFileToString(file, "utf-8");
+
+        // Convert JSON string to JSONObject
+        JSONObject objJSON = new JSONObject(content);
+
+        return (objJSON);
     }
 
     public static void main( String[] args )
     {
-        // create Options object
-        Options options = new Options();
+        System.out.printf("main(String[] args): %s\n", Arrays.toString(args));
 
+        // 
https://commons.apache.org/proper/commons-cli/javadocs/api-release/index.html
+        // https://commons.apache.org/proper/commons-cli/usage.html
+        // 
https://dzone.com/articles/java-command-line-interfaces-part-1-apache-commons
         // Option(String opt, String longOpt, boolean hasArg, String 
description)
-        // add verbose option
-        Option help = new Option( "h", "help", false, "print utility help" );
-        Option verbose = new Option( "v", "verbose", false, "enable verbose 
output" );
-        options.addOption(verbose).addOption(help);
-
-        HelpFormatter formatter = new HelpFormatter();
-        formatter.printHelp("WhiskSim", options);
-
-        // Option testFile   = OptionBuilder.withArgName( "file" )
-        //                         .hasArg()
-        //                         .withDescription(  "use given file for test 
input" )
-        //                         .create( "testFile" );
-        // options.addOption(testFile);
-
-        if(args.length > 0)
-        {
-            System.out.println("main(String[] args):");
-            for (String s : args)
-            {
-                System.out.println(s);
+        try {
+
+            System.out.println("Working Directory=[" +
+              System.getProperty("user.dir") + "]");
+
+            // create Options object
+            Options options = new Options();
+
+            // add "Boolean"" options
+            Option help = new Option( "h", "help", false, "print utility help" 
);
+            Option verbose = new Option( "v", "verbose", false, "enable 
verbose output" );
+
+            // Add "Argument" options
+            Option payload = Option.builder("p")
+            .hasArg()
+            .desc("Payload file to use in the HTTP request body")
+            .required(true)
+            .longOpt("payload")
+            .build();
+
+            // Add all the options
+            options.addOption(verbose).addOption(help).addOption(payload);
+
+            CommandLineParser parser = new DefaultParser();
+            CommandLine cmd = parser.parse( options, args);
+
+            if(cmd.hasOption("h")) {
+                // print the date and time
+                HelpFormatter formatter = new HelpFormatter();
+                formatter.printHelp("WhiskSim", options);
+                return;
             }
 
-            App app = new App();
+            // get p option value
+            String payloadFile = cmd.getOptionValue("p");
 
-            Path p = Paths.get(args[0]);
-            String file = p.getFileName().toString();
+            if(payloadFile != null) {
+                // print default date
+                System.out.printf("Payload file: %s\n", payloadFile);
 
-            List testList = app.readTestFile(args[0]);
-        }
-        else
-        {
-            System.out.println("No arguments passed to main().");
+                App app = new App();
+                app.readJSON(payloadFile);
+            }
+            else {
+                // print date for country specified by countryCode
+                System.err.println("Payload file missing!");
+            }
+
+        } catch (Exception e) {
+            System.err.println("Unable to create application Options.");
         }
 
-        System.out.println( "Hello World!" );
+        System.out.println( "-=> Request sent <=-" );
     }
 
 }
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-init.json
 b/knative-build/runtimes/java/WhiskSim/test/payload/init-test-1.json
similarity index 100%
rename from 
knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-init.json
rename to knative-build/runtimes/java/WhiskSim/test/payload/init-test-1.json
diff --git a/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh 
b/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh
index 2bebb5d..503adfc 100755
--- a/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh
+++ b/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh
@@ -38,8 +38,12 @@ JAVA_STANDARD_OPTIONS="-Dfile.encoding=UTF-8"
 # #### Construct Class Cache with HTTP Server classes by starting the server 
####
 JAVA_EXTENDED_OPTIONS="-Xshareclasses:cacheDir=/javaSharedCache/ -Xquickstart"
 JAVA_VERBOSE_OPTIONS="-verbose:class -verbose:sizes"
+JAVA_JVM_KILL_DELAY=5s
 
+echo "Creating shared class cache with Proxy and 'base' profile libraries..."
 java $JAVA_VERBOSE_OPTIONS $JAVA_STANDARD_OPTIONS $JAVA_EXTENDED_OPTIONS 
"-jar" "/javaAction/build/libs/javaAction-all.jar" &
 HTTP_PID=$!
-sleep 2
+echo "Sleeping (${JAVA_JVM_KILL_DELAY}) allowing cache to be populated before 
killing JVM process (${HTTP_PID})..."
+sleep $JAVA_JVM_KILL_DELAY
+echo "Killing JVM process (${HTTP_PID})..."
 kill $HTTP_PID
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/README.md
old mode 100755
new mode 100644
similarity index 56%
copy from 
knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
copy to 
knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/README.md
index d703ddb..9ca590e
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
+++ b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/README.md
@@ -1,4 +1,4 @@
-#!/bin/bash
+<!--
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -15,16 +15,27 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-set +x
-
-for f in *; do
-    # if the file is a directory
-    if [ -d ${f} ]; then
-        echo "Cleaning up build artifacts for test: '${f}'"
-        cd $f
-        rm Hello.class
-        rm Hello.jar
-        rm hello.jar.base64
-        cd ..
-    fi
-done
+-->
+
+# OpenWhisk Runtimes for Knative
+
+[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
+
+This repository contains tests that comprise the sample Java functions that 
are used to prepare the Java runtime
+shared class cache.
+
+## Test Manual build and execution
+
+### Building
+
+TBD
+
+### Executing
+
+#### OpenWhisk runtime build
+
+```
+curl -d "@openwhisk-data-init.json" -H "Content-Type: application/json" -X 
POST http://localhost:8080/init
+
+curl -d "@openwhisk-data-run.json" -H "Content-Type: application/json" -X POST 
http://localhost:8080/run
+```
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/build_all.sh 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/build_all.sh
index a412917..ba2cdd5 100755
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/build_all.sh
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/build_all.sh
@@ -17,30 +17,17 @@
 #
 set +x
 
-# if [ $1 ]
-# then
-#     while read test; do
-#         echo "building test (directory):" $test
-#         cd $test
-#         ls -al *.jar
-#         javac -verbose -classpath gson-2.8.5.jar Hello.java
-#         jar cvf hello.jar *.class
-#         base64 hello.jar > hello.jar.base64
-#         cd ..
-#     done < $1
-# else
-#     echo "ERROR: Argument not present: Test listing (.txt)"
-#     exit 1
-# fi
-
 for f in *; do
     # if the file is a directory
     if [ -d ${f} ]; then
-        echo "Packaging Test: ${f}"
+        echo "Compiling Test: ${f}"
         cd $f
         ls -al *.jar
+        echo "Compiling Class..."
         javac -verbose -classpath ../../libs/gson-2.8.5.jar Hello.java
+        echo "Creating JAR..."
         jar cvf hello.jar *.class
+        echo "Base64 encoding JAR..."
         base64 hello.jar > hello.jar.base64
         cd ..
     fi
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
index d703ddb..f38bed3 100755
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
@@ -25,6 +25,12 @@ for f in *; do
         rm Hello.class
         rm Hello.jar
         rm hello.jar.base64
+        rm openwhisk-data-init.json
+        rm knative-data-init.json
+        rm knative-data-init-run.json
+        rm payload-knative-init.http
+        rm payload-knative-init-run.http
+        rm payload-openwhisk-init.http
         cd ..
     fi
 done
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json
deleted file mode 100644
index 1e5aa38..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  "init": {
-    "name": "java-helloworld",
-    "main": "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGlo
 [...]
-  },
-  "activation": {
-    "namespace": "default",
-    "action_name": "java-helloworld",
-    "api_host": "",
-    "api_key": "",
-    "activation_id": "",
-    "deadline": "4102498800000"
-  },
-  "value": {
-  }
-}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json.tmpl
new file mode 100644
index 0000000..6f71e4d
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json.tmpl
@@ -0,0 +1,18 @@
+{
+  "init": {
+    "name": "java-helloworld",
+    "main": "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  },
+  "activation": {
+    "namespace": "default",
+    "action_name": "java-helloworld",
+    "api_host": "",
+    "api_key": "",
+    "activation_id": "",
+    "deadline": "4102498800000"
+  },
+  "value": {
+  }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json
deleted file mode 100644
index 1b4d3f4..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "init": {
-    "name": "java-helloworld",
-    "main": "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGlo
 [...]
-  }
-}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json.tmpl
new file mode 100644
index 0000000..a5ba710
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json.tmpl
@@ -0,0 +1,8 @@
+{
+  "init": {
+    "name": "java-helloworld",
+    "main": "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-init.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-init.json.tmpl
new file mode 100644
index 0000000..b33b030
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-init.json.tmpl
@@ -0,0 +1,8 @@
+{
+    "value": {
+        "name" : "java-helloworld",
+        "main" : "Hello",
+        "binary": true,
+        "code": "BASE64_ENCODED_JAR"
+    }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http
deleted file mode 100644
index 0e333ac..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http
+++ /dev/null
@@ -1,25 +0,0 @@
-POST http://localhost:8080/ HTTP/1.1
-content-type: application/json
-
-{
-  "init": {
-    "name": "java-helloworld",
-    "main": "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGlo
 [...]
-  },
-  "activation": {
-    "namespace": "default",
-    "action_name": "java-helloworld",
-    "api_host": "",
-    "api_key": "",
-    "activation_id": "",
-    "deadline": "4102498800000"
-  },
-  "value": {
-    "name": "Joe",
-    "place": "TX"
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http.tmpl
new file mode 100644
index 0000000..69c83bc
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http.tmpl
@@ -0,0 +1,25 @@
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+  "init": {
+    "name": "java-helloworld",
+    "main": "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  },
+  "activation": {
+    "namespace": "default",
+    "action_name": "java-helloworld",
+    "api_host": "",
+    "api_key": "",
+    "activation_id": "",
+    "deadline": "4102498800000"
+  },
+  "value": {
+    "name": "Joe",
+    "place": "TX"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http
deleted file mode 100644
index c30856a..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http
+++ /dev/null
@@ -1,13 +0,0 @@
-POST http://localhost:8080/ HTTP/1.1
-content-type: application/json
-
-{
-  "init": {
-    "name": "java-helloworld",
-    "main": "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGlo
 [...]
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http.tmpl
new file mode 100644
index 0000000..ea81191
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http.tmpl
@@ -0,0 +1,13 @@
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+  "init": {
+    "name": "java-helloworld",
+    "main": "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http
deleted file mode 100644
index 59bf732..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http
+++ /dev/null
@@ -1,13 +0,0 @@
-POST http://localhost:8080/init HTTP/1.1
-content-type: application/json
-
-{
-  "value": {
-    "name" : "java-helloworld",
-    "main" : "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGlo
 [...]
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http.tmpl
new file mode 100644
index 0000000..e396d2e
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http.tmpl
@@ -0,0 +1,13 @@
+POST http://localhost:8080/init HTTP/1.1
+content-type: application/json
+
+{
+  "value": {
+    "name" : "java-helloworld",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json
deleted file mode 100644
index 393ac8f..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-    "init": {
-        "name" : "java-helloworld-with-params",
-        "main" : "Hello",
-        "binary": true,
-        "code" : 
"UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAij
 [...]
-    },
-    "activation": {
-        "namespace": "default",
-        "action_name": "java-helloworld-with-params",
-        "api_host": "",
-        "api_key": "",
-        "activation_id": "",
-        "deadline": "4102498800000"
-    },
-    "value": {
-        "name" : "Joe",
-        "place" : "TX"
-    }
-}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json.tmpl
new file mode 100644
index 0000000..da48727
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json.tmpl
@@ -0,0 +1,20 @@
+{
+    "init": {
+        "name" : "java-helloworld-with-params",
+        "main" : "Hello",
+        "binary": true,
+        "code" : "BASE64_ENCODED_JAR"
+    },
+    "activation": {
+        "namespace": "default",
+        "action_name": "java-helloworld-with-params",
+        "api_host": "",
+        "api_key": "",
+        "activation_id": "",
+        "deadline": "4102498800000"
+    },
+    "value": {
+        "name" : "Joe",
+        "place" : "TX"
+    }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json
deleted file mode 100644
index 879cdd4..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "init": {
-        "name" : "java-helloworld-with-params",
-        "main" : "Hello",
-        "binary": true,
-        "code" : 
"UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAij
 [...]
-    }
-}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json.tmpl
new file mode 100644
index 0000000..82a68af
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json.tmpl
@@ -0,0 +1,8 @@
+{
+    "init": {
+        "name" : "java-helloworld-with-params",
+        "main" : "Hello",
+        "binary": true,
+        "code" : "BASE64_ENCODED_JAR"
+    }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json
deleted file mode 100644
index 8b9fce3..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "value": {
-    "name" : "java-helloworld-with-params",
-    "main" : "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7
 [...]
-  }
-}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json.tmpl
new file mode 100644
index 0000000..df9cc98
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json.tmpl
@@ -0,0 +1,8 @@
+{
+  "value": {
+    "name" : "java-helloworld-with-params",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http
deleted file mode 100644
index 42ab87c..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http
+++ /dev/null
@@ -1,25 +0,0 @@
-POST http://localhost:8080/ HTTP/1.1
-content-type: application/json
-
-{
-  "init": {
-    "name" : "java-helloworld-with-params",
-    "main" : "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7
 [...]
-  },
-  "activation": {
-    "namespace": "default",
-    "action_name": "java-helloworld-with-params",
-    "api_host": "",
-    "api_key": "",
-    "activation_id": "",
-    "deadline": "4102498800000"
-  },
-  "value": {
-    "name" : "Joe",
-    "place" : "TX"
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http.tmpl
new file mode 100644
index 0000000..95e9440
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http.tmpl
@@ -0,0 +1,25 @@
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+  "init": {
+    "name" : "java-helloworld-with-params",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  },
+  "activation": {
+    "namespace": "default",
+    "action_name": "java-helloworld-with-params",
+    "api_host": "",
+    "api_key": "",
+    "activation_id": "",
+    "deadline": "4102498800000"
+  },
+  "value": {
+    "name" : "Joe",
+    "place" : "TX"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http
deleted file mode 100644
index 35ea66b..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http
+++ /dev/null
@@ -1,13 +0,0 @@
-POST http://localhost:8080/ HTTP/1.1
-content-type: application/json
-
-{
-  "init": {
-    "name" : "java-helloworld-with-params",
-    "main" : "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7
 [...]
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http.tmpl
new file mode 100644
index 0000000..a408e33
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http.tmpl
@@ -0,0 +1,13 @@
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+  "init": {
+    "name" : "java-helloworld-with-params",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http
deleted file mode 100644
index ba8f5bf..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http
+++ /dev/null
@@ -1,13 +0,0 @@
-POST http://localhost:8080/init HTTP/1.1
-content-type: application/json
-
-{
-  "value": {
-    "name" : "java-helloworld-with-params",
-    "main" : "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIACZ+p04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAmfqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAAl+p04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7
 [...]
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http.tmpl
new file mode 100644
index 0000000..cb87eb2
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http.tmpl
@@ -0,0 +1,13 @@
+POST http://localhost:8080/init HTTP/1.1
+content-type: application/json
+
+{
+  "value": {
+    "name" : "java-helloworld-with-params",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json
deleted file mode 100644
index 951bab6..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-    "init": {
-        "name" : "java-helloworld-with-params-from-env",
-        "main" : "Hello",
-        "binary": true,
-        "code" : 
"UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPX
 [...]
-    },
-    "activation": {
-        "namespace": "default",
-        "action_name": "java-helloworld-with-params-from-env",
-        "api_host": "",
-        "api_key": "",
-        "activation_id": "",
-        "deadline": "4102498800000"
-    },
-    "value": {
-        "name" : "Jess",
-        "place" : "OK"
-    }
-}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json.tmpl
new file mode 100644
index 0000000..ab617b1
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json.tmpl
@@ -0,0 +1,20 @@
+{
+    "init": {
+        "name" : "java-helloworld-with-params-from-env",
+        "main" : "Hello",
+        "binary": true,
+        "code" : "BASE64_ENCODED_JAR"
+    },
+    "activation": {
+        "namespace": "default",
+        "action_name": "java-helloworld-with-params-from-env",
+        "api_host": "",
+        "api_key": "",
+        "activation_id": "",
+        "deadline": "4102498800000"
+    },
+    "value": {
+        "name" : "Jess",
+        "place" : "OK"
+    }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json
deleted file mode 100644
index 26ad4c6..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-    "init": {
-        "name" : "java-helloworld-with-params-from-env",
-        "main" : "Hello",
-        "binary": true,
-        "code" : 
"UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPX
 [...]
-    }
-}
-
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json.tmpl
new file mode 100644
index 0000000..176e435
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json.tmpl
@@ -0,0 +1,9 @@
+{
+    "init": {
+        "name" : "java-helloworld-with-params-from-env",
+        "main" : "Hello",
+        "binary": true,
+        "code" : "BASE64_ENCODED_JAR"
+    }
+}
+
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json
deleted file mode 100644
index d2c8777..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{ 
-    "value": { 
-        "name" : "java-helloworld-with-params-from-env",
-        "main" : "Hello", 
-        "binary": true, 
-        "code" : 
"UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPX
 [...]
-    }
-}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json.tmpl
new file mode 100644
index 0000000..41ab2cb
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json.tmpl
@@ -0,0 +1,8 @@
+{
+    "value": {
+        "name" : "java-helloworld-with-params-from-env",
+        "main" : "Hello",
+        "binary": true,
+        "code" : "BASE64_ENCODED_JAR"
+    }
+}
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http
deleted file mode 100644
index 407dfef..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http
+++ /dev/null
@@ -1,25 +0,0 @@
-POST http://localhost:8080/ HTTP/1.1
-content-type: application/json
-
-{
-  "init": {
-    "name" : "java-helloworld-with-params-from-env",
-    "main" : "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPXy+2W
 [...]
-  },
-  "activation": {
-    "namespace": "default",
-    "action_name": "java-helloworld-with-params-from-env",
-    "api_host": "",
-    "api_key": "",
-    "activation_id": "",
-    "deadline": "4102498800000"
-  },
-  "value": {
-    "name" : "Jess",
-    "place" : "OK"
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http.tmpl
new file mode 100644
index 0000000..2baccaa
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http.tmpl
@@ -0,0 +1,25 @@
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+  "init": {
+    "name" : "java-helloworld-with-params-from-env",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  },
+  "activation": {
+    "namespace": "default",
+    "action_name": "java-helloworld-with-params-from-env",
+    "api_host": "",
+    "api_key": "",
+    "activation_id": "",
+    "deadline": "4102498800000"
+  },
+  "value": {
+    "name" : "Jess",
+    "place" : "OK"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init.http.tmpl
new file mode 100644
index 0000000..2e5faa2
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init.http.tmpl
@@ -0,0 +1,13 @@
+POST http://localhost:8080/ HTTP/1.1
+content-type: application/json
+
+{
+  "init": {
+    "name" : "java-helloworld-with-params-from-env",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http
deleted file mode 100644
index 9d02b56..0000000
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http
+++ /dev/null
@@ -1,13 +0,0 @@
-POST http://localhost:8080/init HTTP/1.1
-content-type: application/json
-
-{
-  "value": {
-    "name" : "java-helloworld-with-params-from-env",
-    "main" : "Hello",
-    "binary": true,
-    "code" : 
"UEsDBBQACAgIAGSSp04AAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICABkkqdOAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBAAAAUEsDBBQACAgIAKSRp04AAAAAAAAAAAAAAAAKAAAASGVsbG8uamF2YW1TS1PbMBC++1dsfQqQOp0ey3BwgQxuGaeDQxmOir1R1NqSKsmYDMN/764f4Jk2hyRar77XrlenEZzCrSpRe6wgGAgHhNSKkn4Ksw+dcAhr0+pKBGU0LNJifQJ0RAdGIxgHjXHIKKXRwaldG6hWD4ggpENsUAefABSIPXy+2W
 [...]
-  }
-}
-
-###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http.tmpl
 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http.tmpl
new file mode 100644
index 0000000..dda38f3
--- /dev/null
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http.tmpl
@@ -0,0 +1,13 @@
+POST http://localhost:8080/init HTTP/1.1
+content-type: application/json
+
+{
+  "value": {
+    "name" : "java-helloworld-with-params-from-env",
+    "main" : "Hello",
+    "binary": true,
+    "code" : "BASE64_ENCODED_JAR"
+  }
+}
+
+###
diff --git 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/update_payloads.sh
similarity index 52%
copy from 
knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
copy to 
knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/update_payloads.sh
index d703ddb..5db373a 100755
--- 
a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
+++ 
b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/update_payloads.sh
@@ -20,11 +20,14 @@ set +x
 for f in *; do
     # if the file is a directory
     if [ -d ${f} ]; then
-        echo "Cleaning up build artifacts for test: '${f}'"
+        echo "Updating 'code' payload with base64 encoded archive data: ${f}"
         cd $f
-        rm Hello.class
-        rm Hello.jar
-        rm hello.jar.base64
+            sed "s#BASE64_ENCODED_JAR#$(cat hello.jar.base64)#" 
openwhisk-data-init.json.tmpl > openwhisk-data-init.json
+            sed "s#BASE64_ENCODED_JAR#$(cat hello.jar.base64)#" 
knative-data-init.json.tmpl > knative-data-init.json
+            sed "s#BASE64_ENCODED_JAR#$(cat hello.jar.base64)#" 
knative-data-init-run.json.tmpl > native-data-init-run.json
+            sed "s#BASE64_ENCODED_JAR#$(cat hello.jar.base64)#" 
payload-knative-init.http.tmpl > payload-knative-init.http
+            sed "s#BASE64_ENCODED_JAR#$(cat hello.jar.base64)#" 
payload-knative-init-run.http.tmpl > payload-knative-init-run.http
+            sed "s#BASE64_ENCODED_JAR#$(cat hello.jar.base64)#" 
payload-openwhisk-init.http.tmpl > payload-openwhisk-init.http
         cd ..
     fi
 done

Reply via email to