sync knative java with udpates made to openwhisk-runtime-java (#281)

* sync knative java with udpates made to openwhisk-runtime-java

* Update all subprojects to use full ASF header
diff --git a/.gitignore b/.gitignore
index 8f36644..17015e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,6 +37,7 @@
 *.class
 *.base64
 out/
+wsksim/
 
 # Swift
 Packages/
diff --git a/.travis.yml b/.travis.yml
index 301289e..54231dc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 sudo: required
 
diff --git a/actionloop-starter-kit/.scalafmt.conf b/actionloop-starter-kit/.scalafmt.conf
index 7084efe..cc0159a 100644
--- a/actionloop-starter-kit/.scalafmt.conf
+++ b/actionloop-starter-kit/.scalafmt.conf
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 style = intellij
 danglingParentheses = false
diff --git a/actionloop-starter-kit/.travis.yml b/actionloop-starter-kit/.travis.yml
index 79b2212..5b32fc6 100644
--- a/actionloop-starter-kit/.travis.yml
+++ b/actionloop-starter-kit/.travis.yml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 sudo: required
 group: deprecated-2017Q3
diff --git a/actionloop-starter-kit/gradle/wrapper/gradle-wrapper.properties b/actionloop-starter-kit/gradle/wrapper/gradle-wrapper.properties
index d7cc33f..b99c31f 100644
--- a/actionloop-starter-kit/gradle/wrapper/gradle-wrapper.properties
+++ b/actionloop-starter-kit/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
diff --git a/docker-compose/.travis/build.sh b/docker-compose/.travis/build.sh
index 91eda7c..80df55f 100755
--- a/docker-compose/.travis/build.sh
+++ b/docker-compose/.travis/build.sh
@@ -1,6 +1,20 @@
 #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 SCRIPTDIR=$(cd $(dirname "$0") && pwd)
 ROOTDIR="$SCRIPTDIR/../"
diff --git a/docker-compose/.travis/setup.sh b/docker-compose/.travis/setup.sh
index 96b3649..a6e4cc2 100755
--- a/docker-compose/.travis/setup.sh
+++ b/docker-compose/.travis/setup.sh
@@ -1,6 +1,20 @@
 #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 set -x -e
 uname -sm
diff --git a/docker-compose/docker-compose-lean.yml b/docker-compose/docker-compose-lean.yml
index b616fb9..32bd321 100644
--- a/docker-compose/docker-compose-lean.yml
+++ b/docker-compose/docker-compose-lean.yml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 version: '3'
 services:
   db:
diff --git a/docker-compose/docker-compose.packages.yml b/docker-compose/docker-compose.packages.yml
index 52e54aa..9abe758 100644
--- a/docker-compose/docker-compose.packages.yml
+++ b/docker-compose/docker-compose.packages.yml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 version: '3'
 services:
   alarmsprovider:
diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
index 67096cb..7a410a7 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 version: '3'
 services:
   db:
diff --git a/java-action-archetype/.travis/build.sh b/java-action-archetype/.travis/build.sh
index 0fcb42a..6fe89ad 100755
--- a/java-action-archetype/.travis/build.sh
+++ b/java-action-archetype/.travis/build.sh
@@ -1,6 +1,20 @@
 #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 SCRIPTDIR=$(cd $(dirname "$0") && pwd)
 TOOLDIR="$SCRIPTDIR/../"
diff --git a/java-action-archetype/.travis/setup.sh b/java-action-archetype/.travis/setup.sh
index 9470f94..85dfaf1 100755
--- a/java-action-archetype/.travis/setup.sh
+++ b/java-action-archetype/.travis/setup.sh
@@ -1,6 +1,20 @@
 #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 set -x -e
 uname -sm
diff --git a/java-action-archetype/src/test/resources/projects/basic/archetype.properties b/java-action-archetype/src/test/resources/projects/basic/archetype.properties
index 4b77273..9aa49a4 100644
--- a/java-action-archetype/src/test/resources/projects/basic/archetype.properties
+++ b/java-action-archetype/src/test/resources/projects/basic/archetype.properties
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 groupId=com.example
 artifactId=java-demo-fn
 version=0.1-SNAPSHOT
diff --git a/java-local/gradle/wrapper/gradle-wrapper.properties b/java-local/gradle/wrapper/gradle-wrapper.properties
index f6fe73b..9d515d8 100644
--- a/java-local/gradle/wrapper/gradle-wrapper.properties
+++ b/java-local/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
diff --git a/knative-build/runtimes/java/buildtemplate.yaml b/knative-build/runtimes/java/buildtemplate.yaml
index 0af4194..21969ac 100644
--- a/knative-build/runtimes/java/buildtemplate.yaml
+++ b/knative-build/runtimes/java/buildtemplate.yaml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 apiVersion: build.knative.dev/v1alpha1
 kind: BuildTemplate
 metadata:
diff --git a/knative-build/runtimes/java/core/java8/CHANGELOG.md b/knative-build/runtimes/java/core/java8/CHANGELOG.md
index 5dfb31b..62cd6e0 100644
--- a/knative-build/runtimes/java/core/java8/CHANGELOG.md
+++ b/knative-build/runtimes/java/core/java8/CHANGELOG.md
@@ -19,6 +19,9 @@
 
 # Java 8 OpenWhisk Runtime Container
 
+## 1.1.3
+Changes:
+- Update jdk x86_64-ubuntu-jdk8u181-b13_openj9-0.9.0 and push latest hash [jdk8u181-b13_openj9-0.9.0](https://hub.docker.com/r/adoptopenjdk/openjdk8-openj9/tags/) [#77](https://github.com/apache/incubator-openwhisk-runtime-java/pull/77/files)
 
 ## 1.1.2
 Changes:
diff --git a/knative-build/runtimes/java/core/java8/proxy/gradle/wrapper/gradle-wrapper.properties b/knative-build/runtimes/java/core/java8/proxy/gradle/wrapper/gradle-wrapper.properties
index 15c07a0..5d28e48 100644
--- a/knative-build/runtimes/java/core/java8/proxy/gradle/wrapper/gradle-wrapper.properties
+++ b/knative-build/runtimes/java/core/java8/proxy/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
diff --git a/knative-build/runtimes/java/core/java8/proxy/gradlew b/knative-build/runtimes/java/core/java8/proxy/gradlew
index d4ee78f..cccdd3d 100755
--- a/knative-build/runtimes/java/core/java8/proxy/gradlew
+++ b/knative-build/runtimes/java/core/java8/proxy/gradlew
@@ -1,21 +1,5 @@
 #!/usr/bin/env sh
 
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed 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.
-#
-
 ##############################################################################
 ##
 ##  Gradle start up script for UN*X
@@ -44,7 +28,7 @@
 APP_BASE_NAME=`basename "$0"`
 
 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8'
+DEFAULT_JVM_OPTS=""
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
diff --git a/knative-build/runtimes/java/core/java8/proxy/gradlew.bat b/knative-build/runtimes/java/core/java8/proxy/gradlew.bat
index e81c17c..e95643d 100644
--- a/knative-build/runtimes/java/core/java8/proxy/gradlew.bat
+++ b/knative-build/runtimes/java/core/java8/proxy/gradlew.bat
@@ -1,19 +1,3 @@
-@rem

-@rem Copyright 2015 the original author or authors.

-@rem

-@rem Licensed under the Apache License, Version 2.0 (the "License");

-@rem you may not use this file except in compliance with the License.

-@rem You may obtain a copy of the License at

-@rem

-@rem      http://www.apache.org/licenses/LICENSE-2.0

-@rem

-@rem Unless required by applicable law or agreed to in writing, software

-@rem distributed under the License is distributed on an "AS IS" BASIS,

-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-@rem See the License for the specific language governing permissions and

-@rem limitations under the License.

-@rem

-

 @if "%DEBUG%" == "" @echo off

 @rem ##########################################################################

 @rem

@@ -30,7 +14,7 @@
 set APP_HOME=%DIRNAME%

 

 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8

+set DEFAULT_JVM_OPTS=

 

 @rem Find java.exe

 if defined JAVA_HOME goto findJavaFromJavaHome

diff --git a/knative-build/runtimes/java/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Debug.java b/knative-build/runtimes/java/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Debug.java
new file mode 100644
index 0000000..e32afc9
--- /dev/null
+++ b/knative-build/runtimes/java/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Debug.java
@@ -0,0 +1,109 @@
+/*
+ * 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.runtime.java.action;
+
+import java.time.*;
+
+public class Debug {
+
+    public static final String FG_RED = (char)27 + "[31m";
+    public static final String  FG_GREEN   = (char)27 + "[32m";
+    public static final String  FG_YELLOW  = (char)27 + "[33m";
+    //public static final String  FG_BLUE    = (char)27 + "[34m";
+    public static final String  FG_MAGENTA = (char)27 + "[35m";
+    public static final String  FG_CYAN    = (char)27 + "[36m";
+    public static final String  FG_LIGHT_GRAY  = (char)27 + "[37m";
+    //public static final String  FG_WHITE   = (char)27 + "[97m";
+
+    public static final String  FG_SUCCESS = FG_GREEN;
+    public static final String  FG_INFO    = FG_LIGHT_GRAY;
+    public static final String  FG_WARN    = FG_YELLOW;
+    public static final String  FG_ERROR   = FG_RED;
+
+    public static final String prefixFGColor = FG_CYAN;
+    public static final String postfixFGColor = FG_MAGENTA;
+    public static final String bodyFGColor = FG_INFO;
+    public static final String defaultFGColor = FG_INFO;
+    public static final String functionStartMarker = ">>> START: ";
+    public static final String functionEndMarker = "<<< END: ";
+
+    // int, rounding is OK
+    public static final int NANO = 1000000;
+
+    // CONTEXT
+    private static String PACKAGE_PATH = "org.apache.openwhisk.runtime.java.action";
+    private static int PACKAGE_PATH_LENGTH = PACKAGE_PATH.length()+1;
+    private static String FQ_METHOD = "";
+    private static String METHOD = "";
+    private static long currentTime = 0;
+    //private static long startTime = 0;
+    //private static long stopTime = 0;
+
+    private static long updateContext(){
+        currentTime = System.nanoTime();
+        StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
+        FQ_METHOD = stackTraceElements[4].toString();
+        METHOD = FQ_METHOD.substring(PACKAGE_PATH_LENGTH);
+        return currentTime;
+    }
+
+    private static String formatMessage(String prefix, String message, long startTime){
+        StringBuilder sb = new StringBuilder();
+        sb.append(prefixFGColor);
+        sb.append(prefix);
+        sb.append("[");
+        sb.append(METHOD);
+        sb.append("] ");
+        sb.append(bodyFGColor);
+        sb.append(message);
+        sb.append(postfixFGColor);
+
+        // append method elapsed time
+        sb.append("time (");
+        sb.append((currentTime)/NANO);
+        sb.append(" msec)");
+
+        if(startTime >= 0){
+            sb.append(" elapsed (");
+            sb.append((currentTime-startTime)/NANO);
+            sb.append(" msec)");
+        }
+
+        sb.append(defaultFGColor);
+        return sb.toString();
+    }
+
+    public static long start() { return start("");}
+
+    public static long start(String msg) {
+        currentTime = updateContext();
+        String formattedMsg = formatMessage(functionStartMarker, msg, -1);
+        System.out.println(formattedMsg);
+        return currentTime;
+    }
+
+    public static long end() { return end("",-1);}
+    public static long end(long startTime) { return end("", startTime);}
+
+    public static long end(String msg, long startTime){
+        currentTime = updateContext();
+        String formattedMsg = formatMessage(functionEndMarker, msg, startTime);
+        System.out.println(formattedMsg);
+        return currentTime;
+    }
+
+}
diff --git a/knative-build/runtimes/java/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Proxy.java b/knative-build/runtimes/java/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Proxy.java
index e9959b9..cad2845 100644
--- a/knative-build/runtimes/java/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Proxy.java
+++ b/knative-build/runtimes/java/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Proxy.java
@@ -40,15 +40,15 @@
 
 public class Proxy {
     private HttpServer server;
-
     private JarLoader loader = null;
 
     public Proxy(int port) throws IOException {
+        long startTime = Debug.start();
         this.server = HttpServer.create(new InetSocketAddress(port), -1);
-
         this.server.createContext("/init", new InitHandler());
         this.server.createContext("/run", new RunHandler());
         this.server.setExecutor(null); // creates a default executor
+        Debug.end(startTime);
     }
 
     public void start() {
@@ -78,6 +78,7 @@
 
     private class InitHandler implements HttpHandler {
         public void handle(HttpExchange t) throws IOException {
+            long startTime = Debug.start();
             if (loader != null) {
                 String errorMessage = "Cannot initialize the action more than once.";
                 System.err.println(errorMessage);
@@ -122,11 +123,15 @@
                 Proxy.writeError(t, "An error has occurred (see logs for details): " + e);
                 return;
             }
+            finally {
+                Debug.end(startTime);
+            }
         }
     }
 
     private class RunHandler implements HttpHandler {
         public void handle(HttpExchange t) throws IOException {
+            long startTime = Debug.start();
             if (loader == null) {
                 Proxy.writeError(t, "Cannot invoke an uninitialized action.");
                 return;
@@ -177,12 +182,15 @@
                 writeLogMarkers();
                 System.setSecurityManager(sm);
                 Thread.currentThread().setContextClassLoader(cl);
+                Debug.end(startTime);
             }
         }
     }
 
     public static void main(String args[]) throws Exception {
+        Debug.start();
         Proxy proxy = new Proxy(8080);
         proxy.start();
+        Debug.end();
     }
 }
diff --git a/knative-build/runtimes/java/gradle/wrapper/gradle-wrapper.properties b/knative-build/runtimes/java/gradle/wrapper/gradle-wrapper.properties
index 15c07a0..5d28e48 100644
--- a/knative-build/runtimes/java/gradle/wrapper/gradle-wrapper.properties
+++ b/knative-build/runtimes/java/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
diff --git a/knative-build/runtimes/java/gradlew b/knative-build/runtimes/java/gradlew
index d4ee78f..cccdd3d 100755
--- a/knative-build/runtimes/java/gradlew
+++ b/knative-build/runtimes/java/gradlew
@@ -1,21 +1,5 @@
 #!/usr/bin/env sh
 
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed 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.
-#
-
 ##############################################################################
 ##
 ##  Gradle start up script for UN*X
@@ -44,7 +28,7 @@
 APP_BASE_NAME=`basename "$0"`
 
 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8'
+DEFAULT_JVM_OPTS=""
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
diff --git a/knative-build/runtimes/java/gradlew.bat b/knative-build/runtimes/java/gradlew.bat
index e81c17c..e95643d 100644
--- a/knative-build/runtimes/java/gradlew.bat
+++ b/knative-build/runtimes/java/gradlew.bat
@@ -1,19 +1,3 @@
-@rem

-@rem Copyright 2015 the original author or authors.

-@rem

-@rem Licensed under the Apache License, Version 2.0 (the "License");

-@rem you may not use this file except in compliance with the License.

-@rem You may obtain a copy of the License at

-@rem

-@rem      http://www.apache.org/licenses/LICENSE-2.0

-@rem

-@rem Unless required by applicable law or agreed to in writing, software

-@rem distributed under the License is distributed on an "AS IS" BASIS,

-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-@rem See the License for the specific language governing permissions and

-@rem limitations under the License.

-@rem

-

 @if "%DEBUG%" == "" @echo off

 @rem ##########################################################################

 @rem

@@ -30,7 +14,7 @@
 set APP_HOME=%DIRNAME%

 

 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8

+set DEFAULT_JVM_OPTS=

 

 @rem Find java.exe

 if defined JAVA_HOME goto findJavaFromJavaHome

diff --git a/knative-build/runtimes/java/tests/src/test/resources/application.conf b/knative-build/runtimes/java/tests/src/test/resources/application.conf
index 759f063..c448e38 100644
--- a/knative-build/runtimes/java/tests/src/test/resources/application.conf
+++ b/knative-build/runtimes/java/tests/src/test/resources/application.conf
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 whisk.spi {
   SimpleSpi = whisk.spi.SimpleSpiImpl
diff --git a/knative-build/runtimes/javascript/buildtemplate.yaml b/knative-build/runtimes/javascript/buildtemplate.yaml
index 9de87e8..c11fe12 100644
--- a/knative-build/runtimes/javascript/buildtemplate.yaml
+++ b/knative-build/runtimes/javascript/buildtemplate.yaml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 apiVersion: build.knative.dev/v1alpha1
 kind: BuildTemplate
 metadata:
diff --git a/knative-build/service-account.yaml b/knative-build/service-account.yaml
index bbe72c3..de02b3c 100644
--- a/knative-build/service-account.yaml
+++ b/knative-build/service-account.yaml
@@ -1,5 +1,19 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 apiVersion: v1
 kind: ServiceAccount
diff --git a/maven-java/.mvn/wrapper/maven-wrapper.properties b/maven-java/.mvn/wrapper/maven-wrapper.properties
index 7bbf49a..b105227 100755
--- a/maven-java/.mvn/wrapper/maven-wrapper.properties
+++ b/maven-java/.mvn/wrapper/maven-wrapper.properties
@@ -1,4 +1,18 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
diff --git a/node-local/runtest.sh b/node-local/runtest.sh
index 928ec24..f6f2876 100755
--- a/node-local/runtest.sh
+++ b/node-local/runtest.sh
@@ -1,6 +1,20 @@
 #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 
 abs_path()
 {
diff --git a/node-local/test.js b/node-local/test.js
index 0490b14..6ab0683 100644
--- a/node-local/test.js
+++ b/node-local/test.js
@@ -1,5 +1,19 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more contributor
-// license agreements; and to You under the Apache License, Version 2.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.
+ */
 
 process.stdin.setEncoding('utf8');
 
diff --git a/tools/travis/scancode.sh b/tools/travis/scancode.sh
index 44bf2c2..5a2a84e 100755
--- a/tools/travis/scancode.sh
+++ b/tools/travis/scancode.sh
@@ -1,6 +1,20 @@
 #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 set -e
 
 # Build script for Travis-CI.
diff --git a/tools/travis/setupscan.sh b/tools/travis/setupscan.sh
index 586f262..c7fb18e 100755
--- a/tools/travis/setupscan.sh
+++ b/tools/travis/setupscan.sh
@@ -1,6 +1,20 @@
 #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.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.
+#
 SCRIPTDIR=$(cd $(dirname "$0") && pwd)
 HOMEDIR="$SCRIPTDIR/../../../"