Upgrade karaf-resources to 3.0.6 50/39050/2
authorStephen Kitt <skitt@redhat.com>
Wed, 18 May 2016 15:07:59 +0000 (17:07 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 31 May 2016 07:36:20 +0000 (07:36 +0000)
Pull in updates from Karaf 3.0.6, and avoid hard-coding the Karaf
version.

Change-Id: I30a58982ff8f2e85efaecc8edbf7979ad5db3c54
Signed-off-by: Stephen Kitt <skitt@redhat.com>
karaf/karaf-parent/pom.xml
karaf/opendaylight-karaf-resources/pom.xml
karaf/opendaylight-karaf-resources/src/main/resources/bin/instance
karaf/opendaylight-karaf-resources/src/main/resources/bin/instance.bat
karaf/opendaylight-karaf-resources/src/main/resources/bin/setenv

index 7086289..e22953f 100644 (file)
@@ -24,7 +24,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <branding.version>1.3.0-SNAPSHOT</branding.version>
     <karaf.resources.version>1.7.0-SNAPSHOT</karaf.resources.version>
     <karaf.localFeature>standard</karaf.localFeature>
-    <!--  Karaf Maven plugin 3.023 reinstalls already installed
+    <!--  Karaf Maven plugin 3.0.3 reinstalls already installed
           boot features to container, which could be observed
           in huge logs and seems like loop in build, even if it
           is not.
index bfaca24..260fb55 100644 (file)
   <description>Resources for opendaylight-karaf</description>
   <packaging>jar</packaging>
   <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
index b4abff7..32a8854 100644 (file)
@@ -255,6 +255,17 @@ setupDefaults() {
 
     #Set the JVM_VENDOR specific JVM flags
     if [ "$JVM_VENDOR" = "SUN" ]; then
+        # permgen was removed in Java 8
+        VERSION=`$JAVA -version 2>&1 | egrep '"([0-9].[0-9]\..*[0-9]).*"' | awk '{print substr($3,2,length($3)-2)}' | awk '{print substr($1, 3, 3)}' | sed -e 's;\.;;g'`
+        if [ "$VERSION" -lt "80" ]; then
+            # Check some easily accessible MIN/MAX params for JVM mem usage
+            if [ "x$JAVA_PERM_MEM" != "x" ]; then
+                DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS -XX:PermSize=$JAVA_PERM_MEM"
+            fi
+            if [ "x$JAVA_MAX_PERM_MEM" != "x" ]; then
+                DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS -XX:MaxPermSize=$JAVA_MAX_PERM_MEM"
+            fi
+        fi
         DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote"
     elif [ "$JVM_VENDOR" = "IBM" ]; then
         if $os400; then
@@ -334,14 +345,16 @@ init() {
 
 run() {
 
-    CLASSPATH="${KARAF_HOME}/system/org/apache/karaf/instance/org.apache.karaf.instance.command/3.0.3/org.apache.karaf.instance.command-3.0.3.jar:${KARAF_HOME}/system/org/apache/karaf/instance/org.apache.karaf.instance.core/3.0.3/org.apache.karaf.instance.core-3.0.3.jar:${KARAF_HOME}/system/org/apache/karaf/shell/org.apache.karaf.shell.console/3.0.3/org.apache.karaf.shell.console-3.0.3.jar:${KARAF_HOME}/system/org/apache/karaf/shell/org.apache.karaf.shell.table/3.0.3/org.apache.karaf.shell.table-3.0.3.jar:${KARAF_HOME}/system/org/apache/aries/blueprint/org.apache.aries.blueprint.api/1.0.1/org.apache.aries.blueprint.api-1.0.1.jar:${KARAF_HOME}/system/org/apache/aries/blueprint/org.apache.aries.blueprint.core/1.4.2/org.apache.aries.blueprint.core-1.4.2.jar:${KARAF_HOME}/system/org/apache/aries/blueprint/org.apache.aries.blueprint.cm/1.0.5/org.apache.aries.blueprint.cm-1.0.5.jar:${KARAF_HOME}/system/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar:${KARAF_HOME}/system/org/apache/felix/org.apache.felix.framework/4.2.1/org.apache.felix.framework-4.2.1.jar:${KARAF_HOME}/system/jline/jline/2.12/jline-2.12.jar:$CLASSPATH"
+    CLASSPATH="${KARAF_HOME}/system/org/apache/karaf/instance/org.apache.karaf.instance.command/${karaf.version}/org.apache.karaf.instance.command-${karaf.version}.jar:${KARAF_HOME}/system/org/apache/karaf/instance/org.apache.karaf.instance.core/${karaf.version}/org.apache.karaf.instance.core-${karaf.version}.jar:${KARAF_HOME}/system/org/apache/karaf/shell/org.apache.karaf.shell.console/${karaf.version}/org.apache.karaf.shell.console-${karaf.version}.jar:${KARAF_HOME}/system/org/apache/karaf/shell/org.apache.karaf.shell.table/${karaf.version}/org.apache.karaf.shell.table-${karaf.version}.jar:${KARAF_HOME}/system/org/apache/aries/blueprint/org.apache.aries.blueprint.api/${aries.blueprint.api.version}/org.apache.aries.blueprint.api-${aries.blueprint.api.version}.jar:${KARAF_HOME}/system/org/apache/aries/blueprint/org.apache.aries.blueprint.core/${aries.blueprint.core.version}/org.apache.aries.blueprint.core-${aries.blueprint.core.version}.jar:${KARAF_HOME}/system/org/apache/aries/blueprint/org.apache.aries.blueprint.cm/${aries.blueprint.cm.version}/org.apache.aries.blueprint.cm-${aries.blueprint.cm.version}.jar:${KARAF_HOME}/system/org/ops4j/pax/logging/pax-logging-api/${pax.logging.version}/pax-logging-api-${pax.logging.version}.jar:${KARAF_HOME}/system/org/apache/felix/org.apache.felix.framework/${felix.framework.version}/org.apache.felix.framework-${felix.framework.version}.jar:${KARAF_HOME}/system/jline/jline/${jline.version}/jline-${jline.version}.jar:$CLASSPATH"
 
     if $cygwin; then
         KARAF_HOME=`cygpath --path --windows "$KARAF_HOME"`
         KARAF_BASE=`cygpath --path --windows "$KARAF_BASE"`
         KARAF_DATA=`cygpath --path --windows "$KARAF_DATA"`
         KARAF_ETC=`cygpath --path --windows "$KARAF_ETC"`
-        CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+        if [ ! -z "$CLASSPATH" ]; then
+            CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+        fi
     fi
 
     exec "$JAVA" $JAVA_OPTS -Dkaraf.instances="${KARAF_HOME}/instances" -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Dkaraf.etc="$KARAF_ETC" -Djava.io.tmpdir="$KARAF_DATA/tmp" -Djava.util.logging.config.file="$KARAF_BASE/etc/java.util.logging.properties" $KARAF_OPTS $OPTS -classpath "$CLASSPATH" org.apache.karaf.instance.main.Execute "$@"
index 9759d2d..0f62455 100644 (file)
@@ -145,7 +145,7 @@ goto :EOF
 
 :CLASSPATH_END
 
-set CLASSPATH=%KARAF_HOME%\system\org\apache\karaf\instance\org.apache.karaf.instance.command\3.0.3\org.apache.karaf.instance.command-3.0.3.jar;%KARAF_HOME%\system\org\apache\karaf\instance\org.apache.karaf.instance.core\3.0.3\org.apache.karaf.instance.core-3.0.3.jar;%KARAF_HOME%\system\org\apache\karaf\shell\org.apache.karaf.shell.console\3.0.3\org.apache.karaf.shell.console-3.0.3.jar;%KARAF_HOME%\system\org\apache\karaf\shell\org.apache.karaf.shell.table\3.0.3\org.apache.karaf.shell.table-3.0.3.jar;%KARAF_HOME%\system\org\apache\aries\blueprint\org.apache.aries.blueprint.api\1.0.1\org.apache.aries.blueprint.api-1.0.1.jar;%KARAF_HOME%\system\org\apache\aries\blueprint\org.apache.aries.blueprint.core\1.4.2\org.apache.aries.blueprint.core-1.4.2.jar;%KARAF_HOME%\system\org\apache\aries\blueprint\org.apache.aries.blueprint.cm\1.0.5\org.apache.aries.blueprint.cm-1.0.5.jar;%KARAF_HOME%\system\org\ops4j\pax\logging\pax-logging-api\1.8.1\pax-logging-api-1.8.1.jar;%KARAF_HOME%\system\org\apache\felix\org.apache.felix.framework\4.2.1\org.apache.felix.framework-4.2.1.jar;%KARAF_HOME%\system\jline\jline\2.12\jline-2.12.jar;%CLASSPATH%
+set CLASSPATH=%KARAF_HOME%\system\org\apache\karaf\instance\org.apache.karaf.instance.command\${karaf.version}\org.apache.karaf.instance.command-${karaf.version}.jar;%KARAF_HOME%\system\org\apache\karaf\instance\org.apache.karaf.instance.core\${karaf.version}\org.apache.karaf.instance.core-${karaf.version}.jar;%KARAF_HOME%\system\org\apache\karaf\shell\org.apache.karaf.shell.console\${karaf.version}\org.apache.karaf.shell.console-${karaf.version}.jar;%KARAF_HOME%\system\org\apache\karaf\shell\org.apache.karaf.shell.table\${karaf.version}\org.apache.karaf.shell.table-${karaf.version}.jar;%KARAF_HOME%\system\org\apache\aries\blueprint\org.apache.aries.blueprint.api\${aries.blueprint.api.version}\org.apache.aries.blueprint.api-${aries.blueprint.api.version}.jar;%KARAF_HOME%\system\org\apache\aries\blueprint\org.apache.aries.blueprint.core\${aries.blueprint.core.version}\org.apache.aries.blueprint.core-${aries.blueprint.core.version}.jar;%KARAF_HOME%\system\org\apache\aries\blueprint\org.apache.aries.blueprint.cm\${aries.blueprint.cm.version}\org.apache.aries.blueprint.cm-${aries.blueprint.cm.version}.jar;%KARAF_HOME%\system\org\ops4j\pax\logging\pax-logging-api\${pax.logging.version}\pax-logging-api-${pax.logging.version}.jar;%KARAF_HOME%\system\org\apache\felix\org.apache.felix.framework\${felix.framework.version}\org.apache.felix.framework-${felix.framework.version}.jar;%KARAF_HOME%\system\jline\jline\${jline.version}\jline-${jline.version}.jar;%CLASSPATH%
 
 :EXECUTE
     if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
index 42330fa..d81e6fd 100644 (file)
@@ -18,7 +18,7 @@
 
 #
 # handle specific scripts; the SCRIPT_NAME is exactly the name of the Karaf
-# script; for example karaf, start, stop, admin, client, ...
+# script: client, instance, shell, start, status, stop, karaf
 #
 # if [ "$KARAF_SCRIPT" == "SCRIPT_NAME" ]; then
 #   Actions go here...

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.