You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2019/02/02 16:41:06 UTC

[openmeetings] branch 4.0.x updated: [OPENMEETINGS-2006] OM seems to work under java11 as expected

This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/4.0.x by this push:
     new 0de33a3  [OPENMEETINGS-2006] OM seems to work under java11 as expected
0de33a3 is described below

commit 0de33a3a0762963113f3c190a044f4ad38cca5f3
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Sat Feb 2 23:40:53 2019 +0700

    [OPENMEETINGS-2006] OM seems to work under java11 as expected
---
 LICENSE                                            |  4 +-
 .../src/main/assembly/components/all.xml           |  4 +
 .../src/main/assembly/scripts/admin.sh             |  4 +-
 .../src/main/assembly/scripts/red5.bat             | 57 ++++++++++++++
 .../src/main/assembly/scripts/red5.sh              | 90 ++++++++++++++++++++++
 openmeetings-webservice/pom.xml                    |  8 ++
 pom.xml                                            | 12 +++
 7 files changed, 176 insertions(+), 3 deletions(-)

diff --git a/LICENSE b/LICENSE
index 9968319..a1f8697 100644
--- a/LICENSE
+++ b/LICENSE
@@ -340,7 +340,9 @@ conditions of the following licenses.
 For GlassFish components
 
 lib/activation-*.jar
-lib/javax.mail-1.6.2.jar
+lib/javax.mail-*.jar
+lib/jaxws-api*.jar
+lib/javax.jws-api*.jar
 
 
 COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
diff --git a/openmeetings-server/src/main/assembly/components/all.xml b/openmeetings-server/src/main/assembly/components/all.xml
index 8ec129c..e771419 100644
--- a/openmeetings-server/src/main/assembly/components/all.xml
+++ b/openmeetings-server/src/main/assembly/components/all.xml
@@ -55,6 +55,7 @@
 				<exclude>plugins/tomcat-*.jar</exclude> <!-- added for Red5 lib substitution -->
 				<exclude>plugins/ecj*.jar</exclude> <!-- added for Red5 lib substitution -->
 				<exclude>*.sh</exclude>
+				<exclude>red5.bat</exclude>
 				<exclude>conf/jee-container.xml</exclude>
 			</excludes>
 		</fileSet>
@@ -65,6 +66,9 @@
 			<includes>
 				<include>*.sh</include>
 			</includes>
+			<excludes>
+				<exclude>red5.sh</exclude>
+			</excludes>
 		</fileSet>
 		<fileSet>
 			<directory>src/main/assembly/scripts</directory>
diff --git a/openmeetings-server/src/main/assembly/scripts/admin.sh b/openmeetings-server/src/main/assembly/scripts/admin.sh
index 6868099..38b0275 100644
--- a/openmeetings-server/src/main/assembly/scripts/admin.sh
+++ b/openmeetings-server/src/main/assembly/scripts/admin.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# #############################################
+##############################################
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -11,7 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-# #############################################
+##############################################
 export RED5_HOME=$(cd $(dirname "$0"); pwd) 
 export OM_CONTEXT=openmeetings
 
diff --git a/openmeetings-server/src/main/assembly/scripts/red5.bat b/openmeetings-server/src/main/assembly/scripts/red5.bat
new file mode 100644
index 0000000..3a3f10f
--- /dev/null
+++ b/openmeetings-server/src/main/assembly/scripts/red5.bat
@@ -0,0 +1,57 @@
+@echo off
+REM #############################################
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM
+REM     http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM #############################################
+
+SETLOCAL
+
+if NOT DEFINED RED5_HOME set RED5_HOME=%~dp0
+
+if NOT DEFINED JAVA_HOME goto err
+
+REM JAVA options
+REM You can set JVM additional options here if you want
+if NOT DEFINED JVM_OPTS set JVM_OPTS=-Xms256m -Xmx1g -Xverify:none -XX:+TieredCompilation -XX:+UseBiasedLocking -XX:InitialCodeCacheSize=8m -XX:ReservedCodeCacheSize=32m -Dorg.terracotta.quartz.skipUpdateCheck=true -XX:MaxMetaspaceSize=128m -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=2
+REM Set up logging options
+set LOGGING_OPTS=-Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector -Dcatalina.useNaming=true
+REM Set up security options
+REM set SECURITY_OPTS=-Djava.security.debug=failure -Djava.security.manager -Djava.security.policy="%RED5_HOME%/conf/red5.policy"
+set SECURITY_OPTS=-Djava.security.debug=failure
+REM Set up tomcat options
+set TOMCAT_OPTS=-Dcatalina.home=%RED5_HOME%
+REM Native path
+set NATIVE=-Djava.library.path="%RED5_HOME%\lib\native"
+REM Setup python/jython path
+set JYTHON_OPTS=-Dpython.home=lib
+REM Combined java options
+set JAVA_OPTS=%LOGGING_OPTS% %SECURITY_OPTS% %JAVA_OPTS% %JVM_OPTS% %TOMCAT_OPTS% %NATIVE% %JYTHON_OPTS%
+
+set RED5_CLASSPATH=%RED5_HOME%\red5-service.jar;%RED5_HOME%\conf;%CLASSPATH%
+
+if NOT DEFINED RED5_MAINCLASS set RED5_MAINCLASS=org.red5.server.Bootstrap
+
+if NOT DEFINED RED5_OPTS set RED5_OPTS=9999
+
+goto launchRed5
+
+:launchRed5
+echo Starting Red5
+"%JAVA_HOME%\bin\java" %JAVA_OPTS% -cp "%RED5_CLASSPATH%" %RED5_MAINCLASS% %RED5_OPTS%
+goto finally
+
+:err
+echo JAVA_HOME environment variable not set! Take a look at the readme.
+pause
+
+:finally
+ENDLOCAL
diff --git a/openmeetings-server/src/main/assembly/scripts/red5.sh b/openmeetings-server/src/main/assembly/scripts/red5.sh
new file mode 100755
index 0000000..3740cc6
--- /dev/null
+++ b/openmeetings-server/src/main/assembly/scripts/red5.sh
@@ -0,0 +1,90 @@
+#!/bin/bash
+##############################################
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################
+
+if [ -z "$RED5_HOME" ]; then 
+  export RED5_HOME=`pwd`; 
+fi
+
+P=":" # The default classpath separator
+OS=`uname`
+case "$OS" in
+  CYGWIN*|MINGW*) # Windows Cygwin or Windows MinGW
+  P=";" # Since these are actually Windows, let Java know
+  ;;
+  Linux*)
+      LD_LIBRARY_PATH=$RED5_HOME/lib/native
+      export LD_LIBRARY_PATH
+      # Native path
+      NATIVE="-Djava.library.path=$LD_LIBRARY_PATH"
+  ;;
+  Darwin*)
+      DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$RED5_HOME/lib/native
+      export DYLD_LIBRARY_PATH
+      # Native path
+      NATIVE="-Djava.library.path=$DYLD_LIBRARY_PATH"
+  ;;
+  SunOS*)
+      if [ -z "$JAVA_HOME" ]; then 
+          export JAVA_HOME=/opt/local/java/sun6; 
+      fi
+  ;;
+  *)
+  # Do nothing
+  ;;
+esac
+
+echo "Running on " $OS
+
+# JAVA options
+# You can set JVM additional options here if you want
+if [ -z "$JVM_OPTS" ]; then 
+    JVM_OPTS="-Xms256m -Xmx1g -Xverify:none -XX:+TieredCompilation -XX:+UseBiasedLocking -XX:InitialCodeCacheSize=8m -XX:ReservedCodeCacheSize=32m -Dorg.terracotta.quartz.skipUpdateCheck=true -XX:MaxMetaspaceSize=128m -XX:+UseConcMarkSweepGC -XX:ParallelGCThreads=2"
+fi
+# Set up security options
+SECURITY_OPTS="-Djava.security.debug=failure"
+# Set up tomcat options
+TOMCAT_OPTS="-Dcatalina.home=$RED5_HOME -Dcatalina.useNaming=true"
+# Jython options
+JYTHON="-Dpython.home=lib"
+
+export JAVA_OPTS="$SECURITY_OPTS $JAVA_OPTS $JVM_OPTS $TOMCAT_OPTS $NATIVE $JYTHON"
+
+if [ -z "$RED5_MAINCLASS" ]; then
+  export RED5_MAINCLASS=org.red5.server.Bootstrap
+fi
+
+if [ -z "$RED5_OPTS" ]; then
+  export RED5_OPTS=9999
+fi
+
+for JAVA in "${JAVA_HOME}/bin/java" "${JAVA_HOME}/Home/bin/java" "/usr/bin/java" "/usr/local/bin/java"
+do
+  if [ -x "$JAVA" ]
+  then
+    break
+  fi
+done
+
+if [ ! -x "$JAVA" ]
+then
+  echo "Unable to locate Java. Please set JAVA_HOME environment variable."
+  exit
+fi
+
+export RED5_CLASSPATH="${RED5_HOME}/red5-service.jar${P}${RED5_HOME}/conf${P}${CLASSPATH}"
+
+# start Red5
+echo "Starting Red5"
+exec "$JAVA" -Dred5.root="${RED5_HOME}" $JAVA_OPTS -cp "${RED5_CLASSPATH}" "$RED5_MAINCLASS" $RED5_OPTS
diff --git a/openmeetings-webservice/pom.xml b/openmeetings-webservice/pom.xml
index 9dee22f..7ce1da9 100644
--- a/openmeetings-webservice/pom.xml
+++ b/openmeetings-webservice/pom.xml
@@ -80,6 +80,14 @@
 			<artifactId>spring-core</artifactId>
 		</dependency>
 		<dependency>
+			<groupId>javax.xml.ws</groupId>
+			<artifactId>jaxws-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>javax.jws</groupId>
+			<artifactId>javax.jws-api</artifactId>
+		</dependency>
+		<dependency>
 			<groupId>org.apache.cxf</groupId>
 			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
 		</dependency>
diff --git a/pom.xml b/pom.xml
index 5ed254e..8b00533 100644
--- a/pom.xml
+++ b/pom.xml
@@ -113,6 +113,8 @@
 		<license.excludedScopes>test</license.excludedScopes>
 		<bcprov-jdk15on.version>1.60</bcprov-jdk15on.version>
 		<mockito.version>2.23.4</mockito.version>
+		<jaxws-api.version>2.3.1</jaxws-api.version>
+		<javax.jws-api.version>1.1</javax.jws-api.version>
 		<!--  URL of the ASF SonarQube server  -->
 		<sonar.host.url>https://builds.apache.org/analysis</sonar.host.url>
 		<!--  Exclude all generated code  -->
@@ -497,6 +499,16 @@
 				<version>${ical4j.version}</version>
 			</dependency>
 			<dependency>
+				<groupId>javax.xml.ws</groupId>
+				<artifactId>jaxws-api</artifactId>
+				<version>${jaxws-api.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>javax.jws</groupId>
+				<artifactId>javax.jws-api</artifactId>
+				<version>${javax.jws-api.version}</version>
+			</dependency>
+			<dependency>
 				<groupId>org.apache.cxf</groupId>
 				<artifactId>cxf-rt-frontend-jaxrs</artifactId>
 				<version>${cxf.version}</version>