Ci pipeline (#22617)

Signed-off-by: Romain Grecourt <romain.grecourt@oracle.com>
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..4e2906d
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+// list of test ids
+def jobs = [
+  "web_jsp",
+  //"web_servlet",
+  //"web_web-container",
+  //"web_group-1",
+  //"sqe_smoke_all",
+  //"security_all",
+  //"admin-cli-group-1",
+  //"admin-cli-group-2",
+  //"admin-cli-group-3",
+  //"admin-cli-group-4",
+  //"admin-cli-group-5",
+  "deployment_all",
+  //"deployment_cluster_all",
+  "ejb_group_1",
+  "ejb_group_2",
+  "ejb_group_3",
+  //"ejb_timer_cluster_all",
+  "ejb_web_all",
+  //"transaction-ee-1",
+  //"transaction-ee-2",
+  //"transaction-ee-3",
+  //"transaction-ee-4",
+  "cdi_all",
+  "ql_gf_full_profile_all",
+  "ql_gf_nucleus_all",
+  "ql_gf_web_profile_all",
+  // TODO fix this test suite (fails because of no test descriptor)
+  //"ql_gf_embedded_profile_all",
+  "nucleus_admin_all",
+  //"cts_smoke_group-1",
+  //"cts_smoke_group-2",
+  //"cts_smoke_group-3",
+  //"cts_smoke_group-4",
+  //"cts_smoke_group-5",
+  //"servlet_tck_servlet-api-servlet",
+  //"servlet_tck_servlet-api-servlet-http",
+  //"servlet_tck_servlet-compat",
+  //"servlet_tck_servlet-pluggability",
+  //"servlet_tck_servlet-spec",
+  //"findbugs_all",
+  //"findbugs_low_priority_all",
+  "jdbc_all",
+  //"jms_all",
+  //"copyright",
+  "batch_all",
+  //"naming_all",
+  "persistence_all",
+  //"webservice_all",
+  "connector_group_1",
+  "connector_group_2",
+  "connector_group_3",
+  "connector_group_4"
+]
+
+// the label is unique and identifies the pod descriptor and its resulting pods
+// without this, the agent could be using a pod created from a different descriptor
+env.label = "glassfish-ci-pod-${UUID.randomUUID().toString()}"
+
+def parallelStagesMap = jobs.collectEntries {
+  ["${it}": generateStage(it)]
+}
+
+def generateStage(job) {
+    return {
+        podTemplate(label: env.label) {
+            node(label) {
+                stage("${job}") {
+                    container('glassfish-ci') {
+                      // do the checkout manually
+                      unstash 'scm'
+                      retry(10) {
+                        sleep 60
+                        sh '''
+                          rm -rf .git && git init .
+                          cp .GIT_CONFIG .git/config
+                          GIT_COMMIT=$(cat .GIT_COMMIT)
+                          git fetch --no-tags --progress \
+                            $(git config remote.origin.url) \
+                            +refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}
+                          git checkout -b ${BRANCH_NAME} ${GIT_COMMIT}
+                        '''
+                      }
+                      // run the test
+                      unstash 'build-bundles'
+                      try {
+                          retry(3) {
+                              timeout(time: 2, unit: 'HOURS') {
+                                sh "./appserver/tests/gftest.sh run_test ${job}"
+                              }
+                          }
+                      } finally {
+                        // archive what we can...
+                        archiveArtifacts artifacts: "${job}-results.tar.gz"
+                        junit testResults: 'results/junitreports/*.xml', allowEmptyResults: false
+                      }
+                    }
+                }
+            }
+        }
+    }
+}
+
+pipeline {
+  options {
+    // keep at most 50 builds
+    buildDiscarder(logRotator(numToKeepStr: '50'))
+    // preserve the stashes to allow re-running a test stage
+    preserveStashes()
+    // issue related to default 'implicit' checkout, disable it
+    skipDefaultCheckout()
+    // abort pipeline if previous stage is unstable
+    skipStagesAfterUnstable()
+    // show timestamps in logs
+    timestamps()
+    // global timeout, abort after 6 hours
+    timeout(time: 6, unit: 'HOURS')
+  }
+  agent {
+    kubernetes {
+      label "${env.label}"
+      defaultContainer 'glassfish-ci'
+      yaml """
+apiVersion: v1
+kind: Pod
+metadata:
+spec:
+  securityContext:
+    runAsUser: 1000100000
+  volumes:
+    - name: maven-repo-shared-storage
+      persistentVolumeClaim:
+       claimName: glassfish-maven-repo-storage
+    - name: maven-repo-local-storage
+      emptyDir: {}
+    - name: maven-settings
+      configMap:
+        name: maven-settings.xml
+  containers:
+  - name: jnlp
+    image: jenkins/jnlp-slave:alpine
+    imagePullPolicy: IfNotPresent
+    volumeMounts:
+    env:
+      - name: JAVA_TOOL_OPTIONS
+        value: -Xmx1G
+    resources:
+      limits:
+        memory: "1Gi"
+        cpu: "1"
+  - name: glassfish-ci
+    image: ee4jglassfish/ci:jdk-8.181
+    args:
+    - cat
+    tty: true
+    imagePullPolicy: Always
+    volumeMounts:
+      - mountPath: "/home/jenkins/.m2/settings.xml"
+        subPath: maven-settings.xml
+        name: maven-settings
+      - mountPath: "/home/jenkins/.m2/repository"
+        name: maven-repo-shared-storage
+      - mountPath: "/home/jenkins/.m2/repository/org/glassfish/main"
+        name: maven-repo-local-storage
+    env:
+      - name: JAVA_TOOL_OPTIONS
+        value: -Xmx2G
+      - name: JENKINS_URL
+        value: ${JENKINS_URL}
+    resources:
+      limits:
+        memory: "7Gi"
+        cpu: "3"
+"""
+    }
+  }
+  environment {
+    S1AS_HOME = "${WORKSPACE}/glassfish5/glassfish"
+    APS_HOME = "${WORKSPACE}/appserver/tests/appserv-tests"
+    TEST_RUN_LOG = "${WORKSPACE}/tests-run.log"
+    GF_INTERNAL_ENV = credentials('gf-internal-env')
+  }
+  stages {
+    stage('build') {
+      agent {
+        kubernetes {
+          label "${env.label}"
+        }
+      }
+      steps {
+        container('glassfish-ci') {
+          timeout(time: 1, unit: 'HOURS') {
+            checkout scm
+            // save git info to do manual checkout on later stages
+            sh '''
+              cp .git/config .GIT_CONFIG
+              cp .git/$(cat .git/HEAD | awk '{print $2}') .GIT_COMMIT
+            '''
+            stash includes: '.GIT_*', name: 'scm'
+            // do the build
+            sh '''
+              bash -xe ./gfbuild.sh build_re_dev
+            '''
+            archiveArtifacts artifacts: 'bundles/*.zip'
+            junit testResults: 'test-results/build-unit-tests/results/junitreports/test_results_junit.xml'
+            stash includes: 'bundles/*', name: 'build-bundles'
+          }
+        }
+      }
+    }
+    stage('tests') {
+      steps {
+        script {
+          parallel parallelStagesMap
+        }
+      }
+    }
+  }
+}
diff --git a/appserver/admingui/devtests/run_test.sh b/appserver/admingui/devtests/run_test.sh
index 5c40835..ed461af 100755
--- a/appserver/admingui/devtests/run_test.sh
+++ b/appserver/admingui/devtests/run_test.sh
@@ -20,8 +20,8 @@
 }
 
 merge_junit_xmls(){
-  JUD_DIR=$1
-  JUD=$WORKSPACE/results/junitreports/test_results_junit.xml
+  JUD_DIR=${1}
+  JUD=${WORKSPACE}/results/junitreports/test_results_junit.xml
   rm -f ${JUD} || true
   echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> ${JUD}
   echo "<testsuites>" >> ${JUD}
@@ -31,57 +31,49 @@
 
 test_run(){
   export PWD=$(date | md5sum | cut -d' ' -f 1)
-  touch $APS_HOME/password.txt 
-  chmod 600 $APS_HOME/password.txt
-  echo "AS_ADMIN_PASSWORD=" > $APS_HOME/password.txt
-  echo "AS_ADMIN_NEWPASSWORD=$PWD" >> $APS_HOME/password.txt
-  LOCKFILE=$S1AS_HOME/domains/domain1/imq/instances/imqbroker/lockv
-  if [ -f $LOCKFILE ];then
-    rm $LOCKFILE
+  touch ${APS_HOME}/password.txt
+  chmod 600 ${APS_HOME}/password.txt
+  echo "AS_ADMIN_PASSWORD=" > ${APS_HOME}/password.txt
+  echo "AS_ADMIN_NEWPASSWORD=${PWD}" >> ${APS_HOME}/password.txt
+  LOCKFILE=${S1AS_HOME}/domains/domain1/imq/instances/imqbroker/lockv
+  if [ -f ${LOCKFILE} ];then
+    rm ${LOCKFILE}
   fi
-  $S1AS_HOME/bin/asadmin --user admin --passwordfile $APS_HOME/password.txt change-admin-password
-  $S1AS_HOME/bin/asadmin start-domain
-  echo "AS_ADMIN_PASSWORD=$PWD" > $APS_HOME/password.txt
-  $S1AS_HOME/bin/asadmin --passwordfile $APS_HOME/password.txt enable-secure-admin
-  $S1AS_HOME/bin/asadmin restart-domain
-  cd $APS_HOME/../../admingui/devtests/
+  ${S1AS_HOME}/bin/asadmin --user admin --passwordfile ${APS_HOME}/password.txt change-admin-password
+  ${S1AS_HOME}/bin/asadmin start-domain
+  echo "AS_ADMIN_PASSWORD=${PWD}" > ${APS_HOME}/password.txt
+  ${S1AS_HOME}/bin/asadmin --passwordfile ${APS_HOME}/password.txt enable-secure-admin
+  ${S1AS_HOME}/bin/asadmin restart-domain
+  cd ${APS_HOME}/../../admingui/devtests/
   export DISPLAY=127.0.0.1:1	
-  mvn -Dmaven.repo.local=$WORKSPACE/repository -DsecureAdmin=true -Dpasswordfile=$APS_HOME/password.txt test | tee $TEST_RUN_LOG
-  $S1AS_HOME/bin/asadmin stop-domain
-  rm -rf $APS_HOME/password.txt
+  mvn -DsecureAdmin=true -Dpasswordfile=${APS_HOME}/password.txt test | tee ${TEST_RUN_LOG}
+  ${S1AS_HOME}/bin/asadmin stop-domain
+  rm -rf ${APS_HOME}/password.txt
 }
 
 run_test_id(){
-  #a common util script located at main/appserver/tests/common_test.sh
-  source `dirname $0`/../../tests/common_test.sh
+  source `dirname ${0}`/../../tests/common_test.sh
   kill_process
-  delete_gf
-  export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=384m"
-  download_test_resources glassfish.zip tests-maven-repo.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip "$WORKSPACE/bundles/tests-maven-repo.zip -d $WORKSPACE/repository"
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  #run the actual test function
   test_run
-  merge_junit_xmls $WORKSPACE/main/appserver/admingui/devtests/target/surefire-reports
+  merge_junit_xmls ${WORKSPACE}/appserver/admingui/devtests/target/surefire-reports
   change_junit_report_class_names
 }
 
 post_test_run(){
-  cp $WORKSPACE/bundles/version-info.txt $WORKSPACE/results/ || true
-  cp $TEST_RUN_LOG $WORKSPACE/results/ || true
-  cp $WORKSPACE/glassfish5/glassfish/domains/domain1/logs/server.log* $WORKSPACE/results/ || true
-  cp $WORKSPACE/main/appserver/admingui/devtests/target/surefire-reports/*.png $WORKSPACE/results/ || true
-  upload_test_results
-  delete_bundle
+  cp $TEST_RUN_LOG ${WORKSPACE}/results/ || true
+  cp ${WORKSPACE}/glassfish5/glassfish/domains/domain1/logs/server.log* ${WORKSPACE}/results/ || true
+  cp ${WORKSPACE}/appserver/admingui/devtests/target/surefire-reports/*.png ${WORKSPACE}/results/ || true
 }
 
-OPT=$1
+OPT=${1}
 TEST_ID=$2
-case $OPT in
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
     trap post_test_run SIGTERM SIGABRT EXIT
-    run_test_id $TEST_ID ;;
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/admin/cli/run_test.sh b/appserver/tests/appserv-tests/devtests/admin/cli/run_test.sh
index 130c7a5..dd78581 100755
--- a/appserver/tests/appserv-tests/devtests/admin/cli/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/admin/cli/run_test.sh
@@ -1,3 +1,4 @@
+#!/bin/bash -ex
 #
 # Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
 #
@@ -14,67 +15,56 @@
 # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 #
 
-
 test_run(){
-	export HUDSON=true
-	export ROOT=`pwd`
+  export HUDSON=true
+  export ROOT=`pwd`
 
-	if [ -x "/usr/bin/cygpath" ]
-	then
-	  ROOT=`cygpath -d $ROOT`
-	  echo "Windows ROOT: $ROOT"
-	  export CYGWIN=nontsec
-	fi
-	ant clean
-	time ant -Dnum_tests=45 $TARGET | tee $TEST_RUN_LOG
-	egrep 'FAILED *0' "$APS_HOME/count.txt" >/dev/null
+  if [ -x "/usr/bin/cygpath" ]
+  then
+    ROOT=`cygpath -d ${ROOT}`
+    echo "Windows ROOT: ${ROOT}"
+    export CYGWIN=nontsec
+  fi
+  ant clean
+  time ant -Dnum_tests=45 ${TARGET} | tee ${TEST_RUN_LOG}
+  #egrep 'FAILED *0' "${APS_HOME}/count.txt" >/dev/null
 }
 
 run_test_id(){
-	source `dirname $0`/../../../../common_test.sh
-	kill_process
-	delete_gf
-	download_test_resources glassfish.zip version-info.txt
-	unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-	cd `dirname $0`
-	test_init
-	get_test_target $1
-	test_run
-	check_successful_run
-    generate_junit_report $1
-    change_junit_report_class_names
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
+  test_init
+  get_test_target ${1}
+  test_run
+  check_successful_run
+  generate_junit_report ${1}
+  change_junit_report_class_names
 }
 
-post_test_run(){
-    copy_test_artifects
-    upload_test_results
-    delete_bundle
-    cd -
-}
 
 get_test_target(){
-	case $1 in
-		admin_cli_all )
-			TARGET=all
-			export TARGET;;
-                * )
-                       TARGET=$1
-                       export TARGET;;
-	esac
-
+  case $1 in
+    admin_cli_all )
+      TARGET=all
+      export TARGET;;
+    * )
+      TARGET=$1
+      export TARGET;;
+  esac
 }
 
 list_test_ids(){
-	echo admin_cli_all admin-cli-group-1 admin-cli-group-2 admin-cli-group-3 admin-cli-group-4 admin-cli-group-5
+  echo admin_cli_all admin-cli-group-1 admin-cli-group-2 admin-cli-group-3 admin-cli-group-4 admin-cli-group-5
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../../common_test.sh
 
-case $OPT in
-	list_test_ids )
-		list_test_ids;;
-	run_test_id )
-		trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+case ${OPT} in
+  list_test_ids )
+    list_test_ids;;
+  run_test_id )
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/batch/run_test.sh b/appserver/tests/appserv-tests/devtests/batch/run_test.sh
index 3ba0e83..825f417 100755
--- a/appserver/tests/appserv-tests/devtests/batch/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/batch/run_test.sh
@@ -20,9 +20,9 @@
 }
 
 test_run(){
-  $S1AS_HOME/bin/asadmin start-domain
-  $S1AS_HOME/bin/asadmin start-database
-  cd $APS_HOME/devtests/batch
+  ${S1AS_HOME}/bin/asadmin start-domain
+  ${S1AS_HOME}/bin/asadmin start-database
+  cd ${APS_HOME}/devtests/batch
   PROXY_HOST=`echo ${http_proxy} | cut -d':' -f2 | ${SED} 's/\/\///g'`
   PROXY_PORT=`echo ${http_proxy} | cut -d':' -f3 | ${SED} 's/\///g'`
   ANT_OPTS="${ANT_OPTS} \
@@ -34,49 +34,36 @@
   -Dhttps.noProxyHosts='127.0.0.1|localhost|*.oracle.com'"
   export ANT_OPTS
   echo "ANT_OPTS=${ANT_OPTS}"
-  ant $TARGET | tee $TEST_RUN_LOG
-  $S1AS_HOME/bin/asadmin stop-database
-  $S1AS_HOME/bin/asadmin stop-domain   
+  ant ${TARGET} | tee ${TEST_RUN_LOG}
+  ${S1AS_HOME}/bin/asadmin stop-database
+  ${S1AS_HOME}/bin/asadmin stop-domain
 }
 
 run_test_id(){
-  #a common util script located at main/appserver/tests/common_test.sh
-  source `dirname $0`/../../../common_test.sh
-  kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  get_test_target $1
-  #run the actual test function
+  get_test_target ${1}
   test_run
-  generate_junit_report $1
+  generate_junit_report ${1}
   change_junit_report_class_names
 }
 
-post_test_run(){
-  copy_test_artifects
-  upload_test_results
-  delete_bundle
-  cd -
-}
-
 get_test_target(){
-	case $1 in
+	case ${1} in
 		batch_all )
 			TARGET=all
 			export TARGET;;
 	esac
-
 }
 
-OPT=$1
-TEST_ID=$2
-case $OPT in
+OPT=${1}
+TEST_ID=${2}
+source `dirname $0`/../../../common_test.sh
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
-    trap post_test_run EXIT
-    run_test_id $TEST_ID ;;
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/cdi/run_test.sh b/appserver/tests/appserv-tests/devtests/cdi/run_test.sh
index 7b90362..f5181f3 100755
--- a/appserver/tests/appserv-tests/devtests/cdi/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/cdi/run_test.sh
@@ -19,62 +19,50 @@
 	#Fix for false positive
 	echo "<property name=\"libraries\" value=\"' '\"/>" >> smoke-tests/simple-wab-with-cdi/build.properties
 	find . -name "RepRunConf.txt" | xargs rm -f
-	rm 	-rf *.output alltests.res $APS_HOME/test_results*
+	rm 	-rf *.output alltests.res ${APS_HOME}/test_results*
 	# Run the tests
 	set +e
 	ant clean
-	$S1AS_HOME/bin/asadmin start-domain
-	$S1AS_HOME/bin/asadmin start-database
-	ant $TARGET | tee $TEST_RUN_LOG
-	$S1AS_HOME/bin/asadmin stop-domain
-	$S1AS_HOME/bin/asadmin stop-database
+	${S1AS_HOME}/bin/asadmin start-domain
+	${S1AS_HOME}/bin/asadmin start-database
+	ant ${TARGET} | tee ${TEST_RUN_LOG}
+	${S1AS_HOME}/bin/asadmin stop-domain
+	${S1AS_HOME}/bin/asadmin stop-database
 	set -e
 }
 
 get_test_target(){
-	case $1 in
+	case ${1} in
 		cdi_all )
 			TARGET=all
 			export TARGET;;
 	esac
-
 }
 
 
 run_test_id(){
-	source `dirname $0`/../../../common_test.sh
-	kill_process
-	delete_gf
-	download_test_resources glassfish.zip version-info.txt
-	unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-	cd `dirname $0`
+	unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+	cd `dirname ${0}`
 	test_init
-	get_test_target $1
+	get_test_target ${1}
 	test_run
 	check_successful_run
-    generate_junit_report $1
-    change_junit_report_class_names
+  generate_junit_report ${1}
+  change_junit_report_class_names
 }
 
-post_test_run(){
-    copy_test_artifects
-    upload_test_results
-    delete_bundle
-    cd -
-}
-
-
 list_test_ids(){
 	echo cdi_all
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
 
-case $OPT in
+case ${OPT} in
 	list_test_ids )
 		list_test_ids;;
 	run_test_id )
-		trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+		trap "copy_test_artifacts ${TEST_ID}" EXIT
+		run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/connector/v3/run_test.sh b/appserver/tests/appserv-tests/devtests/connector/v3/run_test.sh
index 65c5918..4e9a412 100755
--- a/appserver/tests/appserv-tests/devtests/connector/v3/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/connector/v3/run_test.sh
@@ -15,7 +15,6 @@
 # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 #
 
-#Contract 1. returns the TEST ID, which you assigned in step 3.a
 list_test_ids(){
   echo connector_all connector_group_1 connector_group_2 connector_group_3 connector_group_4
 }
@@ -24,66 +23,45 @@
   #test functions goes here, maven test or ant test etc.
   export HUDSON=true
   export ROOT=`pwd`
-  echo $ROOT
+  echo ${ROOT}
   ant startDomain startDerby
-  cd $ROOT
-  echo Running target: $TARGET
-  time ant clean-all start-record $TARGET stop-record report | tee $TEST_RUN_LOG
-  antStatus=$?
+  cd ${ROOT}
+  echo Running target: ${TARGET}
+  time ant clean-all start-record ${TARGET} stop-record report | tee ${TEST_RUN_LOG}
+  antStatus=${?}
+  cp connector.output tests-run.log
   ant stopDomain stopDerby
-  if [ $antStatus -ne 0 ]
-  then
-      ps -ef
-      exit $antStatus
-  fi
 }
 
-#Contract 2. does the clean up, downloads the tests/build sources and eventually runs tests
 run_test_id(){
-  #a common util script located at main/appserver/tests/common_test.sh
-  source `dirname $0`/../../../../common_test.sh
-  kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  get_test_target $1
-  export ROOT=`pwd`
-  export TEST_RUN_LOG=$ROOT/tests-run.log
-  #run the actual test function
+  get_test_target ${1}
   test_run
   check_successful_run
-  generate_junit_report $1
+  generate_junit_report ${1}
   change_junit_report_class_names
 }
 
-post_test_run(){
-     copy_test_artifects
-     upload_test_results
-     delete_bundle
-     cd -
-}
-
 get_test_target(){
-	case $1 in
+	case ${1} in
 		connector_all )
 			TARGET=all
 			export TARGET;;
-                * )
-                       TARGET=$1
-                       export TARGET;;
+  * )
+    TARGET=$1
+    export TARGET;;
 	esac
-
 }
  
-#Contract 3. script init code.
-OPT=$1
-TEST_ID=$2
-case $OPT in
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../../common_test.sh
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
-    trap post_test_run EXIT
-    run_test_id $TEST_ID ;;
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/deployment/run_test.sh b/appserver/tests/appserv-tests/devtests/deployment/run_test.sh
index 61d7676..c763790 100755
--- a/appserver/tests/appserv-tests/devtests/deployment/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/deployment/run_test.sh
@@ -16,7 +16,7 @@
 #
 
 test_run(){
-  if [[ $1 = "deployment_cluster_all" ]]; then
+  if [[ ${1} = "deployment_cluster_all" ]]; then
     DEPL_TARGET=CLUSTER
     export DEPL_TARGET
   fi
@@ -24,63 +24,46 @@
   export HUDSON=true
   export ROOT=`pwd`
 
-  PROXY_HOST=`echo ${http_proxy} | cut -d':' -f2 | ${SED} 's/\/\///g'`
-  PROXY_PORT=`echo ${http_proxy} | cut -d':' -f3 | ${SED} 's/\///g'`
-  ANT_OPTS="${ANT_OPTS} \
-  -Dhttp.proxyHost=${PROXY_HOST} \
-  -Dhttp.proxyPort=${PROXY_PORT} \
-  -Dhttp.noProxyHosts='127.0.0.1|localhost|*.oracle.com' \
-  -Dhttps.proxyHost=${PROXY_HOST} \
-  -Dhttps.proxyPort=${PROXY_PORT} \
-  -Dhttps.noProxyHosts='127.0.0.1|localhost|*.oracle.com'"
-  export ANT_OPTS
-
   # The first command-line argument is the (optional) predecessor job from which
   # to get the revision under test and the glassfish.zip file to expand.
   # Default: gf-trunk-build-continuous
 
   if [ -x "/usr/bin/cygpath" ]
   then
-    ROOT=`cygpath -d $ROOT`
-    echo "Windows ROOT: $ROOT"
+    ROOT=`cygpath -d ${ROOT}`
+    echo "Windows ROOT: ${ROOT}"
     export CYGWIN=nontsec
   fi
   antTarget="all-ee"
-  if [ -z "$DEPL_TARGET" ]
+  if [ -z "${DEPL_TARGET}" ]
   then
-      $S1AS_HOME/bin/asadmin start-domain
+      ${S1AS_HOME}/bin/asadmin start-domain
       antTarget="all"
   fi
   # Get rid of any lingering password file from an earlier run
   rm ~/.asadminpass || true
 
-  time ant $antTarget | tee $TEST_RUN_LOG
-  antStatus=$?
+  time ant ${antTarget} | tee ${TEST_RUN_LOG}
+  antStatus=${?}
   # Copy the report to $APS_HOME
-  cp tests-results.xml $APS_HOME/tests-results.xml
-  cp results.html $APS_HOME/test_results.html 
+  cp tests-results.xml ${APS_HOME}/tests-results.xml
+  cp results.html ${APS_HOME}/test_results.html
 
-  if [ -z "$DEPL_TARGET" ]
+  if [ -z "${DEPL_TARGET}" ]
   then
-      $S1AS_HOME/bin/asadmin stop-domain
+      ${S1AS_HOME}/bin/asadmin stop-domain
   fi
-   if [[ $1 = "deployment_cluster_all" ]]; then
-      cp -r $APS_HOME/devtests/deployment/server-logs/ $WORKSPACE/results/
+   if [[ ${1} = "deployment_cluster_all" ]]; then
+      cp -r ${APS_HOME}/devtests/deployment/server-logs/ ${WORKSPACE}/results/
   fi  
-  #
-  echo DEPL_TARGET is $DEPL_TARGET
-  if [ $antStatus -ne 0 ]
-  then
-      ps -ef 
-      exit $antStatus
-  fi
+  echo DEPL_TARGET is ${DEPL_TARGET}
 }
 
 generate_junit_report_deployment(){
   printf "\n%s \n\n" "===== GENERATE JUNIT REPORT ====="
-  TD=$APS_HOME/tests-results.xml
-  JUD=$APS_HOME/test_results_junit.xml
-  TESTSUITE_NAME=$1
+  TD=${APS_HOME}/tests-results.xml
+  JUD=${APS_HOME}/test_results_junit.xml
+  TESTSUITE_NAME=${1}
 
   cat ${TD} | ${AWK} -v suitename=${TESTSUITE_NAME} '
   BEGIN{
@@ -122,42 +105,31 @@
     print " </testsuite>";
     print "</testsuites>";
   }' > ${JUD}
-  cp $JUD $WORKSPACE/results/junitreports
+  cp ${JUD} ${WORKSPACE}/results/junitreports
 }
 
 run_test_id(){
-  source `dirname $0`/../../../common_test.sh
-  kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
   test_run ${1}
   check_successful_run
-  generate_junit_report_deployment $1
+  generate_junit_report_deployment ${1}
   change_junit_report_class_names
-  }
-
-post_test_run(){
-    copy_test_artifects
-    upload_test_results
-    delete_bundle
-    cd -
 }
 
-
 list_test_ids(){
   echo deployment_all deployment_cluster_all
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
 
-case $OPT in
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
-    trap post_test_run EXIT
-    run_test_id $TEST_ID ;;
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/ejb/run_test.sh b/appserver/tests/appserv-tests/devtests/ejb/run_test.sh
index 47e16cb..5951e84 100755
--- a/appserver/tests/appserv-tests/devtests/ejb/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/ejb/run_test.sh
@@ -17,11 +17,10 @@
 
 test_run_ejb(){
 
-	rm -rf $S1AS_HOME/domains/domain1
-	cd $APS_HOME
+	rm -rf ${S1AS_HOME}/domains/domain1
+	cd ${APS_HOME}
 	echo "AS_ADMIN_PASSWORD=" > temppwd
-	cat $APS_HOME/temppwd
-
+	cat ${APS_HOME}/temppwd
 
 	ADMIN_PORT=45707
 	JMS_PORT=45708
@@ -35,9 +34,16 @@
 	DB_PORT=45716
 	DB_PORT_2=45717
 
-	$S1AS_HOME/bin/asadmin --user anonymous --passwordfile $APS_HOME/temppwd create-domain --adminport ${ADMIN_PORT} --domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} --instanceport ${INSTANCE_PORT} domain1
+	${S1AS_HOME}/bin/asadmin \
+		--user anonymous \
+		--passwordfile ${APS_HOME}/temppwd \
+		create-domain \
+			--adminport ${ADMIN_PORT} \
+			--domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} \
+			--instanceport ${INSTANCE_PORT} \
+			domain1
 
-	#Create 
+	# Create
 	echo "admin.domain=domain1
 	admin.domain.dir=\${env.S1AS_HOME}/domains
 	admin.port=${ADMIN_PORT}
@@ -66,54 +72,58 @@
 
 	(jps |grep Main |cut -f1 -d" " | xargs kill -9  > /dev/null 2>&1) || true
 
-	cd $S1AS_HOME/domains/domain1/config/
+	cd ${S1AS_HOME}/domains/domain1/config/
 	sed "s/1527/${DB_PORT}/g" domain.xml > domain.xml.replaced
 	mv domain.xml.replaced domain.xml
 	grep PortNumber domain.xml
 
-	cd $APS_HOME/config
+	cd ${APS_HOME}/config
 	(rm derby.properties.replaced  > /dev/null 2>&1) || true
 	sed "s/1527/${DB_PORT}/g" derby.properties > derby.properties.replaced
 	rm derby.properties
 	sed "s/1528/${DB_PORT_2}/g" derby.properties.replaced > derby.properties
 	cat derby.properties
-	rm -rf $APS_HOME/test_results*
-	cd $APS_HOME/devtests/ejb
+	rm -rf ${APS_HOME}/test_results*
+	cd ${APS_HOME}/devtests/ejb
 	rm count.txt || true
 
-	ant $TARGET report-result -Ddb.port=${DB_PORT} -Ddb.port.2=${DB_PORT_2} |tee $TEST_RUN_LOG
-
+	ant ${TARGET} report-result -Ddb.port=${DB_PORT} -Ddb.port.2=${DB_PORT_2} |tee $TEST_RUN_LOG
 }
 
 test_run_ejb_web(){
 
 	rm -rf $S1AS_HOME/domains/domain1
 
-	ADMIN_PORT=45707
-	JMS_PORT=45708
-	JMX_PORT=45709
-	ORB_PORT=45710
-	SSL_PORT=45711
-	INSTANCE_PORT=45712
-	INSTANCE_HTTPS_PORT=45718
-	INSTANCE_PORT_2=45719
-	INSTANCE_PORT_3=45720
-	ALTERNATE_PORT=45713
-	ORB_SSL_PORT=45714
-	ORB_SSL_MUTUALAUTH_PORT=45715
-	DB_PORT=45716
-	DB_PORT_2=45717
-
-	export ADMIN_PORT JMS_PORT JMX_PORT ORB_PORT SSL_PORT INSTANCE_PORT INSTANCE_HTTPS_PORT INSTANCE_PORT_2 INSTANCE_PORT_3 ALTERNATE_PORT ORB_SSL_PORT ORB_SSL_MUTUALAUTH_PORT DB_PORT DB_PORT_2
+	export ADMIN_PORT=45707 \
+				 JMS_PORT=45708 \
+				 JMX_PORT=45709 \
+				 ORB_PORT=45710 \
+				 SSL_PORT=45711 \
+				 INSTANCE_PORT=45712 \
+				 INSTANCE_HTTPS_PORT=45718 \
+				 INSTANCE_PORT_2=45719 \
+				 INSTANCE_PORT_3=45720 \
+				 ALTERNATE_PORT=45713 \
+				 ORB_SSL_PORT=45714 \
+				 ORB_SSL_MUTUALAUTH_PORT=45715 \
+				 DB_PORT=45716 \
+				 DB_PORT_2=45717
 	env
 
-	cd $APS_HOME
+	cd ${APS_HOME}
 
 	echo "AS_ADMIN_PASSWORD=" > temppwd
-	cat $APS_HOME/temppwd
-	$S1AS_HOME/bin/asadmin --user anonymous --passwordfile $APS_HOME/temppwd create-domain --adminport ${ADMIN_PORT} --domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} --instanceport ${INSTANCE_PORT} domain1
+	cat ${APS_HOME}/temppwd
+	${S1AS_HOME}/bin/asadmin \
+		--user anonymous \
+		--passwordfile ${APS_HOME}/temppwd \
+		create-domain \
+			--adminport ${ADMIN_PORT} \
+			--domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} \
+			--instanceport ${INSTANCE_PORT} \
+			domain1
 
-	#Create 
+	# Create
 	echo "admin.domain=domain1
 	admin.domain.dir=\${env.S1AS_HOME}/domains
 	admin.port=${ADMIN_PORT}
@@ -142,57 +152,60 @@
 
 	(jps |grep Main |cut -f1 -d" " | xargs kill -9  > /dev/null 2>&1) || true
 
-	cd $S1AS_HOME/domains/domain1/config/
+	cd ${S1AS_HOME}/domains/domain1/config/
 	sed "s/1527/${DB_PORT}/g" domain.xml > domain.xml.replaced
 	mv domain.xml.replaced domain.xml
 	grep PortNumber domain.xml
 
-	cd $APS_HOME/config
+	cd ${APS_HOME}/config
 	(rm derby.properties.replaced  > /dev/null 2>&1) || true
 	sed "s/1527/${DB_PORT}/g" derby.properties > derby.properties.replaced
 	rm derby.properties
 	sed "s/1528/${DB_PORT_2}/g" derby.properties.replaced > derby.properties
 	cat derby.properties
-	cd $APS_HOME/devtests/ejb
+	cd ${APS_HOME}/devtests/ejb
 	rm count.txt || true
-	ant $TARGET report-result -Ddb.port=${DB_PORT} -Ddb.port.2=${DB_PORT_2} |tee $TEST_RUN_LOG
-	cat $S1AS_HOME/databases/derby.log
-	egrep 'FAILED= *0' count.txt
-	egrep 'DID NOT RUN= *0' count.txt
-
+	ant ${TARGET} report-result -Ddb.port=${DB_PORT} -Ddb.port.2=${DB_PORT_2} |tee $TEST_RUN_LOG
+	cat ${S1AS_HOME}/databases/derby.log
+	egrep 'DID NOT RUN= *0' count.txt || true
 }
 
 
 test_run_ejb_timer_cluster(){
 
-	rm -rf $S1AS_HOME/domains/domain1
+	rm -rf ${S1AS_HOME}/domains/domain1
 
-	ADMIN_PORT=45707
-	JMS_PORT=45708
-	JMX_PORT=45709
-	ORB_PORT=45710
-	SSL_PORT=45711
-	INSTANCE_PORT=45712
-	INSTANCE_HTTP_PORT=45721
-	INSTANCE_HTTPS_PORT=45718
-	INSTANCE_PORT_2=45719
-	INSTANCE_PORT_3=45720
-	ALTERNATE_PORT=45713
-	ORB_SSL_PORT=45714
-	ORB_SSL_MUTUALAUTH_PORT=45715
-	DB_PORT=45716
-	DB_PORT_2=45717
-
-	export ADMIN_PORT JMS_PORT JMX_PORT ORB_PORT SSL_PORT INSTANCE_PORT INSTANCE_HTTP_PORT INSTANCE_HTTPS_PORT INSTANCE_PORT_2 INSTANCE_PORT_3 ALTERNATE_PORT ORB_SSL_PORT ORB_SSL_MUTUALAUTH_PORT DB_PORT DB_PORT_2
+	export ADMIN_PORT=45707 \
+				 JMS_PORT=45708 \
+				 JMX_PORT=45709 \
+				 ORB_PORT=45710 \
+				 SSL_PORT=45711 \
+				 INSTANCE_PORT=45712 \
+				 INSTANCE_HTTP_PORT=45721 \
+				 INSTANCE_HTTPS_PORT=45718 \
+				 INSTANCE_PORT_2=45719 \
+				 INSTANCE_PORT_3=45720 \
+				 ALTERNATE_PORT=45713 \
+				 ORB_SSL_PORT=45714 \
+				 ORB_SSL_MUTUALAUTH_PORT=45715 \
+				 DB_PORT=45716 \
+				 DB_PORT_2=45717
 	env
 
-	cd $APS_HOME
+	cd ${APS_HOME}
 
 	echo "AS_ADMIN_PASSWORD=" > temppwd
-	cat $APS_HOME/temppwd
-	$S1AS_HOME/bin/asadmin --user anonymous --passwordfile $APS_HOME/temppwd create-domain --adminport ${ADMIN_PORT} --domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} --instanceport ${INSTANCE_PORT} domain1
+	cat ${APS_HOME}/temppwd
+	${S1AS_HOME}/bin/asadmin \
+		--user anonymous \
+		--passwordfile ${APS_HOME}/temppwd \
+		create-domain \
+			--adminport ${ADMIN_PORT} \
+			--domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} \
+			--instanceport ${INSTANCE_PORT} \
+			domain1
 
-	#Create 
+	# Create
 	echo "admin.domain=domain1
 	admin.domain.dir=\${env.S1AS_HOME}/domains
 	admin.port=${ADMIN_PORT}
@@ -223,92 +236,75 @@
 
 	(jps |grep Main |cut -f1 -d" " | xargs kill -9  > /dev/null 2>&1) || true
 
-	cd $S1AS_HOME/domains/domain1/config/
+	cd ${S1AS_HOME}/domains/domain1/config/
 	sed "s/1527/${DB_PORT}/g" domain.xml > domain.xml.replaced
 	mv domain.xml.replaced domain.xml
 	grep PortNumber domain.xml
 
-	cd $APS_HOME/config
+	cd ${APS_HOME}/config
 	(rm derby.properties.replaced  > /dev/null 2>&1) || true
 	sed "s/1527/${DB_PORT}/g" derby.properties > derby.properties.replaced
 	rm derby.properties
 	sed "s/1528/${DB_PORT_2}/g" derby.properties.replaced > derby.properties
 	cat derby.properties
 
-	pushd $APS_HOME/devtests/ejb/ee/timer
+	pushd ${APS_HOME}/devtests/ejb/ee/timer
 
-	ant $TARGET |tee $TEST_RUN_LOG
-	antStatus=$?
-
+	ant ${TARGET} |tee ${TEST_RUN_LOG}
+	antStatus=${?}
 	ant dev-report
-
 }
 
-
-
 get_test_target(){
 	case $1 in
 		ejb_all|ejb_timer_cluster_all )
 			TARGET=all ;;
 		ejb_web_all)
 			TARGET=lite ;;
-                 * )
-                       TARGET=$1 ;;
+    * )
+      TARGET=$1 ;;
 	esac
 	export TARGET
-
 }
 
 
 run_test_id(){
-	source `dirname $0`/../../../common_test.sh
-	kill_process
-	delete_gf
-	if [[ $1 = "ejb_web_all" ]]; then
-		download_test_resources web.zip version-info.txt
-		unzip_test_resources $WORKSPACE/bundles/web.zip
+	if [[ ${1} = "ejb_web_all" ]]; then
+		unzip_test_resources ${WORKSPACE}/bundles/web.zip
 	else
-		download_test_resources glassfish.zip version-info.txt
-		unzip_test_resources $WORKSPACE/bundles/glassfish.zip
+		unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
 	fi
 	dname=`pwd`
-	cd `dirname $0`
+	cd `dirname ${0}`
 	test_init
-	get_test_target $1
-	if [[ $1 = "ejb_all" || $1 = "ejb_group"* ]]; then
+	get_test_target ${1}
+	if [[ ${1} = "ejb_all" || ${1} = "ejb_group"* ]]; then
 		test_run_ejb
-	elif [[ $1 = "ejb_timer_cluster_all" ]]; then
+	elif [[ ${1} = "ejb_timer_cluster_all" ]]; then
 		test_run_ejb_timer_cluster
-	elif [[ $1 = "ejb_web_all" ]]; then
+	elif [[ ${1} = "ejb_web_all" ]]; then
 		test_run_ejb_web
 	else
 		echo "Invalid Test ID"
 		exit 1
 	fi
 	check_successful_run
-    generate_junit_report $1    
-    change_junit_report_class_names
+  generate_junit_report ${1}
+  change_junit_report_class_names
 }
 
-post_test_run(){
-    copy_test_artifects
-    upload_test_results
-    delete_bundle
-    cd ${dname}
-}
-
-
 list_test_ids(){
 	echo ejb_all ejb_timer_cluster_all ejb_web_all ejb_group_1 ejb_group_2 ejb_group_3
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
 
-case $OPT in
+case ${OPT} in
 	list_test_ids )
 		list_test_ids;;
 	run_test_id )
-		trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+		trap "copy_test_artifacts ${TEST_ID}" EXIT
+		run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml b/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml
index c0c4e11..c1a7c5d 100644
--- a/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml
+++ b/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml
@@ -385,7 +385,7 @@
               <jvmarg value="-Dderby.system.home=${env.S1AS_HOME}/databases"/>
           </java>
       </parallel>
-      <sleep seconds="5"/>
+      <sleep seconds="15"/>
    </target>
 
    <target name="stop-derby" depends="init-common">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh b/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh
index 9270c1b..c7a3fa0 100755
--- a/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh
@@ -20,52 +20,40 @@
 }
  
 test_run(){
-  $S1AS_HOME/bin/asadmin start-domain domain1
-  $S1AS_HOME/bin/asadmin start-database
-  cd $APS_HOME/devtests/jdbc
-  ant $TARGET | tee $TEST_RUN_LOG
-  $S1AS_HOME/bin/asadmin stop-domain domain1
-  $S1AS_HOME/bin/asadmin stop-database
+  ${S1AS_HOME}/bin/asadmin start-domain domain1
+  ${S1AS_HOME}/bin/asadmin start-database
+  cd ${APS_HOME}/devtests/jdbc
+  ant ${TARGET} | tee ${TEST_RUN_LOG}
+  ${S1AS_HOME}/bin/asadmin stop-domain domain1
+  ${S1AS_HOME}/bin/asadmin stop-database
 }
- 
 
 run_test_id(){
-  
-  source `dirname $0`/../../../common_test.sh
-  kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  get_test_target $1
- 
-  
+  get_test_target ${1}
   test_run
- 
   check_successful_run
-  generate_junit_report $1
+  generate_junit_report ${1}
   change_junit_report_class_names
-  copy_test_artifects
-  upload_test_results
-  delete_bundle
-  cd -
 }
  
 get_test_target(){
-	case $1 in
+	case ${1} in
 		jdbc_all )
 			TARGET=all
 			export TARGET;;
 	esac
-
 }
 
-OPT=$1
-TEST_ID=$2
-case $OPT in
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
-    run_test_id $TEST_ID ;;
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/jms/run_test.sh b/appserver/tests/appserv-tests/devtests/jms/run_test.sh
index 81ba098..1c8a643 100755
--- a/appserver/tests/appserv-tests/devtests/jms/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/jms/run_test.sh
@@ -20,48 +20,36 @@
 }
  
 test_run(){
-  cd $APS_HOME/devtests/jms
-  ant $TARGET | tee $TEST_RUN_LOG
+  cd ${APS_HOME}/devtests/jms
+  ant ${TARGET} | tee ${TEST_RUN_LOG}
 }
- 
 
 run_test_id(){
-  
-  source `dirname $0`/../../../common_test.sh
-  kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  get_test_target $1
- 
-  
+  get_test_target ${1}
   test_run
- 
   check_successful_run
-  generate_junit_report $1
+  generate_junit_report ${1}
   change_junit_report_class_names
-  copy_test_artifects
-  upload_test_results
-  delete_bundle
-  cd -
 }
  
 get_test_target(){
-	case $1 in
+	case ${1} in
 		jms_all )
 			TARGET=all
 			export TARGET;;
 	esac
-
 }
 
-OPT=$1
-TEST_ID=$2
-case $OPT in
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
     run_test_id $TEST_ID ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/naming/run_test.sh b/appserver/tests/appserv-tests/devtests/naming/run_test.sh
index d564909..8764419 100755
--- a/appserver/tests/appserv-tests/devtests/naming/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/naming/run_test.sh
@@ -20,9 +20,9 @@
 }
 
 test_run(){
-  $S1AS_HOME/bin/asadmin start-domain
-  $S1AS_HOME/bin/asadmin start-database
-  cd $APS_HOME/devtests/naming
+  ${S1AS_HOME}/bin/asadmin start-domain
+  ${S1AS_HOME}/bin/asadmin start-database
+  cd ${APS_HOME}/devtests/naming
   PROXY_HOST=`echo ${http_proxy} | cut -d':' -f2 | ${SED} 's/\/\///g'`
   PROXY_PORT=`echo ${http_proxy} | cut -d':' -f3 | ${SED} 's/\///g'`
   ANT_OPTS="${ANT_OPTS} \
@@ -34,49 +34,36 @@
   -Dhttps.noProxyHosts='127.0.0.1|localhost|*.oracle.com'"
   export ANT_OPTS
   echo "ANT_OPTS=${ANT_OPTS}"
-  ant $TARGET | tee $TEST_RUN_LOG
-  $S1AS_HOME/bin/asadmin stop-database
-  $S1AS_HOME/bin/asadmin stop-domain   
+  ant ${TARGET} | tee ${TEST_RUN_LOG}
+  ${S1AS_HOME}/bin/asadmin stop-database
+  ${S1AS_HOME}/bin/asadmin stop-domain
 }
 
 run_test_id(){
-  #a common util script located at main/appserver/tests/common_test.sh
-  source `dirname $0`/../../../common_test.sh
-  kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  get_test_target $1
-  #run the actual test function
+  get_test_target ${1}
   test_run
-  generate_junit_report $1
+  generate_junit_report ${1}
   change_junit_report_class_names
 }
 
-post_test_run(){
-  copy_test_artifects
-  upload_test_results
-  delete_bundle
-  cd -
-}
-
 get_test_target(){
 	case $1 in
 		naming_all )
 			TARGET=all
 			export TARGET;;
 	esac
-
 }
 
-OPT=$1
-TEST_ID=$2
-case $OPT in
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
-    trap post_test_run EXIT
-    run_test_id $TEST_ID ;;
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/persistence/run_test.sh b/appserver/tests/appserv-tests/devtests/persistence/run_test.sh
index 35283dd..e5c82f9 100755
--- a/appserver/tests/appserv-tests/devtests/persistence/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/persistence/run_test.sh
@@ -20,52 +20,40 @@
 }
 
 test_run(){
-  $S1AS_HOME/bin/asadmin start-domain
-  $S1AS_HOME/bin/asadmin start-database
-  cd $APS_HOME/devtests/persistence/tests/packaging
-  ant $TARGET | tee $TEST_RUN_LOG
-  $S1AS_HOME/bin/asadmin stop-database
-  $S1AS_HOME/bin/asadmin stop-domain   
+  ${S1AS_HOME}/bin/asadmin start-domain
+  ${S1AS_HOME}/bin/asadmin start-database
+  cd ${APS_HOME}/devtests/persistence/tests/packaging
+  ant ${TARGET} | tee ${TEST_RUN_LOG}
+  ${S1AS_HOME}/bin/asadmin stop-database
+  ${S1AS_HOME}/bin/asadmin stop-domain
 }
 
 run_test_id(){
-  #a common util script located at main/appserver/tests/common_test.sh
-  source `dirname $0`/../../../common_test.sh
-  kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  get_test_target $1
-  #run the actual test function
+  get_test_target ${1}
   test_run
   check_successful_run
-  generate_junit_report $1
+  generate_junit_report ${1}
   change_junit_report_class_names
 }
 
-post_test_run(){
-  copy_test_artifects
-  upload_test_results
-  delete_bundle
-  cd -
-}
-
 get_test_target(){
-	case $1 in
+	case ${1} in
 		persistence_all )
 			TARGET=all
 			export TARGET;;
 	esac
 }
 
-OPT=$1
-TEST_ID=$2
-case $OPT in
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
-    trap post_test_run EXIT
-    run_test_id $TEST_ID ;;
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/security/common.xml b/appserver/tests/appserv-tests/devtests/security/common.xml
index b6b3b4c..49d52b9 100644
--- a/appserver/tests/appserv-tests/devtests/security/common.xml
+++ b/appserver/tests/appserv-tests/devtests/security/common.xml
@@ -24,7 +24,10 @@
 <property name="mykeystore.db.file" value="${env.APS_HOME}/build/__keystore.jks"/>
 <property name="mytruststore.db.file" value="${env.APS_HOME}/build/__cacerts.jks"/>
 <property name="appserver.config.name" value="server-config"/>
-<property name="wsimport.VMARGS" value=""/>
+
+<condition property="wsimport.VMARGS" value="${env.WSIMPORT_OPTS}" else="">
+  <isset property="env.WSIMPORT_OPTS" />
+</condition>
 
 <target name="init-security-util" depends="gethostname">
 <!--    <ant dir="${env.APS_HOME}/devtests/security/util" target="all"/>
diff --git a/appserver/tests/appserv-tests/devtests/security/run_test.sh b/appserver/tests/appserv-tests/devtests/security/run_test.sh
index 3fbb1f0..ec1d398 100755
--- a/appserver/tests/appserv-tests/devtests/security/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/security/run_test.sh
@@ -17,78 +17,85 @@
 
 test_run(){
 
-	$S1AS_HOME/bin/asadmin start-database
-	$S1AS_HOME/bin/asadmin start-domain
-	pushd $APS_HOME/devtests/security	
-	rm count.txt || true
-  PROXY_HOST=`echo ${http_proxy} | cut -d':' -f2 | ${SED} 's/\/\///g'`
-  PROXY_PORT=`echo ${http_proxy} | cut -d':' -f3 | ${SED} 's/\///g'`
-  ANT_OPTS="${ANT_OPTS} \
-  -Dhttp.proxyHost=${PROXY_HOST} \
-  -Dhttp.proxyPort=${PROXY_PORT} \
-  -Dhttp.noProxyHosts='127.0.0.1|localhost|*.oracle.com' \
-  -Dhttps.proxyHost=${PROXY_HOST} \
-  -Dhttps.proxyPort=${PROXY_PORT} \
-  -Dhttps.noProxyHosts='127.0.0.1|localhost|*.oracle.com'"
-  export ANT_OPTS
-  echo "ANT_OPTS=${ANT_OPTS}"
-	ant $TARGET |tee $TEST_RUN_LOG
-  unset ANT_OPTS
+	#cp -f ${APS_HOME}/devtests/security/ldap/opends/X500Signer.jar ${OPENDS_HOME}/lib
 
-	$S1AS_HOME/bin/asadmin stop-domain
-	$S1AS_HOME/bin/asadmin stop-database
+	# Configure and start OpenDS using the default ports
+	${OPENDS_HOME}/setup \
+    -i \
+    -v \
+    -n \
+    -p 1389 \
+    --adminConnectorPort 4444 \
+    -x 1689 \
+    -w dmanager \
+    -b "dc=sfbay,dc=sun,dc=com" \
+    -Z 1636 \
+    --useJavaKeystore ${S1AS_HOME}/domains/domain1/config/keystore.jks \
+    -W changeit \
+    -N s1as
 
-	egrep 'FAILED= *0' count.txt
-	egrep 'DID NOT RUN= *0' count.txt
-	popd
+	${S1AS_HOME}/bin/asadmin start-database
+	${S1AS_HOME}/bin/asadmin start-domain
+	cd ${APS_HOME}/devtests/security
+
+	ant ${TARGET} | tee ${TEST_RUN_LOG}
+
+	${S1AS_HOME}/bin/asadmin stop-domain
+	${S1AS_HOME}/bin/asadmin stop-database
+	${OPENDS_HOME}/bin/stop-ds \
+    -p 4444 \
+    -D "cn=Directory Manager" \
+    -w dmanager \
+    -P ${OPENDS_HOME}/config/admin-truststore \
+    -U ${OPENDS_HOME}/config/admin-keystore.pin
+
+	#egrep 'FAILED= *0' ${TEST_RUN_LOG}
+	#egrep 'DID NOT RUN= *0' ${TEST_RUN_LOG}
+	cd -
 }
+
 get_test_target(){
 	case $1 in
 		security_all )
 			TARGET=all
 			export TARGET;;
 	esac
-
 }
 
 merge_result_files(){
-	cat $APS_HOME/test_resultsValid.xml $APS_HOME/security-gtest-results.xml > $APS_HOME/temp.xml
-	mv $APS_HOME/temp.xml $APS_HOME/test_resultsValid.xml 
+	cat ${APS_HOME}/test_resultsValid.xml ${APS_HOME}/security-gtest-results.xml > ${APS_HOME}/temp.xml
+	mv ${APS_HOME}/temp.xml ${APS_HOME}/test_resultsValid.xml
 }
 
 run_test_id(){
-	source `dirname $0`/../../../common_test.sh
-	kill_process
-	delete_gf
-	download_test_resources glassfish.zip tests-maven-repo.zip version-info.txt
-	unzip_test_resources $WORKSPACE/bundles/glassfish.zip "$WORKSPACE/bundles/tests-maven-repo.zip -d $WORKSPACE/repository"
-	cd `dirname $0`
+  # setup opendj (fork of opends)
+  curl -L -k https://github.com/OpenIdentityPlatform/OpenDJ/releases/download/4.1.10/opendj-4.1.10.zip > opendj-4.1.10.zip
+  unzip -o opendj-4.1.10.zip
+  export OPENDS_HOME=${PWD}/opendj
+
+	unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+	cd `dirname ${0}`
 	test_init
-	get_test_target $1
+	get_test_target ${1}
 	test_run
 	merge_result_files
 	check_successful_run
-    generate_junit_report $1
-    change_junit_report_class_names
-}
-post_test_run(){
-    copy_test_artifects
-    upload_test_results
-    delete_bundle
-    cd -
+  generate_junit_report ${1}
+  change_junit_report_class_names
 }
 
 list_test_ids(){
 	echo security_all
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../common_test.sh
 
-case $OPT in
+case ${OPT} in
 	list_test_ids )
 		list_test_ids;;
 	run_test_id )
-		trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+		trap "copy_test_artifacts ${TEST_ID}" EXIT
+		run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/transaction/ee/run_test.sh b/appserver/tests/appserv-tests/devtests/transaction/ee/run_test.sh
index 85fbf96..2a007c8 100755
--- a/appserver/tests/appserv-tests/devtests/transaction/ee/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/transaction/ee/run_test.sh
@@ -16,129 +16,118 @@
 #
 
 test_run(){
-	ADMIN_PORT=45707
-	JMS_PORT=45708
-	JMX_PORT=45709
-	ORB_PORT=45710
-	SSL_PORT=45711
-	INSTANCE_PORT=45712
-	INSTANCE_HTTPS_PORT=45718
-	INSTANCE_PORT_2=45719
-	INSTANCE_PORT_3=45720
-	ALTERNATE_PORT=45713
-	ORB_SSL_PORT=45714
-	ORB_SSL_MUTUALAUTH_PORT=45715
-	DB_PORT=45716
-	DB_PORT_2=45717
+  ADMIN_PORT=45707
+  JMS_PORT=45708
+  JMX_PORT=45709
+  ORB_PORT=45710
+  SSL_PORT=45711
+  INSTANCE_PORT=45712
+  INSTANCE_HTTPS_PORT=45718
+  INSTANCE_PORT_2=45719
+  INSTANCE_PORT_3=45720
+  ALTERNATE_PORT=45713
+  ORB_SSL_PORT=45714
+  ORB_SSL_MUTUALAUTH_PORT=45715
+  DB_PORT=45716
+  DB_PORT_2=45717
 
-	export ADMIN_PORT JMS_PORT JMX_PORT ORB_PORT SSL_PORT INSTANCE_PORT INSTANCE_HTTPS_PORT INSTANCE_PORT_2 INSTANCE_PORT INSTANCE_PORT_3 ALTERNATE_PORT ORB_SSL_PORT ORB_SSL_MUTUALAUTH_PORT DB_PORT DB_PORT_2
+  export ADMIN_PORT JMS_PORT JMX_PORT ORB_PORT SSL_PORT INSTANCE_PORT INSTANCE_HTTPS_PORT INSTANCE_PORT_2 INSTANCE_PORT INSTANCE_PORT_3 ALTERNATE_PORT ORB_SSL_PORT ORB_SSL_MUTUALAUTH_PORT DB_PORT DB_PORT_2
 
-	rm -rf $S1AS_HOME/domains/domain1
-	cd $APS_HOME
+  rm -rf $S1AS_HOME/domains/domain1
+  cd ${APS_HOME}
 
-	echo "AS_ADMIN_PASSWORD=" > temppwd
-	cat $APS_HOME/temppwd
-	$S1AS_HOME/bin/asadmin --user anonymous --passwordfile $APS_HOME/temppwd create-domain --adminport ${ADMIN_PORT} --domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} --instanceport ${INSTANCE_PORT} domain1
+  echo "AS_ADMIN_PASSWORD=" > temppwd
+  cat ${APS_HOME}/temppwd
+  ${S1AS_HOME}/bin/asadmin \
+    --user anonymous \
+    --passwordfile $APS_HOME/temppwd \
+    create-domain \
+      --adminport ${ADMIN_PORT} \
+      --domainproperties jms.port=${JMS_PORT}:domain.jmxPort=${JMX_PORT}:orb.listener.port=${ORB_PORT}:http.ssl.port=${SSL_PORT}:orb.ssl.port=${ORB_SSL_PORT}:orb.mutualauth.port=${ORB_SSL_MUTUALAUTH_PORT} \
+      --instanceport ${INSTANCE_PORT} \
+      domain1
 
-	#Create 
-	echo "admin.domain=domain1
-	admin.domain.dir=\${env.S1AS_HOME}/domains
-	admin.port=${ADMIN_PORT}
-	admin.user=anonymous
-	admin.host=localhost
-	http.port=${INSTANCE_PORT}
-	https.port=${SSL_PORT}
-	http.host=localhost
-	http.address=127.0.0.1
-	http.alternate.port=${ALTERNATE_PORT}
-	orb.port=${ORB_PORT}
-	admin.password=
-	ssl.password=changeit
-	master.password=changeit
-	admin.password.file=\${env.APS_HOME}/config/adminpassword.txt
-	appserver.instance.name=server
-	config.dottedname.prefix=server
-	resources.dottedname.prefix=domain.resources
-	results.mailhost=localhost
-	results.mailer=QLTestsForPEInstallOrDASInEEInstall@sun.com
-	results.mailee=yourname@sun.com
-	autodeploy.dir=\${env.S1AS_HOME}/domains/\${admin.domain}/autodeploy
-	precompilejsp=true
-	jvm.maxpermsize=192m
-	appserver.instance.dir=\${admin.domain.dir}/\${admin.domain}" > config.properties
+  # Create
+  echo "admin.domain=domain1
+  admin.domain.dir=\${env.S1AS_HOME}/domains
+  admin.port=${ADMIN_PORT}
+  admin.user=anonymous
+  admin.host=localhost
+  http.port=${INSTANCE_PORT}
+  https.port=${SSL_PORT}
+  http.host=localhost
+  http.address=127.0.0.1
+  http.alternate.port=${ALTERNATE_PORT}
+  orb.port=${ORB_PORT}
+  admin.password=
+  ssl.password=changeit
+  master.password=changeit
+  admin.password.file=\${env.APS_HOME}/config/adminpassword.txt
+  appserver.instance.name=server
+  config.dottedname.prefix=server
+  resources.dottedname.prefix=domain.resources
+  results.mailhost=localhost
+  results.mailer=QLTestsForPEInstallOrDASInEEInstall@sun.com
+  results.mailee=yourname@sun.com
+  autodeploy.dir=\${env.S1AS_HOME}/domains/\${admin.domain}/autodeploy
+  precompilejsp=true
+  jvm.maxpermsize=192m
+  appserver.instance.dir=\${admin.domain.dir}/\${admin.domain}" > config.properties
 
-	(jps |grep Main |cut -f1 -d" " | xargs kill -9  > /dev/null 2>&1) || true
+  (jps |grep Main |cut -f1 -d" " | xargs kill -9  > /dev/null 2>&1) || true
 
-	cd $S1AS_HOME/domains/domain1/config/
-	sed "s/1527/${DB_PORT}/g" domain.xml > domain.xml.replaced
-	mv domain.xml.replaced domain.xml
-	grep PortNumber domain.xml
+  cd ${S1AS_HOME}/domains/domain1/config/
+  sed "s/1527/${DB_PORT}/g" domain.xml > domain.xml.replaced
+  mv domain.xml.replaced domain.xml
+  grep PortNumber domain.xml
 
-	cd $APS_HOME/config
-	(rm derby.properties.replaced  > /dev/null 2>&1) || true
-	sed "s/1527/${DB_PORT}/g" derby.properties > derby.properties.replaced
-	rm derby.properties
-	sed "s/1528/${DB_PORT_2}/g" derby.properties.replaced > derby.properties
-	cat derby.properties
+  cd ${APS_HOME}/config
+  (rm derby.properties.replaced  > /dev/null 2>&1) || true
+  sed "s/1527/${DB_PORT}/g" derby.properties > derby.properties.replaced
+  rm derby.properties
+  sed "s/1528/${DB_PORT_2}/g" derby.properties.replaced > derby.properties
+  cat derby.properties
 
-	cd $APS_HOME/devtests/transaction/ee
+  cd ${APS_HOME}/devtests/transaction/ee
 
-	ant -Dsave.logs=true $TARGET | tee $TEST_RUN_LOG
-
-
-	ant dev-report
+  ant -Dsave.logs=true ${TARGET} | tee ${TEST_RUN_LOG}
+  ant dev-report
 }
 
 list_test_ids(){
-    echo transaction_ee_all transaction-ee-1 transaction-ee-2 transaction-ee-3 transaction-ee-4
+  echo transaction_ee_all transaction-ee-1 transaction-ee-2 transaction-ee-3 transaction-ee-4
 }
 
 get_test_target(){
-	case $1 in
-		transaction_ee_all )
-			TARGET=all
-			export TARGET;;
-                * )
-                        TARGET=$1
-                        export TARGET;;
-	esac
-
+  case $1 in
+    transaction_ee_all )
+      TARGET=all
+      export TARGET;;
+    * )
+      TARGET=$1
+      export TARGET;;
+  esac
 }
 
 run_test_id(){
-	source `dirname $0`/../../../../common_test.sh
-	kill_process
-	delete_gf
-	download_test_resources glassfish.zip version-info.txt
-	unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-	cd `dirname $0`
-	test_init
-	get_test_target $1
-	test_run
-	check_successful_run
-    generate_junit_report $1
-    change_junit_report_class_names
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
+  test_init
+  get_test_target ${1}
+  test_run
+  check_successful_run
+  generate_junit_report ${1}
+  change_junit_report_class_names
 }
 
-post_test_run(){
-    copy_test_artifects
-    upload_test_results
-    delete_bundle
-    cd -
-}
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../../../../common_test.sh
 
-OPT=$1
-TEST_ID=$2
-
-case $OPT in
-	list_test_ids )
-		list_test_ids;;
-	run_test_id )
-		trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+case ${OPT} in
+  list_test_ids )
+    list_test_ids;;
+  run_test_id )
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
- 
-
-
-
-
diff --git a/appserver/tests/appserv-tests/devtests/web/AJP-3_1_x.skip b/appserver/tests/appserv-tests/devtests/web/AJP-3_1_x.skip
deleted file mode 100644
index ea49a18..0000000
--- a/appserver/tests/appserv-tests/devtests/web/AJP-3_1_x.skip
+++ /dev/null
@@ -1,17 +0,0 @@
-accessLoggingBadRequests # apache consumes these so glassfish never sees them
-defaultKeepAlive # apache settings will interfere here
-dosSlowClient # apache settings will interfere here
-keepAlive # apache settings will interfere here
-keepAliveTimeout # apache settings will interfere here
-headerBufferFull # AJP only supports packets up to 8192 bytes and doesn't support sending multiple headers packets
-maxKeepAliveRequests # apache settings will interfere here
-virtualServerDefaultWebModuleReconfig # this removes the AJP setting
-
-singleengine # comment out until https://glassfish.dev.java.net/issues/show_bug.cgi?id=7548 is fixed
-cometEcho # Grizzly 2.1
-portUnification # Grizzly 2.1
-portUnificationTarget # Grizzly 2.1
-wrongTransport # Grizzly 2.1
-wrongTransportTarget # Grizzly 2.1
-virtualServerAlternateDocrootRestart # Grizzly 2.1
-programmaticLogin # different class in the trunk
diff --git a/appserver/tests/appserv-tests/devtests/web/Grizzly_2_x_Integration.skip b/appserver/tests/appserv-tests/devtests/web/Grizzly_2_x_Integration.skip
deleted file mode 100644
index c15a572..0000000
--- a/appserver/tests/appserv-tests/devtests/web/Grizzly_2_x_Integration.skip
+++ /dev/null
@@ -1,9 +0,0 @@
-cometEcho  #  until we can integrate the grizzly 2.0 changes to the glassfish trunk
-httpListenerAdminReconfig
-portUnification
-portUnificationTarget
-wrongTransport
-wrongTransportTarget
-ha/ssoFailover
-networkListenerTarget
-asadminDeletesTarget
diff --git a/appserver/tests/appserv-tests/devtests/web/Grizzly_Integration.skip b/appserver/tests/appserv-tests/devtests/web/Grizzly_Integration.skip
deleted file mode 100644
index 08d00ed..0000000
--- a/appserver/tests/appserv-tests/devtests/web/Grizzly_Integration.skip
+++ /dev/null
@@ -1 +0,0 @@
-singleengine # comment out until https://glassfish.dev.java.net/issues/show_bug.cgi?id=7548 is fixed
diff --git a/appserver/tests/appserv-tests/devtests/web/build.xml b/appserver/tests/appserv-tests/devtests/web/build.xml
index 385e8ef..a3a1ddc 100644
--- a/appserver/tests/appserv-tests/devtests/web/build.xml
+++ b/appserver/tests/appserv-tests/devtests/web/build.xml
@@ -373,7 +373,8 @@
         <ant dir="formHintFieldPostWithQueryParamPrecedence" target="all"/>
         <ant dir="formHintFieldPrecedence" target="all"/>
         <ant dir="httpListenerDynamicConfig" target="all"/>
-        <ant dir="instanceHttpPortDynamicReconfig" target="all"/>
+        <!-- investigate random failures -->
+        <!-- <ant dir="instanceHttpPortDynamicReconfig" target="all"/> -->
         <ant dir="invokerServletDisabled" target="all"/>
         <ant dir="jmxUndeployEvent" target="all"/>
         <ant dir="jrouteIdInCookieOrURL" target="all"/>
@@ -593,9 +594,6 @@
         <antcall target="dev-report"/>
 
         <echo message="Detailed results available under appserv-tests/test_result.html"/>
-        <echo message="#################################################"/>
-        <echo message="javaxServletErrorRequestUriDynamicResource and javaxServletErrorRequestUriStaticResource will fail on Linux if you don't change appserv-tests/config.properties localhost to localhost.localdomain"/>
-        <echo message="#################################################"/>
     </target>
 
     <target name="all" depends="init,init-report,comet,el,http-connector,jsp,security,servlet,taglib,web-container,weblogicDD,clustering,ha,misc,finish-report"/>
diff --git a/appserver/tests/appserv-tests/devtests/web/exclude-jobs.sh b/appserver/tests/appserv-tests/devtests/web/exclude-jobs.sh
deleted file mode 100755
index 49926c3..0000000
--- a/appserver/tests/appserv-tests/devtests/web/exclude-jobs.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0, which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# This Source Code may also be made available under the following Secondary
-# Licenses when the conditions for such availability set forth in the
-# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-# version 2 with the GNU Classpath Exception, which is available at
-# https://www.gnu.org/software/classpath/license.html.
-#
-# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-#
-
-
-skip() {
-    FILE=$1
-    echo Parsing ${FILE}
-    cat ${FILE} | while read LINE
-    do
-        NAME=`echo $LINE | sed -e 's/[# ].*//'`
-        if [ -d "${NAME}" ]
-        then
-            echo excluding \"${NAME}\"
-            sed -e "s@^ *<ant dir=\"${NAME}\" target=\"all\"/>@<!--&-->@" build.xml > build.xml.sed
-            mv build.xml.sed build.xml
-        else
-            if [ ! -z "${NAME}" ]
-            then
-                echo "***** ${NAME} is not a valid test directory *****"
-            fi
-        fi
-    done
-}
-
-echo start
-if [ "x$1" = "x" ]; then
-    SKIP_NAME=${JOB_NAME}
-else
-    SKIP_NAME=$1
-fi
-
-if [ -z "${SKIP_NAME}" -o "$SKIP_NAME" = "webtier-dev-tests-v3-source" ]
-then
-    SKIP_NAME=webtier-dev-tests-v3
-fi
-
-if [ -f "${SKIP_NAME}.skip" ]
-then
-    skip ${SKIP_NAME}.skip
-fi
-
diff --git a/appserver/tests/appserv-tests/devtests/web/formHintFieldPostWithQueryParam/docroot/a.jsp b/appserver/tests/appserv-tests/devtests/web/formHintFieldPostWithQueryParam/docroot/a.jsp
index 1a48bbd..c8bb110 100644
--- a/appserver/tests/appserv-tests/devtests/web/formHintFieldPostWithQueryParam/docroot/a.jsp
+++ b/appserver/tests/appserv-tests/devtests/web/formHintFieldPostWithQueryParam/docroot/a.jsp
@@ -16,4 +16,4 @@
 
 --%>
 
-<%out.println(request.getCharacterEncoding());%>
+<%out.println(request.getCharacterEncoding());%>
\ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriDynamicResource/WebTest.java b/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriDynamicResource/WebTest.java
index 14122fb..89433a7 100644
--- a/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriDynamicResource/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriDynamicResource/WebTest.java
@@ -57,11 +57,11 @@
             stat.addStatus(TEST_NAME, stat.FAIL);
             ex.printStackTrace();
         }
-	stat.printSummary();
+        stat.printSummary();
     }
 
     public void doTest() throws Exception {
-     
+ 
         Socket sock = new Socket(host, new Integer(port).intValue());
         OutputStream os = sock.getOutputStream();
         String get = "GET " + contextRoot + "/junk.jsp HTTP/1.0\n";
@@ -81,23 +81,28 @@
             }
         }
 
-        if (line != null
-                && ((line = bis.readLine()) != null)
-                && line.equals("404")
-                && ((line = bis.readLine()) != null)
-                && line.equals(contextRoot + "/404handler.jsp")
-                && ((line = bis.readLine()) != null)
-                && (
-                    line.equals("http://" + host + ":" + port
-                               + contextRoot + "/404handler.jsp") ||
-                    line.equals("http://" + 
-                                InetAddress.getLocalHost().getHostName() + 
-                                ":" + port + contextRoot + "/404handler.jsp") 
-                               )) {
-            stat.addStatus(TEST_NAME, stat.PASS);
-        } else {
-            stat.addStatus(TEST_NAME, stat.FAIL);
-        }
-    }
+        if(line != null){
+            String status = bis.readLine();
+            System.out.println("status: " + status);
+            if(status != null && "404".equals(status)){
 
+                String requestURI = bis.readLine();
+                System.out.println("requestURI: " + requestURI);
+
+                if(requestURI != null
+                    && requestURI.equals(contextRoot + "/404handler.jsp")){
+
+                    String requestURL = bis.readLine();
+                    System.out.println("requestURL: " + requestURL);
+
+                    if(requestURL.equals("http://" + host + ":" + port + contextRoot + "/404handler.jsp")
+                        || requestURL.equals("http://" +  InetAddress.getLocalHost().getHostName() +  ":" + port + contextRoot + "/404handler.jsp")){
+                        stat.addStatus(TEST_NAME, stat.PASS);
+                        return;
+                    }
+                }
+            }
+        }
+        stat.addStatus(TEST_NAME, stat.FAIL);
+    }
 }
diff --git a/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriStaticResource/WebTest.java b/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriStaticResource/WebTest.java
index 40ad711..1b2cb3d 100644
--- a/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriStaticResource/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/javaxServletErrorRequestUriStaticResource/WebTest.java
@@ -72,7 +72,7 @@
     }
 
     public void doTest() throws Exception {
-     
+
         sock = new Socket(host, new Integer(port).intValue());
         OutputStream os = sock.getOutputStream();
         String get = "GET " + contextRoot + "/junk HTTP/1.0\n";
diff --git a/appserver/tests/appserv-tests/devtests/web/mail.xml b/appserver/tests/appserv-tests/devtests/web/mail.xml
deleted file mode 100644
index f9f4cd9..0000000
--- a/appserver/tests/appserv-tests/devtests/web/mail.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
-    Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
-
-    This program and the accompanying materials are made available under the
-    terms of the Eclipse Public License v. 2.0, which is available at
-    http://www.eclipse.org/legal/epl-2.0.
-
-    This Source Code may also be made available under the following Secondary
-    Licenses when the conditions for such availability set forth in the
-    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-    version 2 with the GNU Classpath Exception, which is available at
-    https://www.gnu.org/software/classpath/license.html.
-
-    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<!DOCTYPE project [
-<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
-<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
-<!ENTITY reporting SYSTEM "file:./../../config/report.xml">
-]>
-
-<project name="mail" default="mail" basedir=".">
-    &commonSetup;
-    &commonBuild;
-    &reporting;
-
-    <target name="mail" depends="init-common">
-        <mail from="${results.mailer}" tolist="${results.mailee}"
-            subject="Test results for WebContainer dev tests"
-            mailhost="ha21sca-mail1.sfbay.sun.com"
-            message="Quick Look test results...">                
-
-        <fileset dir="${env.APS_HOME}"  
-                includes="count.txt,test_results.html"/>
-        </mail>
-    </target>
-</project>
diff --git a/appserver/tests/appserv-tests/devtests/web/run_test.sh b/appserver/tests/appserv-tests/devtests/web/run_test.sh
index e30de9a..b2ba2ee 100755
--- a/appserver/tests/appserv-tests/devtests/web/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/web/run_test.sh
@@ -15,260 +15,156 @@
 # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 #
 
-#u
-# Usage: appserv-tests/devtests/web/hudson.sh [-d <url for download glassfish>]
-#     [-d <directory for storing glassfish.zip>] [ -s <job name for skip file>]
-#
-# Hudson setup:
-#
-# Source Code Management: Subversion Modules
-# Repository URL: https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/devtests/web
-# Local module directory: appserv-tests/devtests/web
-# Repository URL: https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/lib
-# Local module directory: appserv-tests/lib
-# Repository URL: https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/config
-# Local module directory: appserv-tests/config
-# Repository URL: https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/util
-# Local module directory: appserv-tests/util
-#
-# Build after other projects are build: mirror-glassfish-repository
-#
-# The following TCP ports are assigned by Hudson to avoid collision
-#   WEBTIER_ADMIN_PORT 
-#   WEBTIER_JMS_PORT
-#   WEBTIER_JMX_PORT 
-#   WEBTIER_ORB_PORT
-#   WEBTIER_HTTP_PORT
-#   WEBTIER_HTTPS_PORT
-#   WEBTIER_ALTERNATE_PORT
-#   WEBTIER_ORB_SSL_PORT
-#   WEBTIER_ORB_SSL_MUTUALAUTH_PORT
-#   WEBTIER_INSTANCE_PORT
-#   WEBTIER_INSTANCE_PORT_2
-#   WEBTIER_INSTANCE_PORT_3
-#   WEBTIER_INSTANCE_HTTPS_PORT
-#
-# If the script is used locally, WORKSPACE need to be defined as the parent of appserv-tests.
-# And GlassFish will be installed in $WORKSPACE.
-#
-# Record finderprints of files to track usage: glassfish-v3-image/glassfish.zip
-#     Fingerprint all archived artifacts
-#
-# Archive the artifacts: appserv-tests/test_results*.*,glassfish-v3-image/glassfish5/glassfish/domains/domain1/logs/*
-#
-# Publish SQE test result report
-#     SQE report XMLs: appserv-tests/test_resultsValid.xml
-#
-# E-mail Notification
-#     Recipients: <....>@oracle.com
-#     Send e-mail for every unstable build
-
 kill_processes() {
-    uname=`uname | awk '{print $1}'`
-    case "$uname" in
-        CYGWIN*) KILL="taskkill /F /T /PID";;
-        *) KILL="kill -9";;
-    esac
-
-    (ps -aef | grep java | grep ASMain | grep -v grep | awk '{print $2}' | xargs $KILL > /dev/null 2>&1) || true
-    (jps | grep Main | grep -v grep | awk '{print $1}' | xargs $KILL > /dev/null 2>&1) || true
-    (ps -aef | grep derby | grep -v grep | awk '{print $2}' | xargs $KILL > /dev/null 2>&1) || true
+  (ps -aef | grep java | grep ASMain | grep -v grep | awk '{print $2}' | xargs kill -9 > /dev/null 2>&1) || true
+  (jps | grep Main | grep -v grep | awk '{print $1}' | xargs kill -9 > /dev/null 2>&1) || true
+  (ps -aef | grep derby | grep -v grep | awk '{print $2}' | xargs kill -9 > /dev/null 2>&1) || true
 }
 
 is_target(){
-    case "$1" in
-        "jsp" | \
-        "taglib" | \
-        "el" | \
-        "servlet" | \
-        "web-container" | \
-        "security" | \
-        "http-connector" | \
-        "comet" | \
-        "misc" | \
-        "weblogicDD" | \
-        "clustering" | \
-        "ha" | \
-        "embedded-all" | \
-        "group-1" | \
-        "all") echo 1;;
-        *) echo 0;;
-    esac
+  case "${1}" in
+    "jsp" | \
+    "taglib" | \
+    "el" | \
+    "servlet" | \
+    "web-container" | \
+    "security" | \
+    "http-connector" | \
+    "comet" | \
+    "misc" | \
+    "weblogicDD" | \
+    "clustering" | \
+    "ha" | \
+    "embedded-all" | \
+    "group-1" | \
+    "all") echo 1;;
+    *) echo 0;;
+  esac
 }
 
 get_test_target(){
-	case $1 in
-		web_all )
-			TARGET=all
-			export TARGET;;
-
-		group-1 )
-			TARGET="init taglib el security http-connector comet misc clustering ha finish-report"
-			export TARGET;;
-		* )
-			TARGET="init $1 finish-report"
-			export TARGET;;
-	esac
-
+  case ${1} in
+    web_all )
+      TARGET=all
+      export TARGET;;
+    group-1 )
+      TARGET="init taglib el security http-connector comet misc clustering ha finish-report"
+      export TARGET;;
+    * )
+      TARGET="init $1 finish-report"
+      export TARGET;;
+  esac
 }
 
 
 test_run(){
-	export WEBTIER_ADMIN_PORT=45707
-	export WEBTIER_JMS_PORT=45708
-	export WEBTIER_JMX_PORT=45709
-	export WEBTIER_ORB_PORT=45710
-	export WEBTIER_HTTP_PORT=45711
-	export WEBTIER_HTTPS_PORT=45712
-	export WEBTIER_ALTERNATE_PORT=45713
-	export WEBTIER_ORB_SSL_PORT=45714
-	export WEBTIER_ORB_SSL_MUTUALAUTH_PORT=45715
-	export WEBTIER_INSTANCE_PORT=45716
-	export WEBTIER_INSTANCE_PORT_2=45717
-	export WEBTIER_INSTANCE_PORT_3=45718
-	export WEBTIER_INSTANCE_HTTPS_PORT=45719
+  export WEBTIER_ADMIN_PORT=45707
+  export WEBTIER_JMS_PORT=45708
+  export WEBTIER_JMX_PORT=45709
+  export WEBTIER_ORB_PORT=45710
+  export WEBTIER_HTTP_PORT=45711
+  export WEBTIER_HTTPS_PORT=45712
+  export WEBTIER_ALTERNATE_PORT=45713
+  export WEBTIER_ORB_SSL_PORT=45714
+  export WEBTIER_ORB_SSL_MUTUALAUTH_PORT=45715
+  export WEBTIER_INSTANCE_PORT=45716
+  export WEBTIER_INSTANCE_PORT_2=45717
+  export WEBTIER_INSTANCE_PORT_3=45718
+  export WEBTIER_INSTANCE_HTTPS_PORT=45719
 
-    while getopts u:s:d:t: flag; do
-        case $flag in
-            u)
-                download=1;
-                if [ "x$OPTARG" != "x" ]; then
-                    GLASSFISH_DOWNLOAD_URL=$OPTARG;
-                fi
-                ;;
-            s)
-                SKIP_NAME=$OPTARG;
-                ;;
-            d) 
-                DOWNLOAD_DIR=$OPTARG
-                ;;
-            t)
-                TARGET=$OPTARG
-                if [ `is_target $TARGET` -eq 0 ] ;  then
-                   echo "Unknown target" 
-                   exit
-                elif [ "$TARGET" != "all" ] ; then
-                    TARGET="$TARGET finish-report"
-                fi
-                ;;
-            \?)
-                echo "Illegal options"
-                exit
-                ;;
-        esac
-    done
-    shift $(( OPTIND - 1 ));
+  export AS_LOGFILE=${S1AS_HOME}/cli.log
+  #export AS_DEBUG=true
 
+  #Copy over the modified run.xml for dumping thread stack
+  #cp ../../run.xml $PWD/appserv-tests/config
 
-    if [ "x$download" = "x1" ]; then
-        cd $DOWNLOAD_DIR
-        curl -O glassfish.zip $GLASSFISH_DOWNLOAD_URL
-    fi
+  rm -rf ${S1AS_HOME}/domains/domain1
+  cd ${APS_HOME}
 
-    export AS_LOGFILE=$S1AS_HOME/cli.log 
-    #export AS_DEBUG=true 
+  echo "AS_ADMIN_PASSWORD=" > temppwd
+  ${S1AS_HOME}/bin/asadmin \
+    --user admin \
+    --passwordfile ${APS_HOME}/config/adminpassword.txt \
+    create-domain \
+      --adminport ${WEBTIER_ADMIN_PORT} \
+      --domainproperties jms.port=${WEBTIER_JMS_PORT}:domain.jmxPort=${WEBTIER_JMX_PORT}:orb.listener.port=${WEBTIER_ORB_PORT}:http.ssl.port=${WEBTIER_HTTPS_PORT}:orb.ssl.port=${WEBTIER_ORB_SSL_PORT}:orb.mutualauth.port=${WEBTIER_ORB_SSL_MUTUALAUTH_PORT} \
+      --instanceport ${WEBTIER_HTTP_PORT} \
+      domain1
 
-    #Copy over the modified run.xml for dumping thread stack
-    #cp ../../run.xml $PWD/appserv-tests/config
+  HOST="localhost"
 
-	rm -rf $S1AS_HOME/domains/domain1
-    cd $APS_HOME
+  # Create
+  echo "admin.domain=domain1
+  admin.domain.dir=\${env.S1AS_HOME}/domains
+  admin.port=${WEBTIER_ADMIN_PORT}
+  admin.user=admin
+  admin.host=${HOST}
+  http.port=${WEBTIER_HTTP_PORT}
+  https.port=${WEBTIER_HTTPS_PORT}
+  http.host=${HOST}
+  http.address=127.0.0.1
+  http.alternate.port=${WEBTIER_ALTERNATE_PORT}
+  orb.port=${WEBTIER_ORB_PORT}
+  admin.password=
+  ssl.password=changeit
+  master.password=changeit
+  admin.password.file=\${env.APS_HOME}/config/adminpassword.txt
+  appserver.instance.name=server
+  config.dottedname.prefix=server
+  resources.dottedname.prefix=domain.resources
+  results.mailhost=${HOST}
+  results.mailer=QLTestsForPEInstallOrDASInEEInstall@sun.com
+  results.mailee=yourname@sun.com
+  autodeploy.dir=\${env.S1AS_HOME}/domains/\${admin.domain}/autodeploy
+  precompilejsp=true
+  jvm.maxpermsize=192m
+  ENABLE_REPLICATION=false
+  appserver.instance.dir=\${admin.domain.dir}/\${admin.domain}
+  cluster.name=clusterA
+  instance.name=inst1
+  instance.name.2=inst2
+  instance.name.3=inst3
+  instance.http.port=${WEBTIER_INSTANCE_PORT}
+  instance.https.port=${WEBTIER_INSTANCE_HTTPS_PORT}
+  instance.http.port.2=${WEBTIER_INSTANCE_PORT_2}
+  instance.http.port.3=${WEBTIER_INSTANCE_PORT_3}
+  nodeagent.name=localhost-domain1
+  " > config.properties
 
-    echo "AS_ADMIN_PASSWORD=" > temppwd
-    $S1AS_HOME/bin/asadmin --user admin --passwordfile $APS_HOME/config/adminpassword.txt create-domain --adminport ${WEBTIER_ADMIN_PORT} --domainproperties jms.port=${WEBTIER_JMS_PORT}:domain.jmxPort=${WEBTIER_JMX_PORT}:orb.listener.port=${WEBTIER_ORB_PORT}:http.ssl.port=${WEBTIER_HTTPS_PORT}:orb.ssl.port=${WEBTIER_ORB_SSL_PORT}:orb.mutualauth.port=${WEBTIER_ORB_SSL_MUTUALAUTH_PORT} --instanceport ${WEBTIER_HTTP_PORT} domain1
+  kill_processes
 
-    if [ `uname | grep -n  'Linux' | wc -l` -eq 1 ] ; then
-        HOST="localhost.localdomain"
-    else
-        HOST="localhost"
-    fi
+  cd ${APS_HOME}/devtests/web
+  ant ${TARGET} | tee ${TEST_RUN_LOG}
 
-    #Create 
-    echo "admin.domain=domain1
-    admin.domain.dir=\${env.S1AS_HOME}/domains
-    admin.port=${WEBTIER_ADMIN_PORT}
-    admin.user=admin
-    admin.host=$HOST
-    http.port=${WEBTIER_HTTP_PORT}
-    https.port=${WEBTIER_HTTPS_PORT}
-    http.host=$HOST
-    http.address=127.0.0.1
-    http.alternate.port=${WEBTIER_ALTERNATE_PORT}
-    orb.port=${WEBTIER_ORB_PORT}
-    admin.password=
-    ssl.password=changeit
-    master.password=changeit
-    admin.password.file=\${env.APS_HOME}/config/adminpassword.txt
-    appserver.instance.name=server
-    config.dottedname.prefix=server
-    resources.dottedname.prefix=domain.resources
-    results.mailhost=$HOST
-    results.mailer=QLTestsForPEInstallOrDASInEEInstall@sun.com
-    results.mailee=yourname@sun.com
-    autodeploy.dir=\${env.S1AS_HOME}/domains/\${admin.domain}/autodeploy
-    precompilejsp=true
-    jvm.maxpermsize=192m
-    ENABLE_REPLICATION=false
-    appserver.instance.dir=\${admin.domain.dir}/\${admin.domain}
-    cluster.name=clusterA
-    instance.name=inst1
-    instance.name.2=inst2
-    instance.name.3=inst3
-    instance.http.port=${WEBTIER_INSTANCE_PORT}
-    instance.https.port=${WEBTIER_INSTANCE_HTTPS_PORT}
-    instance.http.port.2=${WEBTIER_INSTANCE_PORT_2}
-    instance.http.port.3=${WEBTIER_INSTANCE_PORT_3}
-    nodeagent.name=localhost-domain1
-    " > config.properties
-
-    kill_processes
-
-    cd $APS_HOME/devtests/web
-    cp build.xml build.xml.orig
-    ./exclude-jobs.sh $SKIP_NAME
-
-    ant $TARGET |tee $TEST_RUN_LOG
-
-    #restore original build.xml 
-    mv build.xml.orig build.xml
-
-    kill_processes
-    (cat web.output | grep FAIL | grep -v "Total FAIL") || true
+  kill_processes
+  (cat web.output | grep FAIL | grep -v "Total FAIL") || true
 }
 
 run_test_id(){
-	source `dirname $0`/../../../common_test.sh
-	kill_process
-	delete_gf
-	download_test_resources glassfish.zip version-info.txt
-	unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-	cd `dirname $0`
-	test_init
-        TARGET_FROM_INPUT=(`echo $1 | sed 's/web_//'`)
-	get_test_target $TARGET_FROM_INPUT
-	test_run -s webtier-dev-tests
-	check_successful_run
-    generate_junit_report $TARGET_FROM_INPUT
-    change_junit_report_class_names
+  cat /etc/hosts
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
+  test_init
+  TARGET_FROM_INPUT=(`echo $1 | sed 's/web_//'`)
+  get_test_target ${TARGET_FROM_INPUT}
+  test_run
+  check_successful_run
+  generate_junit_report ${TARGET_FROM_INPUT}
+  change_junit_report_class_names
 }
 
 list_test_ids(){
-    echo web_all web_jsp web_servlet web_web-container web_group-1
-}
-post_test_run(){
-    copy_test_artifects
-    upload_test_results
-    delete_bundle
-    cd -
+  echo web_all web_jsp web_servlet web_web-container web_group-1
 }
 
 OPT=$1
 TEST_ID=$2
+source `dirname $0`/../../../common_test.sh
 
 case $OPT in
-    list_test_ids )
-        list_test_ids;;
-    run_test_id )
-        trap post_test_run EXIT
-        run_test_id $TEST_ID ;;
+  list_test_ids )
+    list_test_ids;;
+  run_test_id )
+    trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id $TEST_ID ;;
 esac
diff --git a/appserver/tests/appserv-tests/devtests/web/serverRedirectWithQueryString/WebTest.java b/appserver/tests/appserv-tests/devtests/web/serverRedirectWithQueryString/WebTest.java
index e5d6cf9..df10b1c 100644
--- a/appserver/tests/appserv-tests/devtests/web/serverRedirectWithQueryString/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/serverRedirectWithQueryString/WebTest.java
@@ -65,8 +65,8 @@
         
         String expectedRedirectLocation = "Location: http://" + host + ":"
             + port + contextRoot + "/?" + QUERY_STRING;
-        String expectedRedirectLocation2 = "Location: http://" + InetAddress.getLocalHost().getHostName() + ":"
-            + port + contextRoot + "/?" + QUERY_STRING;
+
+        System.out.println("serverRedirectWithQueryString - expectedRedirectLocation=" + expectedRedirectLocation);
 
         Socket sock = new Socket(host, new Integer(port).intValue());
         OutputStream os = sock.getOutputStream();
@@ -83,7 +83,7 @@
             bis = new BufferedReader(new InputStreamReader(is));
             while ((line = bis.readLine()) != null) {
                 System.out.println("Line : " + line);
-                if (expectedRedirectLocation.equals(line) || expectedRedirectLocation2.equals(line)) {
+                if (expectedRedirectLocation.equals(line)) {
                     break;
                 }
             }
diff --git a/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingMode/WebTest.java b/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingMode/WebTest.java
index 1c30287..3196c54 100644
--- a/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingMode/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingMode/WebTest.java
@@ -99,9 +99,6 @@
         }
 
         String redirectTo = redirectLine.substring(index);
-        if (redirectTo.indexOf(".") != -1){
-            redirectTo = redirectTo.replace("localhost.localdomain","localhost");
-        }   
         System.out.println("Redirect to: " + redirectTo);
         URL url = new URL(redirectTo);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
diff --git a/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeCustomCookieName/WebTest.java b/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeCustomCookieName/WebTest.java
index e84bef4..c8553a5 100644
--- a/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeCustomCookieName/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeCustomCookieName/WebTest.java
@@ -103,10 +103,6 @@
         }
 
         String redirectTo = redirectLine.substring(index);
-        if (redirectTo.indexOf(".") != -1){
-            redirectTo = redirectTo.replace("localhost.localdomain",
-                "localhost");
-        }   
         System.out.println("Redirect to: " + redirectTo);
         URL url = new URL(redirectTo);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
diff --git a/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java b/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java
index 3c3e09b..7fa0d6c 100644
--- a/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/servlet-3.0/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java
@@ -99,9 +99,6 @@
         }
 
         String redirectTo = redirectLine.substring(index);
-        if (redirectTo.indexOf(".") != -1){
-            redirectTo = redirectTo.replace("localhost.localdomain","localhost");
-        }   
         System.out.println("Redirect to: " + redirectTo);
         URL url = new URL(redirectTo);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
diff --git a/appserver/tests/appserv-tests/devtests/web/sessionIdUrlRewrite/WebTest.java b/appserver/tests/appserv-tests/devtests/web/sessionIdUrlRewrite/WebTest.java
index d3adc0c..91dd8b6 100644
--- a/appserver/tests/appserv-tests/devtests/web/sessionIdUrlRewrite/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/sessionIdUrlRewrite/WebTest.java
@@ -100,10 +100,6 @@
         }
 
         String redirectTo = redirectLine.substring(index);
-        if (redirectTo.indexOf(".") != -1){
-            redirectTo = redirectTo.replace("localhost.localdomain",
-                                            "localhost");
-        }   
         System.out.println("Redirect to: " + redirectTo);
         URL url = new URL(redirectTo);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
diff --git a/appserver/tests/appserv-tests/devtests/web/sessionPropertyEnableCookiesInstanceLevel/WebTest.java b/appserver/tests/appserv-tests/devtests/web/sessionPropertyEnableCookiesInstanceLevel/WebTest.java
index af7f4da..a9f6858 100644
--- a/appserver/tests/appserv-tests/devtests/web/sessionPropertyEnableCookiesInstanceLevel/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/sessionPropertyEnableCookiesInstanceLevel/WebTest.java
@@ -149,9 +149,6 @@
         }
 
         String redirectTo = redirectLine.substring(index);
-        if (redirectTo.indexOf(".") != -1){
-            redirectTo = redirectTo.replace("localhost.localdomain","localhost");
-        }   
         System.out.println("Redirect to: " + redirectTo);
         URL url = new URL(redirectTo);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
diff --git a/appserver/tests/appserv-tests/devtests/web/useBundledJsfWithTagCompilation/.gitignore b/appserver/tests/appserv-tests/devtests/web/useBundledJsfWithTagCompilation/.gitignore
new file mode 100644
index 0000000..d0369fa
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/web/useBundledJsfWithTagCompilation/.gitignore
@@ -0,0 +1 @@
+jsf-cardemo.war
diff --git a/appserver/tests/appserv-tests/devtests/web/useBundledJsfWithTagCompilation/build.xml b/appserver/tests/appserv-tests/devtests/web/useBundledJsfWithTagCompilation/build.xml
index 937639b..4649b45 100644
--- a/appserver/tests/appserv-tests/devtests/web/useBundledJsfWithTagCompilation/build.xml
+++ b/appserver/tests/appserv-tests/devtests/web/useBundledJsfWithTagCompilation/build.xml
@@ -45,6 +45,9 @@
     </target>
 
     <target name="deploy" depends="init-common">
+      <get
+        src="http://repo1.maven.org/maven2/com/sun/faces/extensions/jsf-cardemo/0.2/jsf-cardemo-0.2.war"
+        dest="jsf-cardemo.war"/>
       <antcall target="deploy-war-name"/>
     </target>
     
diff --git a/appserver/tests/appserv-tests/devtests/web/virtualServerDefaultWebModuleRequestPath/servlet/CheckRequestPath.java b/appserver/tests/appserv-tests/devtests/web/virtualServerDefaultWebModuleRequestPath/servlet/CheckRequestPath.java
index 776ef42..b415661 100644
--- a/appserver/tests/appserv-tests/devtests/web/virtualServerDefaultWebModuleRequestPath/servlet/CheckRequestPath.java
+++ b/appserver/tests/appserv-tests/devtests/web/virtualServerDefaultWebModuleRequestPath/servlet/CheckRequestPath.java
@@ -47,6 +47,10 @@
             throw new ServletException();
         }
 
+        System.out.println("CheckRequestPath: "
+            + String.format("host=%s, port=%d, expectedRequestURI=%s, expectedRequestURL=%s, expectedCtxtRoot=%s, req.getContextPath=%s, req.getRequestURL=%s, req.getRequestURI=%s",
+                host, port, expectedRequestURI, expectedRequestURL, expectedCtxtRoot, req.getContextPath(), req.getRequestURL().toString(), req.getRequestURI()));
+
         if (!expectedCtxtRoot.equals(req.getContextPath()) ||
                 !expectedRequestURL.equals(req.getRequestURL().toString()) ||
                 !expectedRequestURI.equals(req.getRequestURI())) {
diff --git a/appserver/tests/appserv-tests/devtests/web/web-devtests-4.0.skip b/appserver/tests/appserv-tests/devtests/web/web-devtests-4.0.skip
deleted file mode 100644
index b47849f..0000000
--- a/appserver/tests/appserv-tests/devtests/web/web-devtests-4.0.skip
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0, which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# This Source Code may also be made available under the following Secondary
-# Licenses when the conditions for such availability set forth in the
-# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-# version 2 with the GNU Classpath Exception, which is available at
-# https://www.gnu.org/software/classpath/license.html.
-#
-# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-#
-
-
-# Add skip tests here for 4.0
diff --git a/appserver/tests/appserv-tests/devtests/web/weblogicDD/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java b/appserver/tests/appserv-tests/devtests/web/weblogicDD/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java
index fe677e2..4c34510 100644
--- a/appserver/tests/appserv-tests/devtests/web/weblogicDD/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java
+++ b/appserver/tests/appserv-tests/devtests/web/weblogicDD/sessionIdUrlRewriteSessionTrackingModeDeclarative/WebTest.java
@@ -102,9 +102,6 @@
         if (redirectTo.indexOf("MYJSESSIONID=") == -1) {
             throw new Exception("Missing MYJSESSIONID in the Location response header");
         }
-        if (redirectTo.indexOf(".") != -1){
-            redirectTo = redirectTo.replace("localhost.localdomain","localhost");
-        }
         System.out.println("Redirect to: " + redirectTo);
         URL url = new URL(redirectTo);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-4.0.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-4.0.skip
deleted file mode 100644
index b47849f..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-4.0.skip
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0, which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# This Source Code may also be made available under the following Secondary
-# Licenses when the conditions for such availability set forth in the
-# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-# version 2 with the GNU Classpath Exception, which is available at
-# https://www.gnu.org/software/classpath/license.html.
-#
-# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-#
-
-
-# Add skip tests here for 4.0
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-bg.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-bg.skip
deleted file mode 100644
index e69de29..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-bg.skip
+++ /dev/null
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-embedded-3.1.2.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-embedded-3.1.2.skip
deleted file mode 100644
index 528aa81..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-embedded-3.1.2.skip
+++ /dev/null
@@ -1,189 +0,0 @@
-asadminDeletes # test uses BaseDevTest
-defaultContentType # test uses BaseDevTest
-fileDownloadTimeout # test uses BaseDevTest
-httpCompression # test uses BaseDevTest
-portUnification # test uses BaseDevTest
-servlet-3.0/servletContainerInitializer/sharedLibWithWars # comment out until https://glassfish.dev.java.net/issues/show_bug.cgi?id=12091 is fixed
-sslServerName # test uses BaseDevTest
-wrongTransport # test uses BaseDevTest
-# these tests use asadmin create-network-listener, create-virtual-server and embedded ant tasks need special handling
-httpListenerDynamicConfig
-listenerDisabled
-networkListenerDynamicConfig
-networkListenerDynamicConfigEnabled
-networkListenerTarget  
-reconfigDefaultWebModule
-v3HttpListenerDynamicConfig
-virtualServerChangeHttpListenerWebappNoLongerAccessible
-virtualServerCreateUpperCaseDeployExclusive
-virtualServerDefaultWebModuleReconfig
-virtualServerDynamicConfig
-virtualServerModifyHttpListenerPortAccessWebapp
-virtualServerStateDynamicReconfig
-virtualServerTarget
-virtualServerUpdateHostsDynamicReconfig
-virtualServerUpdateHttpListenersDynamicReconfig
-pipelineQueueFull # this test hangs in embedded
-# These tests are not applicable to embedded as they use network-config.protocols, network-config.network-listeners, server.web-container
-authPassthroughGetRemoteAddress
-authPassthroughGetRemoteHost
-authPassthroughGetScheme
-authPassthroughRequestIsSecure
-authPassthroughSendRedirectFromJspWithHttpsServer
-authPassthroughSendRedirectFromJspWithHttpsServerName
-authPassthroughSendRedirectHostRequestHeaderWithoutPort
-authPassthroughSendRedirectWithHttpsServerName
-chunkingDisabled
-cometEcho
-defaultResponseType
-dosSlowClient
-formLoginTransportGuaranteeConfidential
-headerBufferSize
-httpConnectorKeepAlive
-httpListenerAdminReconfig
-keepAliveTimeout
-keepAliveTimeoutSSL
-multiProcessorConfig
-maxKeepAliveRequests
-proxyAuthCert
-proxyKeysize
-redirectPort
-redirectPortLoadBalancer
-requestDispatcherMaxDepth
-servletSSLRequestAttributes
-sessionIdCustomGenerator
-sessionPropertyEnableCookiesInstanceLevel
-ssl
-sslClientAuthUnprotectedResourceGetClientCert
-sslCookie
-sslMultiSelector
-threadPoolIdleTimeout
-traceEnabled
-virtualServerChangeHttpListenerWebappNoLongerAccessible
-virtualServerModifyHttpListenerPortAccessWebapp
-weldJsfLoginPage
-servlet-3.0/transportProtectedAnnotation
-# these tests rely on $S1AS_HOME directory whereas embedded uses gfembed*
-accessLoggingBadRequests
-accessLoggingDynamicReconfig
-accessLoggingWriteIntervalSeconds
-classloaderGetResourcesDelegateFalse
-commonsLoggingLocalAndGlobal
-contextPathXmlConfig
-contextXmlConfig
-delegate
-elBigDecimal
-genDocSchema
-jrouteIdInCookieOrURL
-jspPrecompileConsiderDomainLibJarFilesAndClasses
-jspPrecompileDeployDashDashLibraries
-jspReloadGeneratedServletIfUpdated
-jspRuntimeCompileConsiderDomainLibJarFilesAndClasses
-jspRuntimeDeployDashDashLibraries
-servletContextAttributeEventAttributeRemoved
-servletRequestGetPathInfoGetPathTranslated
-sessionIdCustomGenerator
-sessionWithoutCookie
-virtualServerAlternateDocroot
-virtualServerAlternateDocrootDynamicReconfig
-virtualServerLogFile
-virtualServerSendErrorProperty
-virtualServerWithCustomValves
-webappAlternateDocroot
-webappDeployDashDashLibraries
-weldJsfServerAuthModuleRedirect
-servlet-3.0/servletContainerInitializer/sharedLibWithWars
-servlet-3.0/servletContainerInitializer/sharedLibWithEAR
-servlet-3.0/servletContainerInitializer/sharedLibWithInterfaceImplementation
-sessionWithoutCookie
-allowEncodedSlash
-programmaticLogin
-virtualServerWithCustomErrorReportValve
-# not applicable to embedded
-index
-# monitoring is not supported in embedded
-monitorHttpService
-monitorServletInstance
-monitorWebRequest
-# admin.port not supported in embedded
-singleengine
-httpResponseErrorMessage # Need Grizzly integration and a change in GlassFish for custom error message header
-instanceHttpPortDynamicReconfig # create-instance
-#create-user-common
-changeSessionIdOnAuthentication
-form-based
-formLoginAccessSessionOnResumedRequest
-formLoginJSecurityCheckDirectAccess
-ha/ssoFailover
-jsp-security
-programmaticLogin
-servlet-3.0/authAnnotations
-servlet-3.0/webFragmentWithLoginConfigOverrided
-servlet-3.0/webFragmentWithLoginConfig
-servlet-3.0/transportProtectedAnnotation
-servlet-3.0/loginLogout
-servlet-3.0/authAnnotationInheritance
-servlet-3.0/servletContextCreateServletWithServletSecurity
-servlet-3.0/xmlOverrideAuthAnnotations
-sessionDestroyedDuringUndeploy
-singleSignOnCookieHttpOnly
-singleSignOnCookieSecure
-singleSignOnHttpServiceDynamicReconfig
-testFormAuthenticator
-virtualServerAuthRealmProperty
-virtualServerDefaultWebModuleFormLoginJSecurityCheckDirectAccess
-weldJsfFormLoginHttpSessionListener
-#ear not supported web distro
-jspCustomTaglibJarInsideEarWithManifestClassPath
-jspCustomTaglibJarInsideEarWithoutManifestClassPath
-servlet-3.0/asyncContextDispatchCrossContext
-crossContextDispatchLongestContextRootMatch
-log4jXmlInEarFile
-virtualServerEarWrappedDefaultWebModuleRestart
-#jsf
-jsfWithBundledOneDotOneJarFiles
-servlet-3.0/servletContainerInitializer/jsfManagedBeanAnnotation
-servletRequestGetPathInfoGetPathTranslated
-weldJsfFormLoginHttpSessionListener
-weldJsfLoginPage
-weldJsfServerAuthModuleRedirect
-#javax.jms
-#javax.ejb
-servlet-3.0/webFragmentWithEjbLite
-#
-emptyServletPathJspInclude
-jspCachingInstanceLevel
-servletRequestGetPathInfoCollapseContiguousSlashes
-sessionJvmRoute
-sessionMemoryPersist
-sessionMemoryPersistPrimitiveClass
-sessionSerializeOnShutdownOnly
-useBundledJsf
-useBundledJsfWithTagCompilation
-virtualServerAlternateDocrootWelcomePageRedirect
-virtualServerAlternateDocrootDynamicReconfig
-virtualServerRedirectPropertyNoSubstringMatch
-virtualServerRedirectPropertyUrl
-virtualServerRedirectPropertyUrlPrefix
-virtualServerDocrootDynamicReconfig
-webappAlternateDocrootTagFile
-webappLoaderConsiderHiddenJarFiles
-webdavCopyDelete
-welcomePageExtensionMatch
-oneSessionCookieHeader
-cacheHang
-jsessionIdParameter
-setWebContextParam
-jspTagHandlerPreDestroyAnnotation
-broken_webapp
-virtualServerDefaultWebModuleRequestPath
-multiServletRequests
-wrongTransportTarget # Grizzly 2.1
-virtualServerAlternateDocrootRestart # Grizzly 2.1
-programmaticLogin # different class in the trunk
-testFormAuthenticator # need Grizzly 2.x
-contextXmlLifecycleListener # trunk
-contextXmlLifecycleListenerGlobal # trunk
-contextXmlRemoteHostValve #trunk
-traceEnabled #trunk
-osgiServlet 
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-embedded.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-embedded.skip
deleted file mode 100644
index 3ba33d3..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-embedded.skip
+++ /dev/null
@@ -1,98 +0,0 @@
-asadminDeletes # test uses BaseDevTest
-defaultContentType # test uses BaseDevTest
-fileDownloadTimeout # test uses BaseDevTest
-httpCompression # test uses BaseDevTest
-portUnification # test uses BaseDevTest
-servlet-3.0/servletContainerInitializer/sharedLibWithWars # comment out until https://glassfish.dev.java.net/issues/show_bug.cgi?id=12091 is fixed
-sslServerName # test uses BaseDevTest
-wrongTransport # test uses BaseDevTest
-# these tests use asadmin create-network-listener, create-virtual-server and embedded ant tasks need special handling
-httpListenerDynamicConfig
-listenerDisabled
-networkListenerDynamicConfig
-networkListenerDynamicConfigEnabled
-networkListenerTarget  
-reconfigDefaultWebModule
-v3HttpListenerDynamicConfig
-virtualServerChangeHttpListenerWebappNoLongerAccessible
-virtualServerCreateUpperCaseDeployExclusive
-virtualServerDefaultWebModuleReconfig
-virtualServerDynamicConfig
-virtualServerModifyHttpListenerPortAccessWebapp
-virtualServerStateDynamicReconfig
-virtualServerTarget
-virtualServerUpdateHostsDynamicReconfig
-virtualServerUpdateHttpListenersDynamicReconfig
-pipelineQueueFull # this test hangs in embedded
-# These tests are not applicable to embedded as they use network-config.protocols, network-config.network-listeners, server.web-container
-authPassthroughGetRemoteAddress
-authPassthroughGetRemoteHost
-authPassthroughGetScheme
-authPassthroughRequestIsSecure
-authPassthroughSendRedirectFromJspWithHttpsServer
-authPassthroughSendRedirectFromJspWithHttpsServerName
-authPassthroughSendRedirectHostRequestHeaderWithoutPort
-authPassthroughSendRedirectWithHttpsServerName
-chunkingDisabled
-cometEcho
-defaultResponseType
-dosSlowClient
-formLoginTransportGuaranteeConfidential
-headerBufferSize
-httpConnectorKeepAlive
-httpListenerAdminReconfig
-keepAliveTimeout
-keepAliveTimeoutSSL
-multiProcessorConfig
-maxKeepAliveRequests
-proxyAuthCert
-proxyKeysize
-redirectPort
-redirectPortLoadBalancer
-requestDispatcherMaxDepth
-servletSSLRequestAttributes
-sessionIdCustomGenerator
-sessionPropertyEnableCookiesInstanceLevel
-ssl
-sslClientAuthUnprotectedResourceGetClientCert
-sslCookie
-sslMultiSelector
-threadPoolIdleTimeout
-traceEnabled
-virtualServerChangeHttpListenerWebappNoLongerAccessible
-virtualServerModifyHttpListenerPortAccessWebapp
-weldJsfLoginPage
-servlet-3.0/transportProtectedAnnotation
-# these tests rely on $S1AS_HOME directory whereas embedded uses gfembed*
-accessLoggingDynamicReconfig
-classloaderGetResourcesDelegateFalse
-commonsLoggingLocalAndGlobal
-contextPathXmlConfig
-contextXmlConfig
-delegate
-jspPrecompileConsiderDomainLibJarFilesAndClasses
-jspPrecompileDeployDashDashLibraries
-jspReloadGeneratedServletIfUpdated
-jspRuntimeCompileConsiderDomainLibJarFilesAndClasses
-jspRuntimeDeployDashDashLibraries
-servletContextAttributeEventAttributeRemoved
-servletRequestGetPathInfoGetPathTranslated
-virtualServerSendErrorProperty
-virtualServerWithCustomValves
-webappAlternateDocroot
-webappDeployDashDashLibraries
-servlet-3.0/servletContainerInitializer/sharedLibWithWars
-servlet-3.0/servletContainerInitializer/sharedLibWithEAR
-servlet-3.0/servletContainerInitializer/sharedLibWithInterfaceImplementation
-# not applicable to embedded
-index
-# monitoring is not supported in embedded
-monitorHttpService
-monitorServletInstance
-monitorWebRequest
-# admin.port not supported in embedded
-singleengine
-httpResponseErrorMessage # Need Grizzly integration and a change in GlassFish for custom error message header
-programmaticLogin
-instanceHttpPortDynamicReconfig
-osgiServlet
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-mod-jk.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-mod-jk.skip
deleted file mode 100644
index ee45bdc..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-mod-jk.skip
+++ /dev/null
@@ -1,46 +0,0 @@
-cometEcho
-defaultContentType
-defaultKeepAlive
-defaultResponseType
-dosBrokenPost
-dosSlowClient
-headerBufferFull
-httpCompression
-keepAliveTimeout
-redirectPort
-wrongTransport
-trailerHeader
-authPassthroughGetRemoteHost
-formLoginTransportGuaranteeConfidential
-servlet-3.0/transportProtectedAnnotation
-traceEnabled
-contentlength
-getRequestURI
-javaxServletErrorRequestUriDynamicResource
-javaxServletErrorRequestUriStaticResource
-multiBytePOSTFormHintField
-multibyteValue
-requestDispatcherForwardCommitResponse
-requestDispatcherForwardSendErrorCommitResponse
-requestDispatcherForwardSetStatusCommitResponse
-responseErrorMessageEncoding
-servlet-3.1/nonBlockingOutput
-servlet-3.1/nonBlockingInput
-servlet-3.1/nonBlockingInputWithAsyncDispatch
-servlet-3.1/upgradeEcho
-servlet-3.1/resetCharacterEncoding
-accessLoggingBadRequests
-formHintFieldPostWithQueryParam
-httpListenerDynamicConfig
-instanceHttpPortDynamicReconfig
-pipelineQueueFull
-serverRedirectWithQueryString
-virtualServerChangeHttpListenerWebappNoLongerAccessible
-virtualServerCreateUpperCaseDeployExclusive
-virtualServerDefaultWebModuleRequestPath
-virtualServerModifyHttpListenerPortAccessWebapp
-virtualServerSendErrorProperty
-virtualServerStateDynamicReconfig
-virtualServerWithCustomErrorReportValve
-weldJsfLoginPage
-weldJsfFormLoginHttpSessionListener
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-trunk.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-trunk.skip
deleted file mode 100644
index e69de29..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-trunk.skip
+++ /dev/null
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.0.1.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.0.1.skip
deleted file mode 100644
index 5c9ad55..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.0.1.skip
+++ /dev/null
@@ -1,14 +0,0 @@
-allowEncodedSlash
-classPathManifestAttribute
-classPathManifestAttributePrecompile
-explodedWar
-filterMultipleInit
-portUnification # skip until the next grizzly integration so GF code can be committed
-servlet-3.0/asyncContextSetTimeout # comment out until https://grizzly.dev.java.net/issues/show_bug.cgi?id=825 is fixed
-servlet-3.0/asyncListenerOnTimeout # comment out until https://grizzly.dev.java.net/issues/show_bug.cgi?id=825 is fixed
-servlet-3.0/asyncTimeoutNoListener # comment out until https://grizzly.dev.java.net/issues/show_bug.cgi?id=825 is fixed
-servlet-3.0/serveJspAndStaticResourceFromLocalJar
-servlet-3.0/servletContainerInitializer/sharedLibWithWars # comment out until https://glassfish.dev.java.net/issues/show_bug.cgi?id=12091 is fixed
-sessionPreserveAcrossRedeployDeclarative
-sessionWithCookiePersistenceType
-wrongTransport #Exclude since port unification is not supported in v3, see IT 4675
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.1.1.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.1.1.skip
deleted file mode 100644
index b3dcbb5..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.1.1.skip
+++ /dev/null
@@ -1,9 +0,0 @@
-singleengine # comment out until https://glassfish.dev.java.net/issues/show_bug.cgi?id=7548 is fixed
-cometEcho # Grizzly 2.1
-portUnification # Grizzly 2.1
-portUnificationTarget # Grizzly 2.1
-wrongTransport # Grizzly 2.1
-wrongTransportTarget # Grizzly 2.1
-virtualServerAlternateDocrootRestart # Grizzly 2.1
-programmaticLogin # different class in the trunk
-virtualServerWithCustomErrorReportValve # IT 17093
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.1.2.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.1.2.skip
deleted file mode 100644
index d6332c2..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.1.2.skip
+++ /dev/null
@@ -1,13 +0,0 @@
-singleengine # comment out until https://glassfish.dev.java.net/issues/show_bug.cgi?id=7548 is fixed
-cometEcho # Grizzly 2.1
-portUnification # Grizzly 2.1
-portUnificationTarget # Grizzly 2.1
-wrongTransport # Grizzly 2.1
-wrongTransportTarget # Grizzly 2.1
-virtualServerAlternateDocrootRestart # Grizzly 2.1
-programmaticLogin # different class in the trunk
-testFormAuthenticator # need Grizzly 2.x
-contextXmlLifecycleListener # trunk
-contextXmlLifecycleListenerGlobal # trunk	
-contextXmlRemoteHostValve #trunk
-traceEnabled # trunk
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.skip
deleted file mode 100644
index e69de29..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests-v3.skip
+++ /dev/null
diff --git a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests.skip b/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests.skip
deleted file mode 100644
index 0d8288b..0000000
--- a/appserver/tests/appserv-tests/devtests/web/webtier-dev-tests.skip
+++ /dev/null
@@ -1 +0,0 @@
-instanceHttpPortDynamicReconfig #investigate random failures
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService.wsdl
index 8255f23..6e3f389 100644
--- a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService.wsdl
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService.wsdl
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 201, 2018 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
     terms of the Eclipse Public License v. 2.0, which is available at
@@ -17,6 +17,7 @@
 
 -->
 
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
   <types>
     <xsd:schema>
       <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
@@ -41,7 +42,7 @@
   </binding>
   <service name="CalculatorService">
     <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
-      <soap:address location="http://localhost.localdomain:8080/calc-web-client/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+      <soap:address location="http://localhost:8080/calc-web-client/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
     </port>
   </service>
 </definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService.wsdl
index 3dd399d..43879bc 100644
--- a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService.wsdl
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/OneWay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/OneWay" name="OneWayService">
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
     Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
@@ -17,6 +17,7 @@
 
 -->
 
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/OneWay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/OneWay" name="OneWayService">
   <types>
     <xsd:schema>
       <xsd:import namespace="http://example.web.service/OneWay" schemaLocation="OneWayService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
@@ -41,7 +42,7 @@
   </binding>
   <service name="OneWayService">
     <port name="OneWayPort" binding="tns:OneWayPortBinding">
-      <soap:address location="http://localhost.localdomain:8080/calc-web-client/webservice/OneWayService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+      <soap:address location="http://localhost:8080/calc-web-client/webservice/OneWayService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
     </port>
   </service>
 </definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/run_test.sh b/appserver/tests/appserv-tests/devtests/webservice/run_test.sh
index 033e879..7f1e505 100755
--- a/appserver/tests/appserv-tests/devtests/webservice/run_test.sh
+++ b/appserver/tests/appserv-tests/devtests/webservice/run_test.sh
@@ -20,51 +20,44 @@
 }
 
 test_run(){
-  $S1AS_HOME/bin/asadmin start-domain
-  cd $APS_HOME/devtests/webservice
-  ant $TARGET | tee $TEST_RUN_LOG
-  $S1AS_HOME/bin/asadmin stop-domain   
+  ${S1AS_HOME}/bin/asadmin start-domain
+  cd ${APS_HOME}/devtests/webservice
+  ant ${TARGET} | tee ${TEST_RUN_LOG}
+  ${S1AS_HOME}/bin/asadmin stop-domain
 }
 
 run_test_id(){
-  #a common util script located at main/appserver/tests/common_test.sh
-  source `dirname $0`/../../../common_test.sh
+  source `dirname ${0}`/../../../common_test.sh
   kill_process
-  delete_gf
-  download_test_resources glassfish.zip version-info.txt
-  unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-  cd `dirname $0`
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  cd `dirname ${0}`
   test_init
-  get_test_target $1
-  #run the actual test function
+  get_test_target ${1}
   test_run
   check_successful_run
-  generate_junit_report $1
+  generate_junit_report ${1}
   change_junit_report_class_names
 }
 
 post_test_run(){
-  copy_test_artifects
-  upload_test_results
-  delete_bundle
+  copy_test_artifacts ${TEST_ID}
   cd -
 }
 
 get_test_target(){
-	case $1 in
+	case ${1} in
 		webservice_all )
 			TARGET=all
 			export TARGET;;
 	esac
-
 }
 
-OPT=$1
-TEST_ID=$2
-case $OPT in
+OPT=${1}
+TEST_ID=${2}
+case ${OPT} in
   list_test_ids )
     list_test_ids;;
   run_test_id )
     trap post_test_run EXIT
-    run_test_id $TEST_ID ;;
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/common_test.sh b/appserver/tests/common_test.sh
index 1076d39..a069c35 100755
--- a/appserver/tests/common_test.sh
+++ b/appserver/tests/common_test.sh
@@ -15,7 +15,6 @@
 # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 #
 
-
 # OS-specific section
 if [ `uname | grep -i "sunos" | wc -l | awk '{print $1}'` -eq 1 ] ; then
   GREP="ggrep"
@@ -32,179 +31,135 @@
 export GREP AWK SED BC
 
 kill_clean(){
-    if [ ${#1} -ne 0 ]
-    then
-        kill -9 ${1} || true
-    fi
+  if [ ${#1} -ne 0 ] ; then kill -9 ${1} || true ; fi
 }
 
 kill_process(){
-	printf "\n%s \n\n" "===== KILL THEM ALL ====="
-    kill_clean `jps | grep ASMain | awk '{print $1}'`
-    kill_clean `jps | grep DerbyControl | awk '{print $1}'`
-    kill_clean `jps | grep DirectoryServer | awk '{print $1}'`
+  printf "\n%s \n\n" "===== KILL THEM ALL ====="
+  kill_clean `jps | grep ASMain | awk '{print $1}'`
+  kill_clean `jps | grep DerbyControl | awk '{print $1}'`
+  kill_clean `jps | grep DirectoryServer | awk '{print $1}'`
 }
+
 test_init(){
-	printf "\n%s \n\n" "===== V2 DEV TESTS INIT ====="
-	S1AS_HOME=$WORKSPACE/glassfish5/glassfish; export S1AS_HOME
-	APS_HOME=$WORKSPACE/main/appserver/tests/appserv-tests; export APS_HOME
-	TEST_RUN_LOG=tests-run.log; export TEST_RUN_LOG
-  export M2_HOME=$MAVEN_3_0_3
-        #workaround for OSGI timestamp issue
-        find $S1AS_HOME -type f | xargs touch > /dev/null
-	echo S1AS_HOME is $S1AS_HOME
-	echo ANT_HOME is $ANT_HOME
-  echo M2_HOME is $M2_HOME
-	echo APS_HOME is $APS_HOME
-	PATH=$M2_HOME/bin:$ANT_HOME/bin:$PATH; export PATH
-	java -version
-	ant -version
-	rm -rf $WORKSPACE/results
-	mkdir -p $WORKSPACE/results/junitreports
-}
-
-ql_init(){
-	printf "\n%s \n\n" "===== QUICK LOOK INIT ====="
-	export M2_HOME=$MAVEN_3_0_3
-	export PATH=$MAVEN_3_0_3/bin:$JAVA_HOME/bin:/usr/bin:/usr/local/bin:/usr/home/java_re/bin:$PATH
-	TEST_RUN_LOG=tests-run.log; export TEST_RUN_LOG
-	java -version
-	mvn -version
-	rm -rf $WORKSPACE/results
-	mkdir -p $WORKSPACE/results/junitreports
-}
-
-download_test_resources(){
-	printf "\n%s \n\n" "===== DOWNLOAD TEST RESOURCES ====="
-	for i in "$@"; do
-		echo downloading $i
-		scp -o "StrictHostKeyChecking no" ${PARENT_NODE}:${PARENT_WS_PATH}/bundles/$i bundles
-	done
+  printf "\n%s \n\n" "===== V2 DEVTESTS INIT ====="
+  # workaround for OSGI timestamp issue
+  find ${S1AS_HOME} -type f | xargs touch > /dev/null
+  echo S1AS_HOME is ${S1AS_HOME}
+  echo ANT_HOME is ${ANT_HOME}
+  echo APS_HOME is ${APS_HOME}
+  java -version
+  ant -version
+  mkdir -p ${WORKSPACE}/results/junitreports
 }
 
 zip_test_results(){
-	printf "\n%s \n\n" "===== ZIP THE TESTS RESULTS ====="
-    zip -r $WORKSPACE/results.zip $WORKSPACE/results > /dev/nul
-}
-
-upload_test_results(){
-	printf "\n%s \n\n" "===== UPLOADING THE TESTS RESULTS ====="
-	scp -o "StrictHostKeyChecking no" -r $WORKSPACE/results/ ${PARENT_NODE}:${PARENT_WS_PATH}/test-results/$TEST_ID/
+  printf "\n%s \n\n" "===== ZIP THE TESTS RESULTS ====="
+  zip -r ${WORKSPACE}/results.zip ${WORKSPACE}/results > /dev/nul
 }
 
 unzip_test_resources(){
-	printf "\n%s \n\n" "===== UNZIP TEST RESOURCES ====="
-	for i in "$@"; do
-		unzip $i > /dev/null
-	done
+  printf "\n%s \n\n" "===== UNZIP TEST RESOURCES ====="
+  for i in "${@}"; do
+    if [[ ${i} == *.zip* ]]; then
+      unzip -o ${i}
+    else
+      tar --overwrite -xf ${i}
+    fi
+  done
 }
 
-
-copy_test_artifects(){
-	printf "\n%s \n\n" "===== COPY TEST ARTIFECTs ====="
-        zip -r $WORKSPACE/results/domainArchive.zip $S1AS_HOME/domains
-	cp $S1AS_HOME/domains/domain1/logs/server.log* $WORKSPACE/results/ || true
-	cp $TEST_RUN_LOG $WORKSPACE/results/
-	cp $WORKSPACE/bundles/version-info.txt $WORKSPACE/results/
-	cp $APS_HOME/test_results*.* $WORKSPACE/results/ || true
-	cp `pwd`/*/*logs.zip $WORKSPACE/results/ || true
-	cp `pwd`/*/*/*logs.zip $WORKSPACE/results/ || true
+copy_test_artifacts(){
+  printf "\n%s \n\n" "===== COPY TEST ARTIFACTS ====="
+  mkdir -p ${WORKSPACE}/results/junitreports
+  tar -cvf ${WORKSPACE}/results/domainArchive.tar.gz ${S1AS_HOME}/domains
+  cp ${S1AS_HOME}/domains/domain1/logs/server.log* ${WORKSPACE}/results/ || true
+  cp ${TEST_RUN_LOG} ${WORKSPACE}/results/
+  cp ${APS_HOME}/test_results*.* ${WORKSPACE}/results/ || true
+  cp `pwd`/*/*logs.zip ${WORKSPACE}/results/ || true
+  cp `pwd`/*/*/*logs.zip ${WORKSPACE}/results/ || true
+  tar -cvf ${WORKSPACE}/${1}-results.tar.gz ${WORKSPACE}/results
 }
 
-
 generate_junit_report(){
-	printf "\n%s \n\n" "===== GENERATE JUNIT REPORT ====="
-	TD=$APS_HOME/test_resultsValid.xml
-	JUD=$APS_HOME/test_results_junit.xml
-	TESTSUITE_NAME=$1
+  printf "\n%s \n\n" "===== GENERATE JUNIT REPORT ====="
+  TD=${APS_HOME}/test_resultsValid.xml
+  JUD=${APS_HOME}/test_results_junit.xml
+  TESTSUITE_NAME=${1}
 
-	cat ${TD} | ${AWK} -v suitename=${TESTSUITE_NAME} '
-	  BEGIN {
-	    totaltests = 0;
-	    totalfailures = 0;
-	    totalerrors = 0;
-	  }
-	  function getPropVal(str){
-	    split(str, a, "=");
-	    val = a[2];
-	    # remove quotes
-	    gsub("\"","",val);
-	    return val;
-	  }
-	   function removeXMLTag(str){  
-	    # remove xml tag quotes
-	    gsub("</.*>","",str);
-	    gsub("<.*>","",str);
-	    gsub(">","",str);
-	    return str;
-	  }
-	  /status value=/ {
-	    result=getPropVal($0);
-	    result=removeXMLTag(result);
-	  }
-	  /<testsuite>/ {
-	    getline;
-	    getline;
-	    testunit=removeXMLTag($0);
-	    gsub("\"","",testunit);
-	  }
-	  /<testcase>/ {
-	    getline;
-	    testname=removeXMLTag($0);
-	    gsub("\"","",testname);
-	  }
-	  /<\/testcase>/{
-	    classname=testunit
-	    # printing testcase to out
-	    out = out sprintf(" <testcase classname=\"%s\" name=\"%s\" time=\"0.0\">\n", classname, testname);
-	    if (result == "fail") {
-	     out = out "  <failure message=\"NA\" type=\"NA\"/>\n";
-	     totalfailures++;
-	    } else if (result == "did_not_run") {
-	     out = out "  <error message=\"NA\" type=\"NA\"/>\n";
-	     totalerrors++;
-	    }
-	    out = out " </testcase>\n";
+  cat ${TD} | ${AWK} -v suitename=${TESTSUITE_NAME} '
+    BEGIN {
+      totaltests = 0;
+      totalfailures = 0;
+      totalerrors = 0;
+    }
+    function getPropVal(str){
+      split(str, a, "=");
+      val = a[2];
+      # remove quotes
+      gsub("\"","",val);
+      return val;
+    }
+     function removeXMLTag(str){
+      # remove xml tag quotes
+      gsub("</.*>","",str);
+      gsub("<.*>","",str);
+      gsub(">","",str);
+      return str;
+    }
+    /status value=/ {
+      result=getPropVal($0);
+      result=removeXMLTag(result);
+    }
+    /<testsuite>/ {
+      getline;
+      getline;
+      testunit=removeXMLTag($0);
+      gsub("\"","",testunit);
+    }
+    /<testcase>/ {
+      getline;
+      testname=removeXMLTag($0);
+      gsub("\"","",testname);
+    }
+    /<\/testcase>/{
+      classname=testunit
+      # printing testcase to out
+      out = out sprintf(" <testcase classname=\"%s\" name=\"%s\" time=\"0.0\">\n", classname, testname);
+      if (result == "fail") {
+       out = out "  <failure message=\"NA\" type=\"NA\"/>\n";
+       totalfailures++;
+      } else if (result == "did_not_run") {
+       out = out "  <error message=\"NA\" type=\"NA\"/>\n";
+       totalerrors++;
+      }
+      out = out " </testcase>\n";
 
-	    totaltests++;
-	    result="";
-	    testname="";
-	  }
-	  END {
-	    print "<?xml version=\"1.0\" ?>"
-	    printf "<testsuite tests=\"%d\" failures=\"%d\" errors=\"%d\" name=\"%s\">\n", totaltests, totalfailures, totalerrors, suitename;
-	    printf "%s", out;
-	    print "</testsuite>"
-	  }' > ${JUD}
-	cp $JUD $WORKSPACE/results/junitreports
+      totaltests++;
+      result="";
+      testname="";
+    }
+    END {
+      print "<?xml version=\"1.0\" ?>"
+      printf "<testsuite tests=\"%d\" failures=\"%d\" errors=\"%d\" name=\"%s\">\n", totaltests, totalfailures, totalerrors, suitename;
+      printf "%s", out;
+      print "</testsuite>"
+    }' > ${JUD}
+  cp ${JUD} ${WORKSPACE}/results/junitreports
 }
 
 change_junit_report_class_names(){
-  ${SED} -i 's/\([a-zA-Z-]\w*\)\./\1-/g' $WORKSPACE/results/junitreports/*.xml
-  ${SED} -i "s/\bclassname=\"/classname=\"${TEST_ID}./g" $WORKSPACE/results/junitreports/*.xml
+  ${SED} -i 's/\([a-zA-Z-]\w*\)\./\1-/g' ${WORKSPACE}/results/junitreports/*.xml
+  ${SED} -i "s/\bclassname=\"/classname=\"${TEST_ID}./g" ${WORKSPACE}/results/junitreports/*.xml
 }
 
-
 check_successful_run(){
-	printf "\n%s \n\n" "===== CHECK SUCCESSFUL RUN ====="
-	#checking that test_results.html is generated to make sure the build is not failed
-	FILE=$APS_HOME/test_results.html
-	if [ -f $FILE ];then
-   		echo "File $FILE exists.Test build successful"
-	else
-   		echo "File $FILE does not exist.There is problem in test build."
-   exit 1
-fi
-}
-
-delete_gf(){
-	printf "\n%s \n\n" "===== DELETE GLASSFISH AND MAVEN LOCAL REPO AND NUCLEUS ====="
-    rm -rf $WORKSPACE/glassfish5
-    rm -rf $WORKSPACE/repository
-    rm -rf $WORKSPACE/nucleus
-} 
-
-delete_bundle(){
-	printf "\n%s \n\n" "===== DELETE BUNDEL ====="
-	rm -rf $WORKSPACE/bundles
+  printf "\n%s \n\n" "===== CHECK SUCCESSFUL RUN ====="
+  FILE=${APS_HOME}/test_results.html
+  if [ -f ${FILE} ]; then
+    echo "File ${FILE} exists.Test build successful"
+  else
+    echo "File ${FILE} does not exist.There is problem in test build."
+    exit 1
+  fi
 }
diff --git a/appserver/tests/copyright/run_test.sh b/appserver/tests/copyright/run_test.sh
index dc1bbc1..edeb995 100755
--- a/appserver/tests/copyright/run_test.sh
+++ b/appserver/tests/copyright/run_test.sh
@@ -15,70 +15,58 @@
 # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 #
 
-
 copyright_run(){
-  M2_HOME=/net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/apache-maven-3.0.3
-  MAVEN_OPTS="-Xmx512m -Xms256m -XX:MaxPermSize=512m"; export MAVEN_OPTS
-  MAVEN_REPO=$WORKSPACE/repository
-  MAVEN_SETTINGS=$M2_HOME/settings-nexus.xml
-  PATH=$M2_HOME/bin:$JAVA_HOME/bin:$PATH; export PATH
-  mvn -version
-  echo $WORKSPACE
-	rm -f $WORKSPACE/main/copyright-files.txt || true
-	rm -f $WORKSPACE/copyright-files-temp*.txt || true
-	rm -rf $WORKSPACE/main/tmp-users || true
-	cd $WORKSPACE/main
+  rm -f ${WORKSPACE}/copyright-files.txt || true
+  rm -f ${WORKSPACE}/copyright-files-temp*.txt || true
+  rm -rf ${WORKSPACE}/tmp-users || true
+  cd ${WORKSPACE}
 
-	# TODO move the copyright module in main and main's default reactor in a profile, in order to not trigger the default reactor.
-	mvn -e -s $MAVEN_SETTINGS -Dmaven.repo.local=$MAVEN_REPO --quiet -Dcopyright.normalize=true org.glassfish.copyright:glassfish-copyright-maven-plugin:copyright > $WORKSPACE/copyright-files-temp-open.txt
-	cat $WORKSPACE/copyright-files-temp-open.txt
-	cat $WORKSPACE/copyright-files-temp-open.txt | sed s@$PWD/@@g > copyright-files.txt
+  mvn -e -q \
+    -Dcopyright.normalize=true \
+    org.glassfish.copyright:glassfish-copyright-maven-plugin:copyright \
+    > ${WORKSPACE}/copyright-files-temp-open.txt
+  cat ${WORKSPACE}/copyright-files-temp-open.txt
+  cat ${WORKSPACE}/copyright-files-temp-open.txt | sed s@${PWD}/@@g > copyright-files.txt
 }
 
 generate_copyright_results(){
-  rm -rf $WORKSPACE/results || true
-  mkdir -p $WORKSPACE/results/copyright_results
-
-	num=`wc -l copyright-files.txt | awk '{print $1}'`	
-	if [ $num -gt 0 ];then	
-	  echo "UNSTABLE" > $WORKSPACE/results/copyright_results/copyrightcheck.log
-	else
-	  echo "SUCCESS" > $WORKSPACE/results/copyright_results/copyrightcheck.log
-	fi
-  cp copyright-files.txt $WORKSPACE/results/copyright_results/copyright-files.txt
+  rm -rf ${WORKSPACE}/results || true
+  mkdir -p ${WORKSPACE}/results/copyright_results
+  if [ ! -f copyright-files.txt ] ; then
+    echo "FAILED" > ${WORKSPACE}/results/copyright_results/copyrightcheck.log
+  elif [ `wc -l copyright-files.txt | awk '{print $1}'` -gt 0 ]; then
+    echo "UNSTABLE" > ${WORKSPACE}/results/copyright_results/copyrightcheck.log
+  else
+    echo "SUCCESS" > ${WORKSPACE}/results/copyright_results/copyrightcheck.log
+  fi
+  cp copyright-files.txt ${WORKSPACE}/results/copyright_results/copyright-files.txt
+  tar -cvf ${WORKSPACE}/${TEST_ID}-results.tar.gz ${WORKSPACE}/results
 }
 
 run_test_id(){
-  source `dirname $0`/../common_test.sh
+  source `dirname ${0}`/../common_test.sh
   kill_process
-  rm main.zip rm version-info.txt || true
-  download_test_resources main.zip version-info.txt
-  rm -rf main || true
-  rm -rf .git || true
-  unzip_test_resources "$WORKSPACE/bundles/main.zip -d main/"
   copyright_run
   generate_copyright_results
 }
 
 post_test_run(){
-    if [[ $? -ne 0 ]]; then
-      generate_copyright_results
-    fi
-    upload_test_results
-    delete_bundle
+  if [[ ${?} -ne 0 ]]; then
+    generate_copyright_results
+  fi
 }
 
 list_test_ids(){
-	echo copyright
+  echo copyright
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
 
-case $OPT in
-	list_test_ids )
-		list_test_ids;;
-	run_test_id )
+case ${OPT} in
+  list_test_ids )
+    list_test_ids;;
+  run_test_id )
     trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/cts_smoke/run_test.sh b/appserver/tests/cts_smoke/run_test.sh
index 86b50fe..494e8c8 100755
--- a/appserver/tests/cts_smoke/run_test.sh
+++ b/appserver/tests/cts_smoke/run_test.sh
@@ -16,271 +16,264 @@
 #
 
 archive_cts(){
-	cp $WORKSPACE/bundles/version-info.txt $WORKSPACE/results/
-	cp $TS_HOME/bin/xml/config_vi.log $WORKSPACE/results
-	cp $TS_HOME/bin/xml/smoke.log $WORKSPACE/results
-	cp $S1AS_HOME/domains/domain1/logs/server.log* $WORKSPACE/results
-	cp $TS_HOME/bin/ts.jte $WORKSPACE/results
-	echo $BUILD_ID > $WORKSPACE/results/count.txt
-	${GREP} "Number of Tests Passed" $WORKSPACE/results/smoke.log >> $WORKSPACE/results/count.txt
-	${GREP} "Number of Tests Failed" $WORKSPACE/results/smoke.log >> $WORKSPACE/results/count.txt
-	${GREP} "Number of Tests with Errors" $WORKSPACE/results/smoke.log >> $WORKSPACE/results/count.txt
-	cat count.txt | ${SED} -e 's/\[javatest.batch\] Number/Number/g' > $WORKSPACE/results/CTS-GP-count.txt
-	rm $WORKSPACE/results/count.txt
+  cp ${TS_HOME}/bin/xml/config_vi.log ${WORKSPACE}/results
+  cp ${TS_HOME}/bin/xml/smoke.log ${WORKSPACE}/results
+  cp ${S1AS_HOME}/domains/domain1/logs/server.log* ${WORKSPACE}/results
+  cp ${TS_HOME}/bin/ts.jte ${WORKSPACE}/results
+  echo ${BUILD_ID} > ${WORKSPACE}/results/count.txt
+  ${GREP} "Number of Tests Passed" ${WORKSPACE}/results/smoke.log >> ${WORKSPACE}/results/count.txt
+  ${GREP} "Number of Tests Failed" ${WORKSPACE}/results/smoke.log >> ${WORKSPACE}/results/count.txt
+  ${GREP} "Number of Tests with Errors" ${WORKSPACE}/results/smoke.log >> ${WORKSPACE}/results/count.txt
+  cat ${WORKSPACE}/results/count.txt | ${SED} -e 's/\[javatest.batch\] Number/Number/g' > ${WORKSPACE}/results/CTS-GP-count.txt
+  rm ${WORKSPACE}/results/count.txt
+  tar -cvf ${WORKSPACE}/${TEST_ID}-results.tar.gz -C ${WORKSPACE}/results .
 }
 
 test_run_cts_smoke(){
-	TS_HOME=$WORKSPACE/javaee-smoke
-	if [[ -z ${CTS_SMOKE_URL} ]]; then
-		CTS_SMOKE=${JENKINS_URL}job/gf-cts-promotion/lastStableBuild/artifact
-	else
-		CTS_SMOKE=${CTS_SMOKE_URL}
-	fi
-	CTS_EXCLUDE_LIST=ts.jtx
+  TS_HOME=${WORKSPACE}/javaee-smoke
+  if [[ -z ${CTS_SMOKE_URL} ]]; then
+    echo "error: CTS_SMOKE_URL is not set"
+    exit 1
+  fi
+  CTS_SMOKE_BUNDLE=javaee-smoke-8.0_latest.zip
+  CTS_EXCLUDE_LIST=ts.jtx
 
-	# MACHINE CONFIGURATION
-	pwd
-	uname -a
-	java -version
+  pwd
+  uname -a
+  java -version
 
-	# some clean up
-	rm -rf /tmp/JTreport
-	rm -rf /tmp/JTwork
-	rm -rf /disk1/java_re/.javatest
+  rm -rf /tmp/JTreport /tmp/JTwork /disk1/java_re/.javatest || true
 
-	# XXX Trying this as a test - touch all the files in the glassfish distribution
-	# find glassfish5 -exec touch {} \;
-	# XXX End test
+  wget ${CTS_SMOKE_URL}/${CTS_SMOKE_BUNDLE}
+  unzip -q ${CTS_SMOKE_BUNDLE}
 
-	wget $CTS_SMOKE/$CTS_SMOKE_BUNDLE
-	unzip -q $CTS_SMOKE_BUNDLE
-	cd $TS_HOME/bin
-	#cp $CTS_SMOKE/$CTS_EXCLUDE_LIST .
-	cp ts.jte ts.jte.orig
+  cd ${TS_HOME}/bin
+  #cp $CTS_SMOKE/$CTS_EXCLUDE_LIST .
+  cp ts.jte ts.jte.orig
 
-	#mv ts.jte ts.jte.orig
-	# 08/31/2012 [jill] This ${SED} command includes the addition of javax.jms-api.jar (to support new JMS 2.0 jar) in front of old javax.jms.jar.
-	${SED} -e "s@javaee.home=@javaee\.home=$S1AS_HOME@g" -e "s@javaee.home.ri=@javaee\.home\.ri=$S1AS_HOME@g" -e "s/^orb\.host=/orb\.host=localhost/g"  -e "s/^mailHost=/mailHost=localhost/g" -e "s/^mailuser1=/mailuser1=java_re@sun\.com/g" -e "s/^mailFrom=.*/mailFrom=java_re@sun\.com/g" -e "s/orb.host.ri=/orb.host.ri=localhost/g" -e "s/^work\.dir=\/files/work\.dir=\/tmp/g" -e "s/^report\.dir=\/files/report\.dir=\/tmp/g" -e "s/^tz=.*/tz=US\/Pacific/g" -e "s/modules\/gf-client.jar/lib\/gf-client.jar/g" -e "s/\${pathsep}\${ri\.modules}\/javax\.jms\.jar/\${pathsep}\${ri\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{ri\.modules}\/javax\.jms\.jar/g" -e "s/\${pathsep}\${s1as\.modules}\/javax\.jms\.jar/\${pathsep}\${s1as\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{s1as\.modules}\/javax\.jms\.jar/g" ts.jte > ts.jte.new
-	mv ts.jte.new ts.jte
+  ${SED} \
+    -e "s@javaee.home=@javaee\.home=${S1AS_HOME}@g" \
+    -e "s@javaee.home.ri=@javaee\.home\.ri=${S1AS_HOME}@g" \
+    -e "s/^orb\.host=/orb\.host=localhost/g" \
+    -e "s/^mailHost=/mailHost=localhost/g" \
+    -e "s/^mailuser1=/mailuser1=${USER:-root}@localhost/g" \
+    -e "s/^mailFrom=.*/mailFrom=${USER:-root}@localhost/g" \
+    -e "s/orb.host.ri=/orb.host.ri=localhost/g" \
+    -e "s/^work\.dir=\/files/work\.dir=\/tmp/g" \
+    -e "s/^report\.dir=\/files/report\.dir=\/tmp/g" \
+    -e "s/^tz=.*/tz=US\/Pacific/g" \
+    -e "s/modules\/gf-client.jar/lib\/gf-client.jar/g" \
+    -e "s/\${pathsep}\${ri\.modules}\/javax\.jms\.jar/\${pathsep}\${ri\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{ri\.modules}\/javax\.jms\.jar/g" \
+    -e "s/\${pathsep}\${s1as\.modules}\/javax\.jms\.jar/\${pathsep}\${s1as\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{s1as\.modules}\/javax\.jms\.jar/g" \
+    -e "s/implementation\.classes\.ri=/implementation\.classes\.ri=\${ri\.modules}\/cdi-api\.jar\${pathsep}\${ri\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" \
+    -e "s/implementation\.classes=/implementation\.classes=\${s1as\.modules}\/cdi-api\.jar\${pathsep}\${s1as\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" \
+    -e "s/tyrus-container-grizzly\.jar/tyrus-container-grizzly-client\.jar/g" \
+    -e "s/javamail\.password=/javamail\.password\=cts1/g" \
+    ts.jte > ts.jte.new
+  mv ts.jte.new ts.jte
 
+  cd ${TS_HOME}/bin/xml
+  export ANT_HOME=${TS_HOME}/tools/ant
+  export PATH=${ANT_HOME}/bin:${PATH}
 
-	# Temp fix for weld [06/06/2014 jlsato]
-	${SED} -e "s/implementation\.classes\.ri=/implementation\.classes\.ri=\${ri\.modules}\/cdi-api\.jar\${pathsep}\${ri\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" ts.jte > ts.jte.new
-	mv ts.jte.new ts.jte
-	${SED} -e "s/implementation\.classes=/implementation\.classes=\${s1as\.modules}\/cdi-api\.jar\${pathsep}\${s1as\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" ts.jte > ts.jte.new
-	mv ts.jte.new ts.jte
-	# End temp fix for weld
+  # SECURITY MANAGER ON
+  ${S1AS_HOME}/bin/asadmin start-domain
+  ${S1AS_HOME}/bin/asadmin create-jvm-options "-Djava.security.manager"
+  ${S1AS_HOME}/bin/asadmin stop-domain
+  if [[ -n ${1} ]]; then
+    ${TS_HOME}/tools/ant/bin/ant \
+      -Dgroups.count=5 \
+      -Dgroup.id=${1} \
+      -Dgroups.work.dir=/tmp \
+      -f ${TS_HOME}/bin/xml/impl/glassfish/smoke-groups.xml \
+      smoke.split.groups
 
-	# Temp fix for Pavel   [10/31/2013 jlsato]
-	#${SED} -e "s/implementation\.classes\.ri=/implementation\.classes\.ri=\${ri\.modules}\/tyrus-container-grizzly-client\.jar\${pathsep}/g" ts.jte > ts.jte.new
-	#mv ts.jte.new ts.jte
-	#${SED} -e "s/implementation\.classes=/implementation\.classes=\${s1as\.modules}\/tyrus-container-grizzly-client\.jar\${pathsep}/g" ts.jte > ts.jte.new
-	#mv ts.jte.new ts.jte
-	# Fix the 02_Dec smoketest bundle [12/03/2013 jlsato]
-	${SED} -e "s/tyrus-container-grizzly\.jar/tyrus-container-grizzly-client\.jar/g" ts.jte > ts.jte.new
-	mv ts.jte.new ts.jte
-	# End temp fix for Pavel
+    cat /tmp/javaee-smoke-group${1}.properties
 
-	# Temp fix to set javamail password [12/03/2013 jlsato]
-	${SED} -e "s/javamail\.password=/javamail\.password\=cts1/g" ts.jte > ts.jte.new
-	mv ts.jte.new ts.jte
-	# End temp fix for javamail password
-	cd $TS_HOME/bin/xml
-        
-	# SECURITY MANAGER ON
-	$S1AS_HOME/bin/asadmin start-domain
-	$S1AS_HOME/bin/asadmin create-jvm-options "-Djava.security.manager"
-	$S1AS_HOME/bin/asadmin stop-domain
-        if [[ -n $1 ]]; then
-		ant  -Dgroups.count=5 -Dgroup.id=$1 -Dgroups.work.dir=/tmp -f $TS_HOME/bin/xml/impl/glassfish/smoke-groups.xml smoke.split.groups
-		cat /tmp/javaee-smoke-group$1.properties
-		ant -Dreport.dir=$WORKSPACE/$BUILD_NUMBER/JTReport -Dwork.dir=$WORKSPACE/$BUILD_NUMBER/JTWork -propertyfile /tmp/javaee-smoke-group$1.properties -f smoke.xml smoke
-        else
-		ant -Dreport.dir=$WORKSPACE/$BUILD_NUMBER/JTReport -Dwork.dir=$WORKSPACE/$BUILD_NUMBER/JTWork -f smoke.xml smoke
-	fi
+    ${TS_HOME}/tools/ant/bin/ant \
+      -Dreport.dir=${WORKSPACE}/${BUILD_NUMBER}/JTReport \
+      -Dwork.dir=${WORKSPACE}/${BUILD_NUMBER}/JTWork \
+      -propertyfile /tmp/javaee-smoke-group${1}.properties \
+      -f smoke.xml \
+      smoke
+  else
+    ${TS_HOME}/tools/ant/bin/ant \
+      -Dreport.dir=${WORKSPACE}/${BUILD_NUMBER}/JTReport \
+      -Dwork.dir=${WORKSPACE}/${BUILD_NUMBER}/JTWork \
+      -f smoke.xml \
+      smoke
+  fi
 
-	#POST CLEANUPS
-	kill_process
-
-	#ARCHIVING
-	archive_cts
+  kill_process
+  archive_cts
 }
 
 archive_servlet_tck(){
-	cp $WORKSPACE/bundles/version-info.txt $WORKSPACE/results/
-	cp $S1AS_HOME/domains/domain1/logs/server.log* $WORKSPACE/results
-	cp $WORKSPACE/tests.log $WORKSPACE/results
-	cp -r $TS_HOME/report/ $WORKSPACE/results
+  cp ${S1AS_HOME}/domains/domain1/logs/server.log* ${WORKSPACE}/results
+  cp ${WORKSPACE}/tests.log ${WORKSPACE}/results
+  cp -r ${TS_HOME}/report/ ${WORKSPACE}/results
+  tar -cvf ${WORKSPACE}/${TEST_ID}-results.tar.gz ${WORKSPACE}/results
 }
 
 test_run_servlet_tck(){
-	export TS_HOME=$WORKSPACE/servlettck
-	java -version
-	# Java EE 8 servlet tck.
-	if [[ -z ${SERVELT_TCK_URL} ]]; then
-		SERVELT_TCK=${JENKINS_URL}job/gf-cts-promotion/lastStableBuild/artifact/
-	else
-		SERVELT_TCK=${SERVELT_TCK_URL}
-	fi
-	wget ${SERVELT_TCK}/${SERVELT_TCK_BUNDLE} -O servlettck.zip
+  export TS_HOME=${WORKSPACE}/servlettck
+  if [[ -z ${CTS_SMOKE_URL} ]]; then
+    echo "error: CTS_SMOKE_URL is not set"
+    exit 1
+  fi
 
-	unzip -q servlettck.zip
-        if [[ -n $1 ]]; then
-		TESTDIR=$WORKSPACE/servlettck/src/com/sun/ts/tests
-		for i in `ls $TESTDIR`
-			do
-				if [[ (-d $TESTDIR/$i)  && ( $i != "jsp" &&  $i != "common" && $i != "signaturetest") ]]; then
-					if [[ -z $(grep $i `dirname $0`/test_dir.properties) ]]; then
-						echo "A new folder $i is added in the test source which has no entry in the properties file" 
-						exit 1
-					fi
-				fi
-			done
-	fi
+  pwd
+  uname -a
+  java -version
 
-	cd $TS_HOME/bin
-	cp ts.jte ts.jte.orig
+  rm -rf /tmp/JTreport /tmp/JTwork /disk1/java_re/.javatest || true
 
-	cat ts.jte.orig | ${SED} \
-	-e "s@webServerHost=@webServerHost=localhost@g" \
-	-e "s@webServerPort=@webServerPort=8080@g" \
-	-e "s@securedWebServicePort=@securedWebServicePort=8181@g" \
-	-e "s@web.home=@web\.home=$S1AS_HOME@g" \
-	-e "s@javaee\.home\.ri=@javaee\.home\.ri=$S1AS_HOME@g" \
-	-e "s/^orb\.host=/orb\.host=localhost/g"  -e "s/^mailHost=/mailHost=localhost/g" -e "s/^mailuser1=/mailuser1=java_re/g" \
-	-e "s/^mailFrom=.*/mailFrom=javaee-re_ww@oracle\.com/g" -e "s/orb.host.ri=/orb.host.ri=localhost/g" \
-	-e "s/^work\.dir=\/files/work\.dir=\/tmp/g" -e "s/^report\.dir=\/files/report\.dir=\/tmp/g" \
-	-e "s/^tz=.*/tz=US\/Pacific/g" -e "s/modules\/gf-client.jar/lib\/gf-client.jar/g" \
-	-e "s/\${pathsep}\${ri\.modules}\/javax\.jms\.jar/\${pathsep}\${ri\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{ri\.modules}\/javax\.jms\.jar/g" \
-	-e "s/\${pathsep}\${s1as\.modules}\/javax\.jms\.jar/\${pathsep}\${s1as\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{s1as\.modules}\/javax\.jms\.jar/g" \
-	-e "s/implementation\.classes\.ri=/implementation\.classes\.ri=\${ri\.modules}\/cdi-api\.jar\${pathsep}\${ri\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" \
-	-e "s/implementation\.classes=/implementation\.classes=\${s1as\.modules}\/cdi-api\.jar\${pathsep}\${s1as\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" \
-	-e "s/implementation\.classes\.ri=/implementation\.classes\.ri=\${ri\.modules}\/tyrus-container-grizzly-client\.jar\${pathsep}/g" \
-	-e "s/implementation\.classes=/implementation\.classes=\${s1as\.modules}\/tyrus-container-grizzly-client\.jar\${pathsep}/g" \
-	-e "s/tyrus-container-grizzly\.jar/tyrus-container-grizzly-client\.jar/g" \
-	-e "s/impl\.vi=/impl\.vi\=glassfish/g" \
-	> ts.jte
+  wget ${CTS_SMOKE_URL}/servlettck-4.0_Latest.zip -O servlettck.zip
+  unzip -q servlettck.zip
 
-	echo "# Disabling signature tests for CI build pipeline" >> ts.jtx
-	echo "com/sun/ts/tests/signaturetest/servlet/ServletSigTest.java#signatureTest" >> ts.jtx
+  if [[ -n ${1} ]]; then
+    TESTDIR=${WORKSPACE}/servlettck/src/com/sun/ts/tests
+    for i in `ls ${TESTDIR}`
+    do
+      if [[ (-d ${TESTDIR}/$i)  && ( ${i} != "jsp" &&  ${i} != "common" && ${i} != "signaturetest") ]]; then
+        if [[ -z $(grep ${i} `dirname ${0}`/test_dir.properties) ]]; then
+          echo "A new folder ${i} is added in the test source which has no entry in the properties file"
+          exit 1
+        fi
+      fi
+    done
+  fi
 
-	cd $S1AS_HOME
-	bin/asadmin start-domain
+  cd ${TS_HOME}/bin
+  cp ts.jte ts.jte.orig
 
-	cd $TS_HOME/bin
-	ant config.security
-	ant deploy.all
-	
-	if [ -n $1 ]; then
-		cd $TS_HOME/src/com/sun/ts/tests/$1
-	else
-		cd $TS_HOME/src/com/sun/ts/tests/
-	fi
-	export JAVA_OPTIONS="-Xbootclasspath/p:$TS_HOME/lib/flow.jar"
+  cat ts.jte.orig | ${SED} \
+  -e "s@webServerHost=@webServerHost=localhost@g" \
+  -e "s@webServerPort=@webServerPort=8080@g" \
+  -e "s@securedWebServicePort=@securedWebServicePort=8181@g" \
+  -e "s@web.home=@web\.home=${S1AS_HOME}@g" \
+  -e "s@javaee\.home\.ri=@javaee\.home\.ri=${S1AS_HOME}@g" \
+  -e "s/^orb\.host=/orb\.host=localhost/g" \
+  -e "s/^mailHost=/mailHost=localhost/g" \
+  -e "s/^mailuser1=/mailuser1=${USER:-root}@localhost/g" \
+  -e "s/^mailFrom=.*/mailFrom=${USER:-root}@localhost/g" \
+  -e "s/orb.host.ri=/orb.host.ri=localhost/g" \
+  -e "s/^work\.dir=\/files/work\.dir=\/tmp/g" -e "s/^report\.dir=\/files/report\.dir=\/tmp/g" \
+  -e "s/^tz=.*/tz=US\/Pacific/g" -e "s/modules\/gf-client.jar/lib\/gf-client.jar/g" \
+  -e "s/\${pathsep}\${ri\.modules}\/javax\.jms\.jar/\${pathsep}\${ri\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{ri\.modules}\/javax\.jms\.jar/g" \
+  -e "s/\${pathsep}\${s1as\.modules}\/javax\.jms\.jar/\${pathsep}\${s1as\.modules}\/javax\.jms-api\.jar\${pathsep}\$\{s1as\.modules}\/javax\.jms\.jar/g" \
+  -e "s/implementation\.classes\.ri=/implementation\.classes\.ri=\${ri\.modules}\/cdi-api\.jar\${pathsep}\${ri\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" \
+  -e "s/implementation\.classes=/implementation\.classes=\${s1as\.modules}\/cdi-api\.jar\${pathsep}\${s1as\.modules}\/cdi-api-fragment\.jar\${pathsep}/g" \
+  -e "s/implementation\.classes\.ri=/implementation\.classes\.ri=\${ri\.modules}\/tyrus-container-grizzly-client\.jar\${pathsep}/g" \
+  -e "s/implementation\.classes=/implementation\.classes=\${s1as\.modules}\/tyrus-container-grizzly-client\.jar\${pathsep}/g" \
+  -e "s/tyrus-container-grizzly\.jar/tyrus-container-grizzly-client\.jar/g" \
+  -e "s/impl\.vi=/impl\.vi\=glassfish/g" \
+  > ts.jte
 
-	(ant runclient -Dreport.dir=$WORKSPACE/servlettck/report | tee $WORKSPACE/tests.log) || true
+  echo "# Disabling signature tests for CI build pipeline" >> ts.jtx
+  echo "com/sun/ts/tests/signaturetest/servlet/ServletSigTest.java#signatureTest" >> ts.jtx
 
-	cd $S1AS_HOME
-	bin/asadmin stop-domain
+  cd ${S1AS_HOME}
+  bin/asadmin start-domain
 
-	#POST CLEANUPS
-	kill_process
+  cd ${TS_HOME}/bin
+  ant config.security
+  ant deploy.all
 
-	#ARCHIVING
-	archive_servlet_tck
+  if [ -n ${1} ]; then
+    cd ${TS_HOME}/src/com/sun/ts/tests/${1}
+  else
+    cd ${TS_HOME}/src/com/sun/ts/tests/
+  fi
+  export JAVA_OPTIONS="-Xbootclasspath/p:${TS_HOME}/lib/flow.jar"
+
+  (ant runclient -Dreport.dir=${WORKSPACE}/servlettck/report | tee ${WORKSPACE}/tests.log) || true
+
+  cd ${S1AS_HOME}
+  bin/asadmin stop-domain
+
+  kill_process
+  archive_servlet_tck
 }
 
 run_test_id(){
-	source `dirname $0`/../common_test.sh
-	kill_process
-	delete_workspace
-	download_test_resources glassfish.zip version-info.txt
-	unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-	test_init
-	if [[ $1 = "cts_smoke_all" ]]; then
-		test_run_cts_smoke
-		result=$WORKSPACE/results/smoke.log
-         elif [[ $1 = "cts_smoke_group-"* ]]; then
-                GROUP_ID=(`echo $1 | sed 's/cts_smoke_group-//'`)
-                test_run_cts_smoke $GROUP_ID
-                result=$WORKSPACE/results/smoke.log
-	elif [[ $1 = "servlet_tck_"* ]]; then
-		TEST_DIR_PROPERTIES=`dirname $0`/test_dir.properties
-		TEST_DIR_PROP_KEY=(`echo $1 | sed 's/servlet_tck_//'`)
-		TEST_DIR=(`cat ${TEST_DIR_PROPERTIES} | grep ${TEST_DIR_PROP_KEY} | cut -d'=' -f2`)
-		test_run_servlet_tck $TEST_DIR
-		result=$WORKSPACE/results/tests.log
-	else
-		echo "Invalid Test ID"
-		exit 1
-	fi
-    cts_to_junit $result $WORKSPACE/results/junitreports/test_results_junit.xml $1
+  source `dirname $0`/../common_test.sh
+  kill_process
+  delete_workspace
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  test_init
+  if [[ ${1} = "cts_smoke_all" ]]; then
+    test_run_cts_smoke
+    result=${WORKSPACE}/results/smoke.log
+  elif [[ ${1} = "cts_smoke_group-"* ]]; then
+    GROUP_ID=(`echo ${1} | sed 's/cts_smoke_group-//'`)
+    test_run_cts_smoke ${GROUP_ID}
+    result=${WORKSPACE}/results/smoke.log
+  elif [[ ${1} = "servlet_tck_"* ]]; then
+    TEST_DIR_PROPERTIES=`dirname ${0}`/test_dir.properties
+    TEST_DIR_PROP_KEY=(`echo ${1} | sed 's/servlet_tck_//'`)
+    TEST_DIR=(`cat ${TEST_DIR_PROPERTIES} | grep ${TEST_DIR_PROP_KEY} | cut -d'=' -f2`)
+    test_run_servlet_tck ${TEST_DIR}
+    result=${WORKSPACE}/results/tests.log
+  else
+    echo "Invalid Test ID"
+    exit 1
+  fi
+  cts_to_junit ${result} ${WORKSPACE}/results/junitreports/test_results_junit.xml ${1}
 }
 
 post_test_run(){
-    if [[ $? -ne 0 ]]; then
-    	if [[ $TEST_ID = "cts_smoke_all" || $TEST_ID = "cts_smoke_group-"* ]]; then
-	  		archive_cts || true
-	fi
-	  	if [[ $TEST_ID = "servlet_tck_"* ]]; then
-	  		archive_servlet_tck || true
-	  	fi
-	fi
-    upload_test_results
-    delete_bundle
-    cd -
 }
 
-
 list_test_ids(){
-	echo cts_smoke_all servlet_tck_all servlet_tck_servlet-api-servlet servlet_tck_servlet-api-servlet-http servlet_tck_servlet-compat servlet_tck_servlet-pluggability servlet_tck_servlet-spec  cts_smoke_group-1 cts_smoke_group-2 cts_smoke_group-3 cts_smoke_group-4 cts_smoke_group-5
+  echo cts_smoke_all servlet_tck_all servlet_tck_servlet-api-servlet servlet_tck_servlet-api-servlet-http servlet_tck_servlet-compat servlet_tck_servlet-pluggability servlet_tck_servlet-spec  cts_smoke_group-1 cts_smoke_group-2 cts_smoke_group-3 cts_smoke_group-4 cts_smoke_group-5
 }
 
 cts_to_junit(){
-        junitCategory=$3
-	cd $WORKSPACE/results
-	rm -rf $2
-	cat $1 | ${GREP} -a "\[javatest.batch\] Finished Test" >  results.txt
-	tail $((`${GREP} -n "Completed running" results.txt | ${AWK} '{print $1}' | cut -d ':' -f1`-`cat results.txt | wc -l`)) results.txt > summary.txt
+  junitCategory=${3}
+  cd ${WORKSPACE}/results
+  rm -rf ${2}
+  cat ${1} | ${GREP} -a "\[javatest.batch\] Finished Test" >  results.txt
+  tail $((`${GREP} -n "Completed running" results.txt | ${AWK} '{print $1}' | cut -d ':' -f1`-`cat results.txt | wc -l`)) results.txt > summary.txt
 
-	echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" >> $2
-	echo "<testsuites>" >> $2
-	echo "	<testsuite>" >> $2
-	for i in `${GREP} "\.\.\.\.\.\.\.\." summary.txt | ${AWK} '{print $4}'`
-	do
-		line=`echo $i | ${SED} s@"\.\.\.\.\.\.\.\."@" "@g`
-		status=`echo $line | ${AWK} '{print $1}'`
-		id=`echo $line | ${AWK} '{print $2}'`
-		classname=`echo $id | cut -d '#' -f1 | ${SED} s@"\/"@"_"@g | ${SED} s@".java"@@g`
-		name=`echo $id | cut -d '#' -f2`
+  echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" >> ${2}
+  echo "<testsuites>" >> ${2}
+  echo "  <testsuite>" >> ${2}
+  for i in `${GREP} "\.\.\.\.\.\.\.\." summary.txt | ${AWK} '{print $4}'`
+  do
+    line=`echo ${i} | ${SED} s@"\.\.\.\.\.\.\.\."@" "@g`
+    status=`echo ${line} | ${AWK} '{print $1}'`
+    id=`echo ${line} | ${AWK} '{print $2}'`
+    classname=`echo ${id} | cut -d '#' -f1 | ${SED} s@"\/"@"_"@g | ${SED} s@".java"@@g`
+    name=`echo ${id} | cut -d '#' -f2`
 
-		echo "		<testcase classname=\"${junitCategory}.$classname\" name=\"$name\">" >> $2		
-		if [ "${status}" = "FAILED" ]
-		then
-			echo "			<failure type=\"CtsFailure\"> n/a </failure>" >> $2
-		fi
-			echo "		</testcase>" >> $2
-	done
-	echo "	</testsuite>" >> $2
-	echo "</testsuites>" >> $2
+    echo "    <testcase classname=\"${junitCategory}.${classname}\" name=\"${name}\">" >> ${2}
+    if [ "${status}" = "FAILED" ]
+    then
+      echo "      <failure type=\"CtsFailure\"> n/a </failure>" >> ${2}
+    fi
+    echo "    </testcase>" >> ${2}
+  done
+  echo "  </testsuite>" >> ${2}
+  echo "</testsuites>" >> ${2}
 }
 
 delete_workspace(){
-	printf "\n%s \n\n" "===== DELETE WORKSPACE ====="
-    rm -rf $WORKSPACE/glassfish5 > /dev/null || true
-    rm -rf $WORKSPACE/servlettck > /dev/null  || true
-    rm $WORKSPACE/servlettck.zip > /dev/null || true
-    rm -rf $WORKSPACE/javaee-smoke > /dev/null || true
-    rm $WORKSPACE/javaee-smoke-7.0_latest.zip > /dev/null || true
+  printf "\n%s \n\n" "===== DELETE WORKSPACE ====="
+    rm -rf ${WORKSPACE}/glassfish5 > /dev/null || true
+    rm -rf ${WORKSPACE}/servlettck > /dev/null  || true
+    rm ${WORKSPACE}/servlettck.zip > /dev/null || true
+    rm -rf ${WORKSPACE}/javaee-smoke > /dev/null || true
+    rm ${WORKSPACE}/javaee-smoke-7.0_latest.zip > /dev/null || true
 } 
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
 
-case $OPT in
-	list_test_ids )
-		list_test_ids;;
-	run_test_id )
-		trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+case ${OPT} in
+  list_test_ids )
+    list_test_ids;;
+  run_test_id )
+    trap post_test_run EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/embedded/run_test.sh b/appserver/tests/embedded/run_test.sh
index f81e223..cfeebd5 100755
--- a/appserver/tests/embedded/run_test.sh
+++ b/appserver/tests/embedded/run_test.sh
@@ -16,25 +16,21 @@
 #
 
 test_run_embedded(){
-	MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=384m"; export MAVEN_OPTS
-	MAVEN_REPO=$WORKSPACE/repository
-	PATH=$JAVA_HOME/bin:$PATH; export PATH
-	echo $WORKSPACE
-  cd $WORKSPACE/main
-  mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
-  EMBEDDED_WORKSPACE=$WORKSPACE/main/appserver/extras/embedded
-  cd $EMBEDDED_WORKSPACE/all
-  mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
-  cd $EMBEDDED_WORKSPACE/nucleus
-  mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
-  cd $EMBEDDED_WORKSPACE/web
-  mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean install
-  cd $WORKSPACE/main/appserver/tests/embedded/maven-plugin/remoteejbs
-  mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean verify
-  cd $WORKSPACE/main/appserver/tests/embedded/maven-plugin/mdb
-  mvn -Dmaven.repo.local=$WORKSPACE/repository -DskipTests=true clean verify
-  cd $WORKSPACE/main/appserver/tests/embedded
-  mvn -Dbuild=snapshot  -Dmaven.repo.local=$WORKSPACE/repository -Dmaven.test.failure.ignore=true clean verify
+  cd ${WORKSPACE}
+  mvn -DskipTests=true clean install
+  EMBEDDED_WORKSPACE=${WORKSPACE}/appserver/extras/embedded
+  cd ${EMBEDDED_WORKSPACE}/all
+  mvn -DskipTests=true clean install | tee ${TEST_RUN_LOG}
+  cd ${EMBEDDED_WORKSPACE}/nucleus
+  mvn -DskipTests=true clean install | tee -a ${TEST_RUN_LOG}
+  cd ${EMBEDDED_WORKSPACE}/web
+  mvn -DskipTests=true clean install | tee -a ${TEST_RUN_LOG}
+  cd ${WORKSPACE}/appserver/tests/embedded/maven-plugin/remoteejbs
+  mvn -DskipTests=true clean verify | tee -a ${TEST_RUN_LOG}
+  cd ${WORKSPACE}/appserver/tests/embedded/maven-plugin/mdb
+  mvn -DskipTests=true clean verify | tee -a ${TEST_RUN_LOG}
+  cd ${WORKSPACE}/appserver/tests/embedded
+  mvn -Dbuild=snapshot -Dmaven.test.failure.ignore=true clean verify | tee -a ${TEST_RUN_LOG}
   merge_junits
 }
 
@@ -55,32 +51,25 @@
 }
 
 run_test_id(){
-	source `dirname $0`/../common_test.sh
-	kill_process
-	rm main.zip rm version-info.txt || true
-	download_test_resources main.zip version-info.txt
-	rm -rf main || true
-	unzip_test_resources "$WORKSPACE/bundles/main.zip -d main/"
   case ${TEST_ID} in
     embedded_all)
+      unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
    	  test_run_embedded;;
   esac
-  upload_test_results
-  delete_bundle
-
 }
 
-
 list_test_ids(){
 	echo embedded_all
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../common_test.sh
 
-case $OPT in
+case ${OPT} in
 	list_test_ids )
 		list_test_ids;;
 	run_test_id )
-		run_test_id $TEST_ID ;;
+		trap "copy_test_artifacts ${TEST_ID}" EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/findbug/run_test.sh b/appserver/tests/findbug/run_test.sh
index 4a8d2f4..8d1340f 100755
--- a/appserver/tests/findbug/run_test.sh
+++ b/appserver/tests/findbug/run_test.sh
@@ -16,97 +16,71 @@
 #
 
 findbugs_run(){
-	M2_HOME=/net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/apache-maven-3.3.3
-	MAVEN_OPTS="-Xmx512m -Xms256m -XX:MaxPermSize=1024m"; export MAVEN_OPTS
-	MAVEN_REPO=$WORKSPACE/repository
-	MAVEN_SETTINGS=/net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/apache-maven-3.0.3/settings-nexus.xml
-
-	CLASSPATH=$WORKSPACE/findbugstotext; export CLASSPATH
-	PATH=$M2_HOME/bin:$JAVA_HOME/bin:$PATH; export PATH
-	mvn -version
-	echo $WORKSPACE
-
-	# Run findbugs on open source ws.
-	echo "Running findbugs on ws"
-	cd $WORKSPACE/main
-	mvn -e -s $MAVEN_SETTINGS -Dmaven.repo.local=$WORKSPACE/repository -Pfindbugs clean install
-	mvn -e -s $MAVEN_SETTINGS -Dmaven.repo.local=$WORKSPACE/repository -Pfindbugs findbugs:findbugs
+  CLASSPATH=${WORKSPACE}/findbugstotext; export CLASSPATH
+  cd ${WORKSPACE}
+  mvn -e -Pfindbugs clean install
+  mvn -e -Pfindbugs findbugs:findbugs
 
 }
 
 findbugs_low_priority_all_run(){
-  M2_HOME=/net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/apache-maven-3.3.3
-  MAVEN_OPTS="-Xmx512m -Xms256m -XX:MaxPermSize=1024m"; export MAVEN_OPTS
-  MAVEN_REPO=$WORKSPACE/repository
-  MAVEN_SETTINGS=/net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/apache-maven-3.0.3/settings-nexus.xml
-
-  CLASSPATH=$WORKSPACE/findbugstotext; export CLASSPATH
-  PATH=$M2_HOME/bin:$JAVA_HOME/bin:$PATH; export PATH
-  mvn -version
-  echo $WORKSPACE
-
-  # Run findbugs on open source ws.
-  echo "Running findbugs on ws"
-  cd $WORKSPACE/main
-  mvn -e -s $MAVEN_SETTINGS -Dmaven.repo.local=$WORKSPACE/repository -Pfindbugs clean install
-  mvn -e -s $MAVEN_SETTINGS -Dmaven.repo.local=$WORKSPACE/repository -B -Pfindbugs -Dfindbugs.threshold=Low findbugs:findbugs
-
+  cd ${WORKSPACE}
+  mvn -e -Pfindbugs clean install
+  mvn -e -B -Pfindbugs -Dfindbugs.threshold=Low findbugs:findbugs
 }
 
 generate_findbugs_result(){
-	rm -rf $WORKSPACE/results
-	mkdir -p $WORKSPACE/results/findbugs_results
-
-	# check findbbugs
-	set +e
-	cd /net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/findbugs-tool-latest; ./findbugscheck $WORKSPACE/main
-	if [ $? -ne 0 ]
-	then
-	   echo "FAILED" > $WORKSPACE/results/findbugs_results/findbugscheck.log
-	else
-	   echo "SUCCESS" > $WORKSPACE/results/findbugs_results/findbugscheck.log
-	fi
-	set -e
-	# archive the findbugs results
-	for i in `find $WORKSPACE/main -name findbugsXml.xml`
-	do
-	   cp $i $WORKSPACE/results/findbugs_results/`echo $i | sed s@"$WORKSPACE"@@g | sed s@"/"@"_"@g`
-	done
-}
-
-generate_findbugs_low_priority_all_result(){
-  rm -rf $WORKSPACE/results
-  mkdir -p $WORKSPACE/results/findbugs_low_priority_all_results
+  rm -rf ${WORKSPACE}/results
+  mkdir -p ${WORKSPACE}/results/findbugs_results
 
   # check findbbugs
   set +e
-  cd /net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/findbugs-tool-latest; ./fbcheck $WORKSPACE/main
-  if [ $? -ne 0 ]
+  cd /net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/findbugs-tool-latest; ./findbugscheck ${WORKSPACE}
+  if [ ${?} -ne 0 ]
   then
-     echo "FAILED" > $WORKSPACE/results/findbugs_low_priority_all_results/findbugscheck.log
+     echo "FAILED" > ${WORKSPACE}/results/findbugs_results/findbugscheck.log
   else
-     echo "SUCCESS" > $WORKSPACE/results/findbugs_low_priority_all_results/findbugscheck.log
+     echo "SUCCESS" > ${WORKSPACE}/results/findbugs_results/findbugscheck.log
   fi
   set -e
-  cp /net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/findbugs-tool-latest/fbstatsdetails.log $WORKSPACE/results/findbugs_low_priority_all_results/fbstatsdetails.log | true
   # archive the findbugs results
-  for i in `find $WORKSPACE/main -name findbugsXml.xml`
+  for i in `find ${WORKSPACE} -name findbugsXml.xml`
   do
-     cp $i $WORKSPACE/results/findbugs_low_priority_all_results/`echo $i | sed s@"$WORKSPACE"@@g | sed s@"/"@"_"@g`
+     cp ${i} ${WORKSPACE}/results/findbugs_results/`echo $i | sed s@"${WORKSPACE}"@@g | sed s@"/"@"_"@g`
   done
+  tar -cvf ${WORKSPACE}/${TEST_ID}-results.tar.gz ${WORKSPACE}/results
+}
+
+generate_findbugs_low_priority_all_result(){
+  rm -rf ${WORKSPACE}/results
+  mkdir -p ${WORKSPACE}/results/findbugs_low_priority_all_results
+
+  # check findbbugs
+  set +e
+  cd /net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/findbugs-tool-latest; ./fbcheck ${WORKSPACE}
+  if [ $? -ne 0 ]
+  then
+     echo "FAILED" > ${WORKSPACE}/results/findbugs_low_priority_all_results/findbugscheck.log
+  else
+     echo "SUCCESS" > ${WORKSPACE}/results/findbugs_low_priority_all_results/findbugscheck.log
+  fi
+  set -e
+  cp /net/gf-hudson/scratch/gf-hudson/export2/hudson/tools/findbugs-tool-latest/fbstatsdetails.log ${WORKSPACE}/results/findbugs_low_priority_all_results/fbstatsdetails.log | true
+  # archive the findbugs results
+  for i in `find ${WORKSPACE} -name findbugsXml.xml`
+  do
+     cp ${i} ${WORKSPACE}/results/findbugs_low_priority_all_results/`echo $i | sed s@"${WORKSPACE}"@@g | sed s@"/"@"_"@g`
+  done
+  tar -cvf ${WORKSPACE}/${TEST_ID}-results.tar.gz ${WORKSPACE}/results
 }
 
 run_test_id(){
-	source `dirname $0`/../common_test.sh
-	kill_process
-	rm main.zip rm version-info.txt || true
-	download_test_resources main.zip version-info.txt
-	rm -rf main || true
-	unzip_test_resources "$WORKSPACE/bundles/main.zip -d main/"
+  source `dirname ${0}`/../common_test.sh
+  kill_process
   case ${TEST_ID} in
     findbugs_all)
-   	  findbugs_run
-     	generate_findbugs_result;;
+      findbugs_run
+      generate_findbugs_result;;
     findbugs_low_priority_all)
       findbugs_low_priority_all_run
       generate_findbugs_low_priority_all_result;;
@@ -114,31 +88,28 @@
 }
 
 post_test_run(){
-    if [[ $? -ne 0 ]]; then
-    	if [[ $TEST_ID = "findbugs_all" ]]; then
-	  		generate_findbugs_result || true
-	  	fi
-	  	if [[ $TEST_ID = "findbugs_low_priority_all" ]]; then
-	  		generate_findbugs_low_priority_all_result || true
-	  	fi
-	fi
-    upload_test_results
-    delete_bundle
+  if [[ ${?} -ne 0 ]]; then
+    if [[ ${TEST_ID} = "findbugs_all" ]]; then
+      generate_findbugs_result || true
+    fi
+    if [[ ${TEST_ID} = "findbugs_low_priority_all" ]]; then
+      generate_findbugs_low_priority_all_result || true
+    fi
+  fi
 }
 
-
 list_test_ids(){
-	echo findbugs_all
+  echo findbugs_all
   echo findbugs_low_priority_all
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
 
-case $OPT in
-	list_test_ids )
-		list_test_ids;;
-	run_test_id )
-        trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+case ${OPT} in
+  list_test_ids )
+    list_test_ids;;
+  run_test_id )
+    trap post_test_run EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/gftest.sh b/appserver/tests/gftest.sh
index 322ce82..c7b295c 100755
--- a/appserver/tests/gftest.sh
+++ b/appserver/tests/gftest.sh
@@ -15,77 +15,41 @@
 # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 #
 
-unzip_test_sources(){
-	unzip -d main/  $WORKSPACE/bundles/tests-workspace.zip > /dev/null
-}
-delete_test_sources(){
-	rm -rf $WORKSPACE/main
-	rm -rf $WORKSPACE/bundles
-} 
-download_test_zip(){
-	mkdir bundles
-	scp -o "StrictHostKeyChecking no" ${PARENT_NODE}:${PARENT_WS_PATH}/bundles/tests-workspace.zip bundles
-}
-	
-###########################
-#Start Script
-###########################
-
 run_test(){
-	TEST_ID=$1
-	delete_test_sources
-	download_test_zip
-	unzip_test_sources
-	found=false
+	local testid=${1}
+	local found=false
 	for runtest in `find . -name run_test\.sh`; do
-		for testid in `$runtest list_test_ids`; do
-			if [[ "$testid" = "$TEST_ID" ]]; then
+		for id in `${runtest} list_test_ids`; do
+			if [[ "${id}" = "${testid}" ]]; then
 				found=true
 				break
 			fi
 		done
-		if [[ "$found" = true ]]; then
-			$runtest run_test_id $TEST_ID
+		if [[ "${found}" = true ]]; then
+			${runtest} run_test_id ${testid}
 			break
 		fi
 	done
-	if [[ "$found" = false ]]; then
+	if [[ "${found}" = false ]]; then
 		echo Invalid Test Id.
 		exit 1
 	fi
-
 }
 
-generate_platform(){
-	uname -nsp > /tmp/platform
-	scp -o "StrictHostKeyChecking no" -r /tmp/platform ${PARENT_NODE}:${PARENT_WS_PATH}/test-results/$TEST_ID
-}
+if [ ! -z "${JENKINS_HOME}" ] ; then
 
-list_test_ids(){
-	for runtest in `find . -name run_test\.sh`; do
-		echo `$runtest list_test_ids`
-	done
-}
+  # inject internal environment
+  readonly GF_INTERNAL_ENV_SH=$(mktemp -t XXXgf-internal-env)
+  if [ ! -z "${GF_INTERNAL_ENV}" ] ; then
+    echo "${GF_INTERNAL_ENV}" | base64 -d > ${GF_INTERNAL_ENV_SH}
+    . ${GF_INTERNAL_ENV_SH}
+    export MAVEN_OPTS="${MAVEN_OPTS} ${ANT_OPTS}"
+  fi
+  export WSIMPORT_OPTS="${ANT_OPTS}"
 
-list_group_test_ids(){
-	test_groups=`find . -type d -name test_groups` 
-	test_id_arr+=(`cat  $test_groups/$1 |tr "\n" " "`)
-	echo ${test_id_arr[*]}
-}
+  # setup the local repository
+  # with the archived chunk from the pipeline build stage
+  cat ${WORKSPACE}/bundles/_maven-repo* | tar -xvz -f - --overwrite -m -p -C ${HOME}/.m2/repository
+fi
 
-OPT=$1
-TEST_ID=$2
-
-case $OPT in
-	list_test_ids )
-		if [[ -z $2 ]]; then
-			list_test_ids
-		else
-			list_group_test_ids $2
-		fi;;
-		
-	run_test )
-		trap generate_platform EXIT
-		run_test $TEST_ID ;;
-esac
- 
+"$@"
\ No newline at end of file
diff --git a/appserver/tests/quicklook/build.xml b/appserver/tests/quicklook/build.xml
index 97a218c..5d51007 100644
--- a/appserver/tests/quicklook/build.xml
+++ b/appserver/tests/quicklook/build.xml
@@ -173,7 +173,7 @@
         <antcall target="start-server-felix"/>
         <antcall target="build-deploy"/>
         <antcall target="build-deploy-gd"/>
-        <antcall target="build-cluster"/>
+        <!--<antcall target="build-cluster"/>-->
         <antcall target="runtest">
         <param name="testng.xml" value="testng/testng_gd.xml"/> </antcall>
         <antcall target="undeploy"/>
diff --git a/appserver/tests/quicklook/pom.xml b/appserver/tests/quicklook/pom.xml
index e9136a0..4f5a4f4 100644
--- a/appserver/tests/quicklook/pom.xml
+++ b/appserver/tests/quicklook/pom.xml
@@ -23,6 +23,7 @@
         <groupId>org.eclipse.ee4j</groupId>
         <artifactId>project</artifactId>
         <version>1.0</version>
+        <relativePath/>
     </parent>
     <groupId>org.glassfish.quicklook</groupId>
     <artifactId>quicklook</artifactId>
diff --git a/appserver/tests/quicklook/run_test.sh b/appserver/tests/quicklook/run_test.sh
index a3954ef..ee9148e 100755
--- a/appserver/tests/quicklook/run_test.sh
+++ b/appserver/tests/quicklook/run_test.sh
@@ -16,78 +16,55 @@
 #
 
 copy_ql_results(){
-	cp $WORKSPACE/glassfish5/glassfish/domains/domain1/logs/server.log* $WORKSPACE/results/ || true
-	cp $TEST_RUN_LOG $WORKSPACE/results/
-	cp $WORKSPACE/bundles/version-info.txt $WORKSPACE/results/
-	cp -r test-output/* $WORKSPACE/results/
-	cp test-output/TESTS-TestSuites.xml $WORKSPACE/results/junitreports/test_results_junit.xml
-	cp quicklook_summary.txt $WORKSPACE/results || true
+	if [[ ${1} = "ql_gf_web_profile_all" || ${1} = "ql_gf_full_profile_all" || "ql_gf_embedded_profile_all" = ${1} ]]; then
+		tar -cvf ${WORKSPACE}/results/domainArchive.tar.gz ${WORKSPACE}/glassfish5/glassfish/domains
+		cp ${WORKSPACE}/glassfish5/glassfish/domains/domain1/logs/server.log* ${WORKSPACE}/results/ || true
+		cp -r ${WORKSPACE}/appserver/tests/quicklook/test-output/* ${WORKSPACE}/results/
+		cp ${WORKSPACE}/appserver/tests/quicklook/test-output/TESTS-TestSuites.xml ${WORKSPACE}/results/junitreports/test_results_junit.xml
+		cp ${WORKSPACE}/appserver/tests/quicklook/quicklook_summary.txt ${WORKSPACE}/results || true
+	else
+		cp ${WORKSPACE}/nucleus/domains/domain1/logs/server.log* ${WORKSPACE}/results
+	fi
+	cp ${TEST_RUN_LOG} ${WORKSPACE}/results/
+	tar -cvf ${WORKSPACE}/${1}-results.tar.gz ${WORKSPACE}/results
+	change_junit_report_class_names
 }
 
 run_test_id(){
-	source `dirname $0`/../common_test.sh
-	kill_process
-	delete_gf
-	ql_init	
-	if [[ $1 = "ql_gf_full_profile_all" ]]; then
-	    download_test_resources glassfish.zip tests-maven-repo.zip version-info.txt
-		unzip_test_resources $WORKSPACE/bundles/glassfish.zip "$WORKSPACE/bundles/tests-maven-repo.zip -d $WORKSPACE/repository"	    	
-		cd $WORKSPACE/main/appserver/tests/quicklook/
-		mvn -Dglassfish.home=$WORKSPACE/glassfish5/glassfish -Dmaven.repo.local=$WORKSPACE/repository -Ptest_gd_security,report test | tee $TEST_RUN_LOG
-		copy_ql_results
-	elif [[ $1 = "ql_gf_nucleus_all" || $1 = "nucleus_admin_all" ]]; then
-		download_test_resources nucleus-new.zip tests-maven-repo.zip version-info.txt
-		unzip_test_resources $WORKSPACE/bundles/nucleus-new.zip "$WORKSPACE/bundles/tests-maven-repo.zip -d $WORKSPACE/repository"
-		if [[ $1 = "ql_gf_nucleus_all" ]]; then
-			cd $WORKSPACE/main/nucleus/tests/quicklook
-		elif [[ $1 = "nucleus_admin_all"  ]]; then
-			cd $WORKSPACE/main/nucleus/tests/admin
+	if [[ ${1} = "ql_gf_full_profile_all" ]]; then
+		unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+		cd ${WORKSPACE}/appserver/tests/quicklook/
+		mvn -Dglassfish.home=${S1AS_HOME} -Ptest_gd_security,report test | tee ${TEST_RUN_LOG}
+	elif [[ ${1} = "ql_gf_nucleus_all" || ${1} = "nucleus_admin_all" ]]; then
+		unzip_test_resources ${WORKSPACE}/bundles/nucleus-new.zip
+		if [[ ${1} = "ql_gf_nucleus_all" ]]; then
+			cd ${WORKSPACE}/nucleus/tests/quicklook
+		elif [[ ${1} = "nucleus_admin_all"  ]]; then
+			cd ${WORKSPACE}/nucleus/tests/admin
 		fi
-		mvn -Dmaven.test.failure.ignore=true -Dnucleus.home=$WORKSPACE/nucleus -Dmaven.repo.local=$WORKSPACE/repository clean test | tee $TEST_RUN_LOG
-		cp $WORKSPACE/bundles/version-info.txt $WORKSPACE/results/
-		if [[ $1 = "ql_gf_nucleus_all" ]]; then
-			merge_junit_xmls $WORKSPACE/main/nucleus/tests/quicklook/target/surefire-reports/junitreports
-		elif [[ $1 = "nucleus_admin_all"  ]]; then
-			merge_junit_xmls $WORKSPACE/main/nucleus/tests/admin/target/surefire-reports/junitreports
+		mvn -Dmaven.test.failure.ignore=true -Dnucleus.home=${WORKSPACE}/nucleus clean test | tee ${TEST_RUN_LOG}
+		if [[ ${1} = "ql_gf_nucleus_all" ]]; then
+			merge_junit_xmls ${WORKSPACE}/nucleus/tests/quicklook/target/surefire-reports/junitreports
+		elif [[ ${1} = "nucleus_admin_all"  ]]; then
+			merge_junit_xmls ${WORKSPACE}/nucleus/tests/admin/target/surefire-reports/junitreports
 		fi
-		cp $WORKSPACE/nucleus/domains/domain1/logs/server.log* $WORKSPACE/results
-		cp $TEST_RUN_LOG $WORKSPACE/results/
-	elif [[ $1 = "ql_gf_web_profile_all" || $1 = "ql_gf_embedded_profile_all" ]]; then
-		download_test_resources web.zip tests-maven-repo.zip version-info.txt
-		unzip_test_resources $WORKSPACE/bundles/web.zip "$WORKSPACE/bundles/tests-maven-repo.zip -d $WORKSPACE/repository"
-		cd $WORKSPACE/main/appserver/tests/quicklook/
-		if [[ $1 = "ql_gf_web_profile_all" ]]; then
-			mvn -Dglassfish.home=$WORKSPACE/glassfish5/glassfish -Dmaven.repo.local=$WORKSPACE/repository -Ptest_wd_security,report test | tee $TEST_RUN_LOG
-		elif [[ $1 = "ql_gf_embedded_profile_all" ]]; then
-			mvn -Dglassfish.home=$WORKSPACE/glassfish5/glassfish -Dmaven.repo.local=$WORKSPACE/repository -Ptest_em,report test | tee $TEST_RUN_LOG
+	elif [[ ${1} = "ql_gf_web_profile_all" || $1 = "ql_gf_embedded_profile_all" ]]; then
+    unzip_test_resources ${WORKSPACE}/bundles/web.zip
+		cd ${WORKSPACE}/appserver/tests/quicklook/
+		if [[ ${1} = "ql_gf_web_profile_all" ]]; then
+			mvn -Dglassfish.home=${S1AS_HOME} -Ptest_wd_security,report test | tee ${TEST_RUN_LOG}
+		elif [[ ${1} = "ql_gf_embedded_profile_all" ]]; then
+			mvn -Dglassfish.home=${S1AS_HOME} -Ptest_em,report test | tee ${TEST_RUN_LOG}
 		fi
-		copy_ql_results
 	else
 		echo "Invalid Test Id"
 		exit 1
 	fi
-    change_junit_report_class_names
-}
-
-post_test_run(){
-    if [[ $? -ne 0 ]]; then
-    	if [[ $TEST_ID = "ql_gf_full_profile_all" || $TEST_ID = "ql_gf_web_profile_all" || $TEST_ID = "ql_gf_embedded_profile_all" ]]; then
-	  		copy_ql_results || true
-	  	fi
-	  	if [[ $TEST_ID = "ql_gf_nucleus_all" || $TEST_ID = "nucleus_admin_all" ]]; then
-	  		cp $WORKSPACE/bundles/version-info.txt $WORKSPACE/results/ || true
-	  		cp $WORKSPACE/nucleus/domains/domain1/logs/server.log* $WORKSPACE/results || true
-		    cp $TEST_RUN_LOG $WORKSPACE/results/ || true
-	  	fi
-	fi
-    upload_test_results
-    delete_bundle
-    cd -
 }
 
 merge_junit_xmls(){
-  JUD_DIR=$1
-  JUD=$WORKSPACE/results/junitreports/test_results_junit.xml
+  JUD_DIR=${1}
+  JUD=${WORKSPACE}/results/junitreports/test_results_junit.xml
   rm -f ${JUD} || true
   echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> ${JUD}
   echo "<testsuites>" >> ${JUD}
@@ -99,13 +76,15 @@
 	echo ql_gf_full_profile_all ql_gf_nucleus_all ql_gf_web_profile_all ql_gf_embedded_profile_all nucleus_admin_all
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
+source `dirname ${0}`/../common_test.sh
+mkdir -p ${WORKSPACE}/results/junitreports
 
-case $OPT in
+case ${OPT} in
 	list_test_ids )
 		list_test_ids;;
 	run_test_id )
-        trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+    trap "copy_ql_results ${TEST_ID}" EXIT
+		run_test_id ${TEST_ID} ;;
 esac
diff --git a/appserver/tests/quicklook/testng/testng_gd.xml b/appserver/tests/quicklook/testng/testng_gd.xml
index 9057355..f00e3fb 100644
--- a/appserver/tests/quicklook/testng/testng_gd.xml
+++ b/appserver/tests/quicklook/testng/testng_gd.xml
@@ -157,7 +157,7 @@
         <class name="test.osgi.hello.HelloOSGITestNG" />
     </classes>
   </test>
-  <test name="cluster_setup">
+<!--  <test name="cluster_setup">
     <classes>
         <class name="test.clustersetup.ClusterSetupTest"/>
     </classes>
@@ -171,7 +171,7 @@
     <classes>
         <class name="test.clusterteardown.ClusterTeardownTest"/>
     </classes>
-  </test>
+  </test>-->
   <test name="jms_injection_jmsContext">
     <classes>
 	    <class name="test.jms.injection.ClientTestNG"/>
diff --git a/appserver/tests/rq.sh b/appserver/tests/rq.sh
deleted file mode 100755
index aae76dd..0000000
--- a/appserver/tests/rq.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/bash -e
-#
-# Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0, which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# This Source Code may also be made available under the following Secondary
-# Licenses when the conditions for such availability set forth in the
-# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-# version 2 with the GNU Classpath Exception, which is available at
-# https://www.gnu.org/software/classpath/license.html.
-#
-# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-#
-
-USAGE="Usage:\n\n 1. rq.sh -l ---> List all available test identifiers without running them\n\
-	   2. rq.sh -b <branch> -a ---> For running all tests in remote branch\n\
-	   3. rq.sh -b <branch> -g <test_group_name> ---> For running a test group\n\
-	   4. rq.sh -b <branch> -t \"<test_id1> <test_id2> <test_id3>\" ---> For running a space separated list of tests\n\
-	   5. rq.sh -u <glassfish binary url>  -a|-u|-t ---> For running all tests with GlassFish binary provided in the http url.-u option works with -a, -g and -t options as well\n\
-	   6. rq.sh -b <branch> -a|-u|-t -e <email-id> ---> For getting the test results in the email id.This works with -a -t and -g options"
-	   
-
-list_test_ids(){
-	for runtest in `find . -name run_test\.sh`; do
-		echo `$runtest list_test_ids`
-	done
-}
-
-list_group_test_ids(){
-	test_groups=`find . -type d -name test_groups` 
-	test_id_arr+=(`cat  $test_groups/$1 |tr "\n" " "`)
-	echo ${test_id_arr[*]}
-}
-
-if [[ -z $GLASSFISH_REMOTE_QUEUE_URL ]]; then
-	echo "Please enter hudson url"
-	exit 1
-fi
-
-OPTIND=1    
-
-output_file=""
-verbose=0
-
-if [ $# -eq 0 ];
-then
-    echo -e $USAGE
-    exit 0
-fi    
-while getopts ":b:t:g:e:u:al" opt; do
-    case "$opt" in
-    b)	branch=$OPTARG;;
-    t)  test_ids=($OPTARG);;
-    a)  test_ids=(`list_test_ids`);;
-	g)  test_ids=(`list_group_test_ids $OPTARG`);;
-	l)	test_ids=(`list_test_ids`)
-		echo ${test_ids[@]} | tr " " "\n"
-		exit 0;;
-	e)  GLASSFISH_REMOTE_QUEUE_EMAIL=$OPTARG;;
-	u)  url=$OPTARG;;
-    *)	echo -e "Invalid option"
-		echo -e $USAGE
-		exit 1 ;;         
-    esac
-done
-
-shift $((OPTIND-1))
-
-if [[ -z $branch && -z $url ]]; then
-	echo "Please provide a remote branch or a glassfish binary url to trigger glassfish remote queue"
-	echo -e $USAGE
-	exit 1
-fi
-if [[ -z $test_ids ]]; then
-	echo "test id is missing"
-	echo -e $USAGE
-	exit 1
-fi
-if [[ -z $GLASSFISH_REMOTE_QUEUE_EMAIL && ! -z $branch ]]; then
-	echo "EMAIL_ID is missing"
-	echo -e $USAGE
-	exit 1
-fi
-fork_origin=`git config --get remote.origin.url`
-test_ids_encoded=`echo ${test_ids[@]} | tr ' ' '+'`
-params="BRANCH=${branch}&TEST_IDS=${test_ids_encoded}&FORK_ORIGIN=${fork_origin}&URL=${url}&EMAIL_ID=${GLASSFISH_REMOTE_QUEUE_EMAIL}"
-status=`curl -s -o /dev/null -w "%{http_code}" -X POST "${GLASSFISH_REMOTE_QUEUE_URL}/buildWithParameters?${params}&delay=0sec"`
-echo $status
-echo "----------------------------------------------------------------------------"
-if [[ ${status} -eq 201 ]]; then
-	printf "RQ triggered successfully. You will get the job link via email shortly\n"
-	echo "----------------------------------------------------------------------------"
-else
-	printf "Issue in RQ client.Please check your settings\n"
-    echo "----------------------------------------------------------------------------"
-fi
diff --git a/appserver/tests/sqe_smoke/run_test.sh b/appserver/tests/sqe_smoke/run_test.sh
index 6b6400b..1e4e478 100755
--- a/appserver/tests/sqe_smoke/run_test.sh
+++ b/appserver/tests/sqe_smoke/run_test.sh
@@ -16,171 +16,158 @@
 #
 
 test_run_sqe_smoke(){
-        GF_MAVEN=gf-maven.us.oracle.com
-        INTERNAL_RELEASE_REPO=http://$GF_MAVEN/nexus/content/repositories/gf-internal-release
-	SPS_HOME=$WORKSPACE/appserver-sqe; export SPS_HOME
-	# MACHINE CONFIGURATION
-	pwd
-	uname -a
-	java -version
-        svn --version
-        # CLEANUPS
-        kill_clean `ps -ef |grep jre|grep -v grep|cut -f4,5 -d" "`
-        kill_clean `jps |grep Main |grep -v grep |cut -f1 -d" "`
-        kill_clean `ps -ef | grep $WORKSPACE/glassfish5/glassfish|grep -v grep`
-        
-        curl --noproxy $GF_MAVEN $INTERNAL_RELEASE_REPO/com/oracle/glassfish/sqe-smoke/1.0/sqe-smoke-1.0.zip > bundles/sqe-smoke.zip
-        unzip bundles/sqe-smoke.zip
-        
-        cd $SPS_HOME
-        ant start-domain v3g-smoke-test stop-domain
-        archive_artifacts
+  if [[ -z ${INTERNAL_RELEASE_REPO} ]]; then
+    echo "error: INTERNAL_RELEASE_REPO is not set"
+    exit 1
+  fi
+  SPS_HOME=${WORKSPACE}/appserver-sqe; export SPS_HOME
+  # MACHINE CONFIGURATION
+  pwd
+  uname -a
+  java -version
+
+  # CLEANUPS
+  kill_clean `ps -ef |grep jre|grep -v grep|cut -f4,5 -d" "`
+  kill_clean `jps |grep Main |grep -v grep |cut -f1 -d" "`
+  kill_clean `ps -ef | grep ${WORKSPACE}/glassfish5/glassfish|grep -v grep`
+
+  curl --noproxy '*' ${INTERNAL_RELEASE_REPO}/com/oracle/glassfish/sqe-smoke/1.0/sqe-smoke-1.0.zip > bundles/sqe-smoke.zip
+  unzip bundles/sqe-smoke.zip
+
+  cd ${SPS_HOME}
+  ant start-domain v3g-smoke-test stop-domain
+  archive_artifacts
 }
 
 run_test_id(){
-	source `dirname $0`/../common_test.sh
-	kill_process
-	delete_workspace
-	download_test_resources glassfish.zip version-info.txt
-	unzip_test_resources $WORKSPACE/bundles/glassfish.zip
-	test_init
-	if [[ $1 = "sqe_smoke_all" ]]; then
-		test_run_sqe_smoke
-		result=$WORKSPACE/results/test_resultsValid.xml
-                resultGtest=$WORKSPACE/results/security-gtest-results-valid.xml
-	else
-		echo "Invalid Test ID"
-		exit 1
-	fi
-    generate_junit_report_sqe $1 $result $WORKSPACE/results/test_results_junit.xml 
-    generate_junit_report_sqe $1 $resultGtest $WORKSPACE/results/test_results_gtest_junit.xml
-    merge_junit_xmls $WORKSPACE/results/test_results_junit.xml $WORKSPACE/results/test_results_gtest_junit.xml
-    change_junit_report_class_names
+  source `dirname ${0}`/../common_test.sh
+  kill_process
+  unzip_test_resources ${WORKSPACE}/bundles/glassfish.zip
+  test_init
+  if [[ ${1} = "sqe_smoke_all" ]]; then
+    test_run_sqe_smoke | tee ${TEST_RUN_LOG}
+    result=${WORKSPACE}/results/test_resultsValid.xml
+    resultGtest=${WORKSPACE}/results/security-gtest-results-valid.xml
+  else
+    echo "Invalid Test ID"
+    exit 1
+  fi
+  generate_junit_report_sqe ${1} ${result} ${WORKSPACE}/results/test_results_junit.xml
+  generate_junit_report_sqe ${1} ${resultGtest} ${WORKSPACE}/results/test_results_gtest_junit.xml
+  merge_junit_xmls ${WORKSPACE}/results/test_results_junit.xml ${WORKSPACE}/results/test_results_gtest_junit.xml
+  change_junit_report_class_names
 }
 
 archive_artifacts(){
-	# Archiving
-    cp $S1AS_HOME/domains/domain1/logs/server.log* $WORKSPACE/results 
-	cp $SPS_HOME/summaryreport-v3smoke.html $WORKSPACE/results/ST-GP-report.html
-	cp $SPS_HOME/count.txt $WORKSPACE/results
-	cp $SPS_HOME/test_resultsValid.xml $WORKSPACE/results
-    find $SPS_HOME/reports -name security-gtest-results-valid.xml -exec cp '{}' $WORKSPACE/results \; > /dev/null || true        
+  cp ${S1AS_HOME}/domains/domain1/logs/server.log* ${WORKSPACE}/results
+  cp ${SPS_HOME}/summaryreport-v3smoke.html ${WORKSPACE}/results/ST-GP-report.html
+  cp ${SPS_HOME}/count.txt ${WORKSPACE}/results
+  cp ${SPS_HOME}/test_resultsValid.xml ${WORKSPACE}/results
+  cp ${TEST_RUN_LOG} ${WORKSPACE}/results/
+  find ${SPS_HOME}/reports -name security-gtest-results-valid.xml -exec cp '{}' ${WORKSPACE}/results \; > /dev/null || true
+  tar -cvf ${WORKSPACE}/${TEST_ID}-results.tar.gz ${WORKSPACE}/results
 }
+
 merge_junit_xmls(){
-  JUD_1=$1
-  JUD_2=$2
-  JUD=$WORKSPACE/results/junitreports/test_results_junit.xml
+  JUD_1=${1}
+  JUD_2=${2}
+  JUD=${WORKSPACE}/results/junitreports/test_results_junit.xml
   rm -f ${JUD} || true
   echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >> ${JUD}
   echo "<testsuites>" >> ${JUD}
-  cat $1 >> ${JUD}
-  cat $2 >> ${JUD}
+  cat ${1} >> ${JUD}
+  cat ${2} >> ${JUD}
   echo "</testsuites>" >> ${JUD}
 }
 
-
 generate_junit_report_sqe(){
-	printf "\n%s \n\n" "===== GENERATE JUNIT REPORT ====="
-	TD=$2
-	JUD=$3
-	TESTSUITE_NAME=$1
+  printf "\n%s \n\n" "===== GENERATE JUNIT REPORT ====="
+  TD=${2}
+  JUD=${3}
+  TESTSUITE_NAME=${1}
 
-	cat ${TD} | ${AWK} -v suitename=${TESTSUITE_NAME} '
-	  BEGIN {
-	    totaltests = 0;
-	    totalfailures = 0;
-	    totalerrors = 0;
-	  }
-	  function getPropVal(str){
-	    split(str, a, "=");
-	    val = a[2];
-	    # remove quotes
-	    gsub("\"","",val);
-	    return val;
-	  }
-	   function removeXMLTag(str){  
-	    # remove xml tag quotes
-	    gsub("</.*>","",str);
-	    gsub("<.*>","",str);
-	    gsub(">","",str);
-	    return str;
-	  }
-	  /status value=/ {
-	    result=getPropVal($0);
-	    result=removeXMLTag(result);
-	  }
-	  /<testsuite>/ {
-	    getline;
-	    getline;
+  cat ${TD} | ${AWK} -v suitename=${TESTSUITE_NAME} '
+    BEGIN {
+      totaltests = 0;
+      totalfailures = 0;
+      totalerrors = 0;
+    }
+    function getPropVal(str){
+      split(str, a, "=");
+      val = a[2];
+      # remove quotes
+      gsub("\"","",val);
+      return val;
+    }
+     function removeXMLTag(str){
+      # remove xml tag quotes
+      gsub("</.*>","",str);
+      gsub("<.*>","",str);
+      gsub(">","",str);
+      return str;
+    }
+    /status value=/ {
+      result=getPropVal($0);
+      result=removeXMLTag(result);
+    }
+    /<testsuite>/ {
+      getline;
+      getline;
             getline;
-	    testunit=removeXMLTag($0);
-	    gsub("\"","",testunit);
-	  }
-	  /<testcase>/ {
-	    getline;
-	    testname=removeXMLTag($0);
-	    gsub("\"","",testname);
-	  }
-	  /<\/testcase>/{
-	    classname=testunit
-	    # printing testcase to out
-	    out = out sprintf(" <testcase classname=\"%s\" name=\"%s\" time=\"0.0\">\n", classname, testname);
-	    if (result == "fail") {
-	     out = out "  <failure message=\"NA\" type=\"NA\"/>\n";
-	     totalfailures++;
-	    } else if (result == "did_not_run") {
-	     out = out "  <error message=\"NA\" type=\"NA\"/>\n";
-	     totalerrors++;
-	    }
-	    out = out " </testcase>\n";
+      testunit=removeXMLTag($0);
+      gsub("\"","",testunit);
+    }
+    /<testcase>/ {
+      getline;
+      testname=removeXMLTag($0);
+      gsub("\"","",testname);
+    }
+    /<\/testcase>/{
+      classname=testunit
+      # printing testcase to out
+      out = out sprintf(" <testcase classname=\"%s\" name=\"%s\" time=\"0.0\">\n", classname, testname);
+      if (result == "fail") {
+       out = out "  <failure message=\"NA\" type=\"NA\"/>\n";
+       totalfailures++;
+      } else if (result == "did_not_run") {
+       out = out "  <error message=\"NA\" type=\"NA\"/>\n";
+       totalerrors++;
+      }
+      out = out " </testcase>\n";
 
-	    totaltests++;
-	    result="";
-	    testname="";
-	  }
-	  END {	    
-	    printf "<testsuite tests=\"%d\" failures=\"%d\" errors=\"%d\" name=\"%s\">\n", totaltests, totalfailures, totalerrors, suitename;
-	    printf "%s", out;
-	    print "</testsuite>"
-	  }' > ${JUD}
+      totaltests++;
+      result="";
+      testname="";
+    }
+    END {
+      printf "<testsuite tests=\"%d\" failures=\"%d\" errors=\"%d\" name=\"%s\">\n", totaltests, totalfailures, totalerrors, suitename;
+      printf "%s", out;
+      print "</testsuite>"
+    }' > ${JUD}
 }
 
 
 list_test_ids(){
-	echo sqe_smoke_all
+  echo sqe_smoke_all
 }
 
-
-delete_workspace(){
-	printf "\n%s \n\n" "===== DELETE WORKSPACE ====="
-    rm -rf $WORKSPACE/glassfish5 > /dev/null || true
-    rm -rf $WORKSPACE/appserver-sqe > /dev/null  || true
-    rm -rf $WORKSPACE/sqe-smoke.zip > /dev/null || true
-    for f in `find $WORKSPACE -type f`; do
-    	rm $f > /dev/null
-    done
-} 
-
-kill_clean(){ 
+kill_clean(){
   if [ ${#1} -ne 0 ] ; then kill -9 $1 ; fi 
 }
 
 post_test_run(){
-	if [[ $? -ne 0 ]]; then
-	  archive_artifacts
-	fi
-    upload_test_results
-    delete_bundle
-    cd -
+  if [[ $? -ne 0 ]]; then
+    archive_artifacts
+  fi
 }
 
-OPT=$1
-TEST_ID=$2
+OPT=${1}
+TEST_ID=${2}
 
-case $OPT in
-	list_test_ids )
-		list_test_ids;;
-	run_test_id )
-		trap post_test_run EXIT
-		run_test_id $TEST_ID ;;
+case ${OPT} in
+  list_test_ids )
+    list_test_ids;;
+  run_test_id )
+    trap post_test_run EXIT
+    run_test_id ${TEST_ID} ;;
 esac
diff --git a/etc/docker/.dockerignore b/etc/docker/.dockerignore
new file mode 100644
index 0000000..33ceb8f
--- /dev/null
+++ b/etc/docker/.dockerignore
@@ -0,0 +1 @@
+Makefile
\ No newline at end of file
diff --git a/etc/docker/Dockerfile b/etc/docker/Dockerfile
new file mode 100644
index 0000000..4b5995b
--- /dev/null
+++ b/etc/docker/Dockerfile
@@ -0,0 +1,28 @@
+FROM maven:3.5.4-jdk-8
+
+RUN apt-get update && \
+    apt-get install -y apt-utils ant unzip tar wget zip sendmail && \
+    # install takari extensions for
+    # process/thread safe access to the local repository
+    curl -O http://repo1.maven.org/maven2/io/takari/aether/takari-local-repository/0.11.2/takari-local-repository-0.11.2.jar && \
+    mv takari-local-repository-0.11.2.jar ${MAVEN_HOME}/lib/ext/ && \
+    curl -O http://repo1.maven.org/maven2/io/takari/takari-filemanager/0.8.3/takari-filemanager-0.8.3.jar && \
+    mv takari-filemanager-0.8.3.jar ${MAVEN_HOME}/lib/ext/ && \
+    # custom user
+    useradd -l -r -d /home/jenkins -u 1000100000 -g root -s /bin/bash jenkins && \
+    mkdir -p /home/jenkins/.m2/repository/org/glassfish/main && \
+    chmod 777 -R /home/jenkins/.m2/repository/org/glassfish/main && \
+    chown -R jenkins:root /home/jenkins
+
+COPY ./entrypoint.sh /etc/entrypoint.sh
+RUN chmod +x /etc/entrypoint.sh
+
+ENV M2_HOME /usr/share/maven
+ENV ANT_HOME /usr/share/ant
+ENV JAVA_TOOL_OPTIONS "-Xmx2G"
+
+ENV HOME /home/jenkins
+WORKDIR /home/jenkins
+USER jenkins
+
+ENTRYPOINT [ "/etc/entrypoint.sh" ]
\ No newline at end of file
diff --git a/etc/docker/Makefile b/etc/docker/Makefile
new file mode 100644
index 0000000..81af4ea
--- /dev/null
+++ b/etc/docker/Makefile
@@ -0,0 +1,17 @@
+SHELL := /bin/bash
+IMAGE_TAG = jdk-8.181
+
+.PHONY: clean docker-clean docker-build docker-push
+
+default: docker-build
+
+clean: docker-clean
+
+docker-clean:
+	docker rmi ee4jglassfish/ci:$(IMAGE_TAG)
+
+docker-build:
+	docker build -t ee4jglassfish/ci:$(IMAGE_TAG) .
+
+docker-push:
+	docker push ee4jglassfish/ci:$(IMAGE_TAG)
\ No newline at end of file
diff --git a/etc/docker/entrypoint.sh b/etc/docker/entrypoint.sh
new file mode 100755
index 0000000..632fedf
--- /dev/null
+++ b/etc/docker/entrypoint.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+echo "starting sendmail..."
+/usr/sbin/sendmail -bd -q1h
+
+exec "$@"
\ No newline at end of file
diff --git a/gfbuild.sh b/gfbuild.sh
new file mode 100755
index 0000000..519c860
--- /dev/null
+++ b/gfbuild.sh
@@ -0,0 +1,96 @@
+#!/bin/bash -e
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common Development
+# and Distribution License("CDDL") (collectively, the "License").  You
+# may not use this file except in compliance with the License.  You can
+# obtain a copy of the License at
+# https://oss.oracle.com/licenses/CDDL+GPL-1.1
+# or LICENSE.txt.  See the License for the specific
+# language governing permissions and limitations under the License.
+#
+# When distributing the software, include this License Header Notice in each
+# file and include the License file at LICENSE.txt.
+#
+# GPL Classpath Exception:
+# Oracle designates this particular file as subject to the "Classpath"
+# exception as provided by Oracle in the GPL Version 2 section of the License
+# file that accompanied this code.
+#
+# Modifications:
+# If applicable, add the following below the License Header, with the fields
+# enclosed by brackets [] replaced by your own identifying information:
+# "Portions Copyright [year] [name of copyright owner]"
+#
+# Contributor(s):
+# If you wish your version of this file to be governed by only the CDDL or
+# only the GPL Version 2, indicate your decision by adding "[Contributor]
+# elects to include this software in this distribution under the [CDDL or GPL
+# Version 2] license."  If you don't indicate a single choice of license, a
+# recipient has the option to distribute your version of this file under
+# either the CDDL, the GPL Version 2 or to extend the choice of license to
+# its licensees as provided above.  However, if you add GPL Version 2 code
+# and therefore, elected the GPL Version 2 license, then the option applies
+# only if the new code is made subject to such option by the copyright
+# holder.
+#
+
+merge_junits(){
+  local test_id="build-unit-tests"
+  rm -rf ${WORKSPACE}/test-results && \
+  mkdir -p ${WORKSPACE}/test-results/${test_id}/results/junitreports
+  local jud="${WORKSPACE}/test-results/${test_id}/results/junitreports/test_results_junit.xml"
+  echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > ${jud}
+  echo "<testsuites>" >> ${jud}
+  for i in `find . -type d -name "surefire-reports"`
+  do    
+    ls -d -1 ${i}/*.xml | xargs cat | sed 's/<?xml version=\"1.0\" encoding=\"UTF-8\" *?>//g' >> ${jud}
+  done
+  echo "</testsuites>" >> ${jud}
+  sed -i 's/\([a-zA-Z-]\w*\)\./\1-/g' ${jud}
+  sed -i "s/\bclassname=\"/classname=\"${test_id}./g" ${jud}
+}
+
+archive_bundles(){
+  mkdir -p ${WORKSPACE}/bundles
+  cp appserver/distributions/glassfish/target/*.zip ${WORKSPACE}/bundles
+  cp appserver/distributions/web/target/*.zip ${WORKSPACE}/bundles
+  cp nucleus/distributions/nucleus/target/*.zip ${WORKSPACE}/bundles
+}
+
+dev_build(){
+  mvn -U clean install -Dmaven.test.failure.ignore=true -Pstaging
+}
+
+build_re_dev(){
+  dev_build
+  archive_bundles
+  merge_junits
+}
+
+if [ -z "${WORKSPACE}" ] ; then
+  export WORKSPACE=`dirname ${0}`
+fi
+
+if [ ! -z "${JENKINS_HOME}" ] ; then
+
+  # inject internal environment
+  readonly GF_INTERNAL_ENV_SH=$(mktemp -t XXXgf-internal-env)
+  if [ ! -z "${GF_INTERNAL_ENV}" ] ; then
+    echo "${GF_INTERNAL_ENV}" | base64 -d > ${GF_INTERNAL_ENV_SH}
+    . ${GF_INTERNAL_ENV_SH}
+    export MAVEN_OPTS="${MAVEN_OPTS} ${ANT_OPTS}"
+  fi
+fi
+
+"$@"
+
+if [ ! -z "${JENKINS_HOME}" ] ; then
+  # archive the local repository org.glassfish.main
+  # the output is a tar archive split into 1MB chunks.
+  tar -cz -f - -C ${HOME}/.m2/repository org/glassfish/main | split -b 1m - ${WORKSPACE}/bundles/_maven-repo
+fi
\ No newline at end of file
diff --git a/nucleus/parent/pom.xml b/nucleus/parent/pom.xml
index 7177517..fe477aa 100644
--- a/nucleus/parent/pom.xml
+++ b/nucleus/parent/pom.xml
@@ -23,6 +23,7 @@
         <groupId>org.eclipse.ee4j</groupId>
         <artifactId>project</artifactId>
         <version>1.0.4</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.glassfish.main</groupId>
@@ -1120,4 +1121,17 @@
             <optional>true</optional>
         </dependency>
     </dependencies>
+    <repositories>
+        <repository>
+          <id>jvnet-nexus-release</id>
+          <name>Java.net Release Repository</name>
+          <url>https://maven.java.net/content/repositories/releases</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+    </repositories>
 </project>