Display JVM options and shareclasses cache info (#286)

* Display JVM options and shareclasses cache info

* Display JVM options and shareclasses cache info

* Add WhiskSim skeleton and build files

* add license headers to new files

* tweak JAR file name output by Maven plugins

* tweak JAR file name output by Maven plugins

* automate build and cleanup of base tests
diff --git a/.gitignore b/.gitignore
index 17015e6..8d73a87 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,7 +37,7 @@
 *.class
 *.base64
 out/
-wsksim/
+target/
 
 # Swift
 Packages/
diff --git a/knative-build/runtimes/java/WhiskSim/pom.xml b/knative-build/runtimes/java/WhiskSim/pom.xml
new file mode 100644
index 0000000..79bf570
--- /dev/null
+++ b/knative-build/runtimes/java/WhiskSim/pom.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.openwhisk</groupId>
+  <artifactId>WhiskSim</artifactId>
+  <version>latest</version>
+
+  <name>WhiskSim</name>
+  <url>http://openwhisk.apache.org/</url>
+
+  <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>
+    <!-- skip testCompile -->
+    <maven.test.skip>true</maven.test.skip>
+  </properties>
+
+  <dependencies>
+    <!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.4</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <finalName>WhiskSim-NoDeps</finalName>
+    <plugins>
+      <!-- build the JAR using latest -->
+      <!-- NOTE: if we use default JAR plugin we instead get version 2.4 'maven-jar-plugin:2.4:jar' -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>3.0.2</version>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>org.apache.openwhisk.App</mainClass>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      <!-- force dependencies to be packaged in JAR file -->
+      <plugin>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <executions>
+            <execution>
+              <phase>package</phase>
+              <goals>
+                <goal>single</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+            <finalName>WhiskSim</finalName>
+            <!-- https://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers -->
+            <appendAssemblyId>false</appendAssemblyId>
+            <descriptorRefs>
+              <descriptorRef>jar-with-dependencies</descriptorRef>
+            </descriptorRefs>
+            <archive>
+                <manifest>
+                    <mainClass>org.apache.openwhisk.App</mainClass>
+                </manifest>
+            </archive>
+          </configuration>
+        </plugin>
+
+      <!-- skip the 'testResource' phase -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>3.0.2</version>
+        <executions>
+            <execution>
+                <id>default-testResources</id>
+                <phase>none</phase>
+            </execution>
+        </executions>
+      </plugin>
+      <!-- skip the (JUnit) 'test' phase -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>3.0.2</version>
+        <executions>
+            <execution>
+                <id>default-test</id>
+                <phase>none</phase>
+            </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
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
new file mode 100644
index 0000000..b4fb88a
--- /dev/null
+++ b/knative-build/runtimes/java/WhiskSim/src/main/java/org/apache/openwhisk/App.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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.*;
+
+/**
+ * WhiskSim
+ */
+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;
+        }
+    }
+
+    public static void main( String[] args )
+    {
+        // create Options object
+        Options options = new Options();
+
+        // 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);
+            }
+
+            App app = new App();
+
+            Path p = Paths.get(args[0]);
+            String file = p.getFileName().toString();
+
+            List testList = app.readTestFile(args[0]);
+        }
+        else
+        {
+            System.out.println("No arguments passed to main().");
+        }
+
+        System.out.println( "Hello World!" );
+    }
+
+}
diff --git a/knative-build/runtimes/java/core/java8/Dockerfile b/knative-build/runtimes/java/core/java8/Dockerfile
index 3426869..be41f27 100644
--- a/knative-build/runtimes/java/core/java8/Dockerfile
+++ b/knative-build/runtimes/java/core/java8/Dockerfile
@@ -15,7 +15,8 @@
 # limitations under the License.
 #
 
-FROM adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jdk8u181-b13_openj9-0.9.0
+# Use AdoptOpenJDK's JDK8, OpenJ9 Critical Patch Update (CPU) release version 0.15.1
+FROM adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jdk8u222-b10_openj9-0.15.1
 
 RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update \
 	&& apt-get install -y --no-install-recommends locales \
@@ -26,8 +27,8 @@
 	LANGUAGE="en_US:en" \
 	LC_ALL="en_US.UTF-8" \
 	VERSION=8 \
-	UPDATE=162 \
-	BUILD=12
+	UPDATE=222 \
+	BUILD=10
 
 ADD proxy /javaAction
 
diff --git a/knative-build/runtimes/java/core/java8/proxy/buildProfileClasses.sh b/knative-build/runtimes/java/core/java8/proxy/buildProfileClasses.sh
new file mode 100755
index 0000000..a251888
--- /dev/null
+++ b/knative-build/runtimes/java/core/java8/proxy/buildProfileClasses.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+set -x
+
+cd profiles/base/tests
+# Clean out previous build artifacts
+ ./clean_all.sh
+
+ # Create new build artifacts
+ ./build_all.sh
+
+ cd ../../..
diff --git a/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh b/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh
index 79272c6..2bebb5d 100755
--- a/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh
+++ b/knative-build/runtimes/java/core/java8/proxy/compileClassCache.sh
@@ -15,8 +15,31 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+set -x
+
+# Standard Options:
+# ================
+# -Dfile.encoding=UTF-8:
+#    Sets the encoding Java will use to read/write files by default.
+#
+# JVM Options used:
+#
+# Non-Standard Options:
+# ====================
+# -Xquickstart:
+#    The effect is faster compilation times that improve startup time, but longer running applications might run slower. When the AOT compiler is active (both shared classes and AOT compilation enabled), -Xquickstart causes all methods to be AOT compiled. The AOT compilation improves the startup time of subsequent runs, but might reduce performance for longer running applications. -Xquickstart can degrade performance if it is used with long-running applications that contain hot methods. The implementation of -Xquickstart is subject to change in future releases. By default, -Xquickstart is disabled..
+#    Another way to specify a behavior identical to -Xquickstart is to use the -client option. These two options can be used interchangeably on the command line.
+# --Xshareclasses:<suboptions>:
+#    Enables class sharing. This option can take a number of suboptions, some of which are cache utilities.
+#    - cacheDir=<directory>: Sets the directory in which cache data is read and written.
 #### Construct Class Cache with HTTP Server classes by starting the server ####
-java "-Xshareclasses:cacheDir=/javaSharedCache/" "-Xquickstart" "-jar" "/javaAction/build/libs/javaAction-all.jar" &
+
+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 $JAVA_VERBOSE_OPTIONS $JAVA_STANDARD_OPTIONS $JAVA_EXTENDED_OPTIONS "-jar" "/javaAction/build/libs/javaAction-all.jar" &
 HTTP_PID=$!
 sleep 2
 kill $HTTP_PID
diff --git a/knative-build/runtimes/java/core/java8/proxy/profiles/base/libs/gson-2.8.5.jar b/knative-build/runtimes/java/core/java8/proxy/profiles/base/libs/gson-2.8.5.jar
new file mode 100644
index 0000000..0d5baf3
--- /dev/null
+++ b/knative-build/runtimes/java/core/java8/proxy/profiles/base/libs/gson-2.8.5.jar
Binary files differ
diff --git a/knative-build/runtimes/java/core/java8/proxy/profiles/base/profile.properties b/knative-build/runtimes/java/core/java8/proxy/profiles/base/profile.properties
deleted file mode 100644
index b7a7e77..0000000
--- a/knative-build/runtimes/java/core/java8/proxy/profiles/base/profile.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-compile.gson=com.google.code.gson:gson:2.6.2
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
new file mode 100755
index 0000000..a412917
--- /dev/null
+++ b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/build_all.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+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}"
+        cd $f
+        ls -al *.jar
+        javac -verbose -classpath ../../libs/gson-2.8.5.jar Hello.java
+        jar cvf hello.jar *.class
+        base64 hello.jar > hello.jar.base64
+        cd ..
+    fi
+done
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
new file mode 100755
index 0000000..d703ddb
--- /dev/null
+++ b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/clean_all.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/Hello.java b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/Hello.java
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/Hello.java
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/Hello.java
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/README.md b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/README.md
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/README.md
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/README.md
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/build-without-code.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/build-without-code.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/build-without-code.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/build-without-code.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/build.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/build.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/build.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/build.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/knative-data-init-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/knative-data-init-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/knative-data-init.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/knative-data-init.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-init.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/knative-data-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/knative-data-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/knative-data-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/openwhisk-data-init.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-init.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/openwhisk-data-init.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-init.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/openwhisk-data-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/openwhisk-data-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/openwhisk-data-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/payload-knative-init-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/payload-knative-init-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/payload-knative-init.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/payload-knative-init.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-init.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/payload-knative-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/payload-knative-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-knative-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/payload-openwhisk-init.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/payload-openwhisk-init.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-init.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/payload-openwhisk-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/payload-openwhisk-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/payload-openwhisk-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/service.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/service.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworld/service.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworld/service.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/Hello.java
similarity index 97%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/Hello.java
index e10a8f8..5ac9542 100644
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java
+++ b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/Hello.java
@@ -19,6 +19,7 @@
 public class Hello {
   public static JsonObject main(JsonObject args) {
     String name = "stranger";
+    String place = "somewhere";
     if (args.has("name"))
       name = args.getAsJsonPrimitive("name").getAsString();
     if (args.has("place"))
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/README.md b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/README.md
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/README.md
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/README.md
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/build-without-code.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/build-without-code.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/build-without-code.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/build-without-code.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/build.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/build.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/build.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/build.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-init.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-init.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/knative-data-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/knative-data-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-init.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-init.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-init.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/openwhisk-data-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/openwhisk-data-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-init.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-init.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-knative-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-knative-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-init.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-init.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-init.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/payload-openwhisk-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/payload-openwhisk-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/service.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/service.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparams/service.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparams/service.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/Hello.java b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/Hello.java
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/Hello.java
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/Hello.java
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/README.md b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/README.md
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/README.md
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/README.md
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/build-without-code.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/build-without-code.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/build-without-code.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/build-without-code.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/build.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/build.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/build.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/build.yaml.tmpl
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-init.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-init.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/knative-data-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/knative-data-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-init.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-init.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-init.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-run.json b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-run.json
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/openwhisk-data-run.json
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/openwhisk-data-run.json
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-knative-init-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-knative-init-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-knative-init-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-init.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-init.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-init.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-run.http b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-run.http
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/payload-openwhisk-run.http
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/payload-openwhisk-run.http
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/service.yaml.tmpl b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/service.yaml.tmpl
similarity index 100%
rename from knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/service.yaml.tmpl
rename to knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/helloworldwithparamsfromenv/service.yaml.tmpl
diff --git a/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/test-list-all.txt b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/test-list-all.txt
new file mode 100644
index 0000000..ea8521b
--- /dev/null
+++ b/knative-build/runtimes/java/core/java8/proxy/profiles/base/tests/test-list-all.txt
@@ -0,0 +1,3 @@
+helloworld
+helloworldwithparams
+helloworldwithparamsfromenv
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/hello.jar b/knative-build/runtimes/java/tests/knative/helloworld/hello.jar
deleted file mode 100644
index b05753f..0000000
--- a/knative-build/runtimes/java/tests/knative/helloworld/hello.jar
+++ /dev/null
Binary files differ
diff --git a/knative-build/runtimes/java/tests/knative/helloworld/hello.jar.base64 b/knative-build/runtimes/java/tests/knative/helloworld/hello.jar.base64
deleted file mode 100644
index 186a4ad..0000000
--- a/knative-build/runtimes/java/tests/knative/helloworld/hello.jar.base64
+++ /dev/null
@@ -1 +0,0 @@
-UEsDBBQACAgIABljwUoAAAAAAAAAAAAAAAAJAAQATUVUQS1JTkYv/soAAAMAUEsHCAAAAAACAAAAAAAAAFBLAwQUAAgICAAZY8FKAAAAAAAAAAAAAAAAFAAAAE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgAAAAAAAAAAAAAAAAsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGloY1QmHbC71kh5CtNw4IuWeRIwmzHS+Ur0ZBT8ZvRM/nnVwgvJCwVe/0o8B2o8j1pe0Oo9B+yeZ171D2k3bjPJBQ6iai/2FPDFJODesEoxuN4r587ikN44X0/Wj9UBwJE5cwR9CHSSxCV8bcQCgCacLGXRP3cF/DhsmT2CQsnq3JBG4sZeKFLmFB8do+09ndJOat3ZHnO4q6kOoum3iIRwSqmXiMTRNPsEXIpxih/K96wl0+TchDfC+GhPl65zTUbrwjWK5Mng5Ve/uxF3iJd8SH3piWPHWOf4t4lNVzEwjFVGrS1ly98b8In1sMBjJ0CGtTezhjXlyoJ9GEuigcZz+OBjJOPhFWphBNoT5ADRf5E1ZPBqTumu08r6rsiX2+eQz6ygGhwraQbmYwgwVc/pP6ETlk2e9YmU7Tyo6R+4xSGuTHKHROoL09hr7XsmZOYHBYtMwxSqv8WhfYjDE7Rrn1JeVVGousgpQzD5PjCv8mS9CxzapXGNFBP1HROI9wNa269htQSwcIevrqgf8BAACRAwAAUEsBAhQAFAAICAgAGWPBSgAAAAACAAAAAAAAAAkABAAAAAAAAAAAAAAAAAAAAE1FVEEtSU5GL/7KAABQSwECFAAUAAgICAAZY8FKYsBBCkMAAABEAAAAFAAAAAAAAAAAAAAAAAA9AAAATUVUQS1JTkYvTUFOSUZFU1QuTUZQSwECFAAUAAgICAAKY8FKevrqgf8BAACRAwAACwAAAAAAAAAAAAAAAADCAAAASGVsbG8uY2xhc3NQSwUGAAAAAAMAAwC2AAAA+gIAAAAA
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/hello.jar b/knative-build/runtimes/java/tests/knative/helloworldwithparams/hello.jar
deleted file mode 100644
index 2c9b625..0000000
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparams/hello.jar
+++ /dev/null
Binary files differ
diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/hello.jar b/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/hello.jar
deleted file mode 100644
index d2dabbd..0000000
--- a/knative-build/runtimes/java/tests/knative/helloworldwithparamsfromenv/hello.jar
+++ /dev/null
Binary files differ