Bump karaf version to 4.2.5

Change-Id: Ib03f6f11e923f38f6d9a2a36f170f17addbbb290
diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl
index 812fd25..7a63888 100644
--- a/tools/build/bazel/generate_workspace.bzl
+++ b/tools/build/bazel/generate_workspace.bzl
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Wed, 24 Apr 2019 18:41:52 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Thu, 25 Apr 2019 21:24:45 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION")
@@ -871,21 +871,21 @@
     if "org_apache_karaf_features_core" not in native.existing_rules():
         java_import_external(
             name = "org_apache_karaf_features_core",
-            jar_sha256 = "d8f0d4316853f735ea1fef76fcc923114e244ea2a7f45e9ccc1ec4753e49d685",
+            jar_sha256 = "d381e975d68712f6adafca6b6f0e08d44820c3967b7bdd1b2ddb2aef2191ef41",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/features/org.apache.karaf.features.core/4.2.3/org.apache.karaf.features.core-4.2.3.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/features/org.apache.karaf.features.core/4.2.5/org.apache.karaf.features.core-4.2.5.jar"],        )
     if "org_apache_karaf_shell_console" not in native.existing_rules():
         java_import_external(
             name = "org_apache_karaf_shell_console",
-            jar_sha256 = "47db2aff03a724afc597d1bb09838e5ed44d898fb77a4cd49ddcd8571295496a",
+            jar_sha256 = "d455ea80c19b7474c2056b36b193bb5a3433c616a3747508f9978917b478d6a5",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/4.2.3/org.apache.karaf.shell.console-4.2.3.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/4.2.5/org.apache.karaf.shell.console-4.2.5.jar"],        )
     if "org_apache_karaf_shell_core" not in native.existing_rules():
         java_import_external(
             name = "org_apache_karaf_shell_core",
-            jar_sha256 = "0488d661c1f5f7eb151812538d7bbd06655ad3e436fa4251f2d5b65540f65810",
+            jar_sha256 = "575915200c7223b18a586d6ae01bf6a544751045158cf7bf8264b3b5a70c5d01",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.core/4.2.3/org.apache.karaf.shell.core-4.2.3.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.core/4.2.5/org.apache.karaf.shell.core-4.2.5.jar"],        )
     if "org_apache_httpcomponents_httpasyncclient_osgi" not in native.existing_rules():
         java_import_external(
             name = "org_apache_httpcomponents_httpasyncclient_osgi",
@@ -901,15 +901,15 @@
     if "org_apache_karaf_jaas" not in native.existing_rules():
         java_import_external(
             name = "org_apache_karaf_jaas",
-            jar_sha256 = "5648ad5645f5c0a4aaedd2e17ff407195348803ddbcc530a3ac25938c84c0c22",
+            jar_sha256 = "0087b0cb0deac4539bd8cfda19f57be1e08294c342e841d9b2064e2ce03d16bd",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/jaas/org.apache.karaf.jaas.modules/4.2.3/org.apache.karaf.jaas.modules-4.2.3.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/jaas/org.apache.karaf.jaas.modules/4.2.5/org.apache.karaf.jaas.modules-4.2.5.jar"],        )
     if "org_apache_karaf_system_core" not in native.existing_rules():
         java_import_external(
             name = "org_apache_karaf_system_core",
-            jar_sha256 = "135b74b58abfca5f111d66fda6ce927eb9700ffa2ada7737d72cd6a39606d08b",
+            jar_sha256 = "d497e11092f8b5b534fd5ad6a4502bafbc3128df5219e071c3b4d01b01c3c340",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/system/org.apache.karaf.system.core/4.2.3/org.apache.karaf.system.core-4.2.3.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/org/apache/karaf/system/org.apache.karaf.system.core/4.2.5/org.apache.karaf.system.core-4.2.5.jar"],        )
     if "org_apache_servicemix_bundles_snmp4j" not in native.existing_rules():
         java_import_external(
             name = "org_apache_servicemix_bundles_snmp4j",
@@ -1009,9 +1009,9 @@
     if "apache_karaf" not in native.existing_rules():
         java_import_external(
             name = "apache_karaf",
-            jar_sha256 = "2d35d9a4f2b4cb67cf339fc3645925e257ba530170e2c95ffc7418a2ad3fc16a",
+            jar_sha256 = "45421f2a165838b6746fbcc418fdd3fc251dbfd54f8532abd6d9825fc4e1bdd1",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.3-offline-20190213/apache-karaf-offline-4.2.3-offline-20190213.tar.gz"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.5-offline-201904251/apache-karaf-4.2.5-offline-201904251.tar.gz"],        )
     if "bndlib" not in native.existing_rules():
         java_import_external(
             name = "bndlib",
@@ -1449,13 +1449,13 @@
 artifact_map["@org_osgi_service_metatype_annotations//:org_osgi_service_metatype_annotations"] = "mvn:org.osgi:org.osgi.service.metatype.annotations:jar:1.4.0"
 artifact_map["@org_osgi_service_cm//:org_osgi_service_cm"] = "mvn:org.osgi:org.osgi.service.cm:jar:1.6.0"
 artifact_map["@org_apache_felix_scr_bnd//:org_apache_felix_scr_bnd"] = "mvn:org.apache.felix:org.apache.felix.scr.bnd:jar:NON-OSGI:1.9.0"
-artifact_map["@org_apache_karaf_features_core//:org_apache_karaf_features_core"] = "mvn:org.apache.karaf.features:org.apache.karaf.features.core:jar:4.2.3"
-artifact_map["@org_apache_karaf_shell_console//:org_apache_karaf_shell_console"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.console:jar:4.2.3"
-artifact_map["@org_apache_karaf_shell_core//:org_apache_karaf_shell_core"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.core:jar:4.2.3"
+artifact_map["@org_apache_karaf_features_core//:org_apache_karaf_features_core"] = "mvn:org.apache.karaf.features:org.apache.karaf.features.core:jar:4.2.5"
+artifact_map["@org_apache_karaf_shell_console//:org_apache_karaf_shell_console"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.console:jar:4.2.5"
+artifact_map["@org_apache_karaf_shell_core//:org_apache_karaf_shell_core"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.core:jar:4.2.5"
 artifact_map["@org_apache_httpcomponents_httpasyncclient_osgi//:org_apache_httpcomponents_httpasyncclient_osgi"] = "mvn:org.apache.httpcomponents:httpasyncclient-osgi:jar:4.1.2"
 artifact_map["@org_apache_httpcomponents_httpcore_nio//:org_apache_httpcomponents_httpcore_nio"] = "mvn:org.apache.httpcomponents:httpcore-nio:jar:NON-OSGI:4.4.4"
-artifact_map["@org_apache_karaf_jaas//:org_apache_karaf_jaas"] = "mvn:org.apache.karaf.jaas:org.apache.karaf.jaas.modules:jar:4.2.3"
-artifact_map["@org_apache_karaf_system_core//:org_apache_karaf_system_core"] = "mvn:org.apache.karaf.system:org.apache.karaf.system.core:jar:4.2.3"
+artifact_map["@org_apache_karaf_jaas//:org_apache_karaf_jaas"] = "mvn:org.apache.karaf.jaas:org.apache.karaf.jaas.modules:jar:4.2.5"
+artifact_map["@org_apache_karaf_system_core//:org_apache_karaf_system_core"] = "mvn:org.apache.karaf.system:org.apache.karaf.system.core:jar:4.2.5"
 artifact_map["@org_apache_servicemix_bundles_snmp4j//:org_apache_servicemix_bundles_snmp4j"] = "mvn:org.apache.servicemix.bundles:org.apache.servicemix.bundles.snmp4j:jar:2.3.4_1"
 artifact_map["@org_osgi_compendium//:org_osgi_compendium"] = "mvn:org.osgi:org.osgi.compendium:jar:5.0.0"
 artifact_map["@org_osgi_cmpn//:org_osgi_cmpn"] = "mvn:org.osgi:osgi.cmpn:jar:7.0.0"
@@ -1472,7 +1472,7 @@
 artifact_map["@typesafe_config//:typesafe_config"] = "mvn:com.typesafe:config:jar:1.3.2"
 artifact_map["@validation_api//:validation_api"] = "mvn:javax.validation:validation-api:jar:1.1.0.Final"
 artifact_map["@checkstyle//:checkstyle"] = "mvn:com.puppycrawl.tools:checkstyle:jar:NON-OSGI:8.10"
-artifact_map["@apache_karaf//:apache_karaf"] = "http://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.3-offline-20190213/apache-karaf-offline-4.2.3-offline-20190213.tar.gz"
+artifact_map["@apache_karaf//:apache_karaf"] = "http://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.5-offline-201904251/apache-karaf-4.2.5-offline-201904251.tar.gz"
 artifact_map["@bndlib//:bndlib"] = "mvn:biz.aQute.bnd:biz.aQute.bndlib:jar:4.0.0"
 artifact_map["@bndexe//:bndexe"] = "mvn:biz.aQute.bnd:biz.aQute.bnd:jar:4.0.0"
 artifact_map["@libthrift//:libthrift"] = "mvn:org.apache.thrift:libthrift:jar:0.11.0"
diff --git a/tools/build/bazel/osgi_features.bzl b/tools/build/bazel/osgi_features.bzl
index b5eb2a5..5f1c8d6 100644
--- a/tools/build/bazel/osgi_features.bzl
+++ b/tools/build/bazel/osgi_features.bzl
@@ -102,7 +102,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
           name="onos-%s">
-    <repository>mvn:org.apache.karaf.features/standard/4.2.3/xml/features</repository>
+    <repository>mvn:org.apache.karaf.features/standard/4.2.5/xml/features</repository>
 ''' % ONOS_VERSION
 
 FEATURES_FOOTER = "</features>"
diff --git a/tools/build/build-offline-karaf b/tools/build/build-offline-karaf
index cb1b9df..fdcdbdd 100755
--- a/tools/build/build-offline-karaf
+++ b/tools/build/build-offline-karaf
@@ -1,13 +1,13 @@
 #!/bin/bash
  
-KARAF_RELEASE_VERSION="4.2.3"
-KARAF_BASE_PACKAGE_VERSION="4.2.3"
+KARAF_RELEASE_VERSION="4.2.5"
+KARAF_BASE_PACKAGE_VERSION="4.2.5"
 KARAF_TARFILE_NAME="apache-karaf-${KARAF_RELEASE_VERSION}.tar"
 ADDED_BOOT_FEATURES="kar/${KARAF_RELEASE_VERSION},webconsole/${KARAF_RELEASE_VERSION},scr/${KARAF_RELEASE_VERSION},war/${KARAF_RELEASE_VERSION}"
 
 # fetch the standard karaf bits
 rm -f /tmp/${KARAF_TARFILE_NAME}
-curl -o /tmp/${KARAF_TARFILE_NAME}.gz http://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/${KARAF_BASE_PACKAGE_VERSION}/apache-karaf-offline-${KARAF_BASE_PACKAGE_VERSION}.tar.gz
+curl -o /tmp/${KARAF_TARFILE_NAME}.gz http://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/${KARAF_BASE_PACKAGE_VERSION}/apache-karaf-${KARAF_BASE_PACKAGE_VERSION}.tar.gz
 
 # get a small cell
 source ${ONOS_ROOT}/tools/dev/bash_profile
diff --git a/tools/build/envDefaults b/tools/build/envDefaults
index f080778..8eaecba 100644
--- a/tools/build/envDefaults
+++ b/tools/build/envDefaults
@@ -5,7 +5,7 @@
 
 # M2 repository and Karaf gold bits
 export M2_REPO=${M2_REPO:-~/.m2/repository}
-export KARAF_VERSION=4.2.3
+export KARAF_VERSION=4.2.5
 export KARAF_ZIP=${KARAF_ZIP:-~/Downloads/apache-karaf-$KARAF_VERSION.zip}
 export KARAF_TAR=${KARAF_TAR:-~/Downloads/apache-karaf-$KARAF_VERSION.tar.gz}
 export KARAF_DIST=$(basename $KARAF_ZIP .zip)
diff --git a/tools/package/bin/onos-backup b/tools/package/bin/onos-backup
index dc1bff5..8c2bd56 100755
--- a/tools/package/bin/onos-backup
+++ b/tools/package/bin/onos-backup
@@ -5,7 +5,7 @@
 
 ONOS_HOME=${ONOS_HOME:-$(cd $(dirname $0)/.. >/dev/null 2>&1 && pwd)}
 ONOS_DEFAULT_ARCHIVE=$(dirname $ONOS_HOME)/onos-data.tar.gz
-ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.3
+ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.5
 
 # Fetch the name of the archive or use a default if none is specified
 archive=${1:-$ONOS_DEFAULT_ARCHIVE}
diff --git a/tools/package/bin/onos-restore b/tools/package/bin/onos-restore
index 7416eb2..df608fa 100755
--- a/tools/package/bin/onos-restore
+++ b/tools/package/bin/onos-restore
@@ -5,7 +5,7 @@
 
 ONOS_HOME=${ONOS_HOME:-$(cd $(dirname $0)/.. >/dev/null 2>&1 && pwd)}
 ONOS_DEFAULT_ARCHIVE=$(dirname $ONOS_HOME)/onos-data.tar.gz
-ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.3
+ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.5
 
 # Fetch the name of the archive or use a default if none is specified
 archive=${1:-$ONOS_DEFAULT_ARCHIVE}
diff --git a/tools/package/deb/prerm b/tools/package/deb/prerm
index 9d3aa62..f98e133 100755
--- a/tools/package/deb/prerm
+++ b/tools/package/deb/prerm
@@ -14,7 +14,7 @@
 
 # Clean up onos runtime directories
 #      TODO don't hardcode karaf version
-rm -rf /opt/onos/apache-karaf-4.2.3/
+rm -rf /opt/onos/apache-karaf-4.2.5/
 rm -rf /opt/onos/var/*
 rm -rf /opt/onos/config
 rm -rf /opt/onos/options
diff --git a/tools/package/etc/org.apache.karaf.features.cfg b/tools/package/etc/org.apache.karaf.features.cfg
index 550df84..98b6948 100644
--- a/tools/package/etc/org.apache.karaf.features.cfg
+++ b/tools/package/etc/org.apache.karaf.features.cfg
@@ -20,38 +20,38 @@
 #
 # Comma separated list of features repositories to register by default
 #
-featuresRepositories = \    mvn:org.apache.karaf.features/standard/4.2.3/xml/features, \
+featuresRepositories = \    mvn:org.apache.karaf.features/standard/4.2.5/xml/features, \
     mvn:org.onosproject/onos-features/$ONOS_VERSION/xml/features, \
-    mvn:org.apache.karaf.features/enterprise/4.2.3/xml/features, \
-    mvn:org.apache.karaf.features/spring/4.2.3/xml/features, \
-    mvn:org.apache.karaf.features/standard/4.2.3/xml/features, \
-    mvn:org.apache.karaf.features/framework/4.2.3/xml/features
+    mvn:org.apache.karaf.features/enterprise/4.2.5/xml/features, \
+    mvn:org.apache.karaf.features/spring/4.2.5/xml/features, \
+    mvn:org.apache.karaf.features/standard/4.2.5/xml/features, \
+    mvn:org.apache.karaf.features/framework/4.2.5/xml/features
 
 #
 # Comma separated list of features to install at startup
 #
 featuresBoot = \
-    (instance/4.2.3, \
-    package/4.2.3, \
-    log/4.2.3, \
-    ssh/4.2.3, \
-    framework/4.2.3, \
-    system/4.2.3, \
-    eventadmin/4.2.3, \
-    feature/4.2.3, \
-    shell/4.2.3, \
-    management/4.2.3, \
-    service/4.2.3, \
-    jaas/4.2.3, \
-    deployer/4.2.3, \
-    diagnostic/4.2.3, \
+    (instance/4.2.5, \
+    package/4.2.5, \
+    log/4.2.5, \
+    ssh/4.2.5, \
+    framework/4.2.5, \
+    system/4.2.5, \
+    eventadmin/4.2.5, \
+    feature/4.2.5, \
+    shell/4.2.5, \
+    management/4.2.5, \
+    service/4.2.5, \
+    jaas/4.2.5, \
+    deployer/4.2.5, \
+    diagnostic/4.2.5, \
     wrap/2.6.1, \
-    bundle/4.2.3, \
-    config/4.2.3, \
-    kar/4.2.3, \
-    webconsole/4.2.3, \
-    scr/4.2.3, \
-    war/4.2.3), \
+    bundle/4.2.5, \
+    config/4.2.5, \
+    kar/4.2.5, \
+    webconsole/4.2.5, \
+    scr/4.2.5, \
+    war/4.2.5), \
     (onos-thirdparty-base/$ONOS_VERSION), \
     (onos-api/$ONOS_VERSION, \
     onos-core/$ONOS_VERSION, \
diff --git a/tools/package/onos-prep-karaf b/tools/package/onos-prep-karaf
index 54a36ff..1fb51a3 100755
--- a/tools/package/onos-prep-karaf
+++ b/tools/package/onos-prep-karaf
@@ -12,7 +12,7 @@
 KARAF_PATCHES=$5
 SANDBOX=${6:-.}
 
-KARAF_VERSION="4.2.3"
+KARAF_VERSION="4.2.5"
 ONOS_SECURITY_MODE="false"
 
 PREFIX="onos-$ONOS_VERSION"
diff --git a/tools/package/onos_stage.py b/tools/package/onos_stage.py
index 7ddeff9..2d9afda 100755
--- a/tools/package/onos_stage.py
+++ b/tools/package/onos_stage.py
@@ -27,7 +27,7 @@
 
 written_files = set()
 now = time.time()
-karaf_version = "4.2.3"
+karaf_version = "4.2.5"
 karaf_system = "apache-karaf-" + karaf_version + "/system/"
 
 def addFile(tar, dest, file, file_size):
diff --git a/tools/test/bin/onos-check-bits b/tools/test/bin/onos-check-bits
index fe99f1b..931dd6c 100755
--- a/tools/test/bin/onos-check-bits
+++ b/tools/test/bin/onos-check-bits
@@ -32,7 +32,7 @@
   echo "ONOS archive does not contain the proper version file" && exit 1
 fi
 
-tar tzf ${ONOS_TAR} | grep -q apache-karaf-4.2.3
+tar tzf ${ONOS_TAR} | grep -q apache-karaf-4.2.5
 if [ $? -ne 0 ]; then
   echo "ONOS archive does not contain karaf" && exit 1
 fi
diff --git a/tools/test/scenarios/odtn/README.md b/tools/test/scenarios/odtn/README.md
index e0df1ca..9993852 100644
--- a/tools/test/scenarios/odtn/README.md
+++ b/tools/test/scenarios/odtn/README.md
@@ -14,7 +14,7 @@
 export OCI=172.17.0.5
 export ONOS_INSTANCES="172.17.0.5 172.17.0.6 172.17.0.7"
 export ONOS_USER=root
-export ONOS_INSTALL_DIR=/root/onos/apache-karaf-4.2.3/data
+export ONOS_INSTALL_DIR=/root/onos/apache-karaf-4.2.5/data
 ```
 
 Besides, the access for each onos container are very easy (`source /tmp/odtn/OCvar` firstly):