From 3bc4cb4075f59cdbf02eb138f82658ee52a4f09a Mon Sep 17 00:00:00 2001 From: Torsten Friebe Date: Sat, 29 Sep 2018 22:25:27 +0200 Subject: [PATCH 1/4] Removed obsolete and outdated JavaCheck class and related module. Check for JDK version at build time performed by enforcer plugin. --- deegree-misc/deegree-javacheck/pom.xml | 44 ------ .../src/main/java/org/deegree/JavaCheck.java | 147 ------------------ deegree-misc/pom.xml | 31 ---- 3 files changed, 222 deletions(-) delete mode 100644 deegree-misc/deegree-javacheck/pom.xml delete mode 100644 deegree-misc/deegree-javacheck/src/main/java/org/deegree/JavaCheck.java delete mode 100644 deegree-misc/pom.xml diff --git a/deegree-misc/deegree-javacheck/pom.xml b/deegree-misc/deegree-javacheck/pom.xml deleted file mode 100644 index 93d0effecc..0000000000 --- a/deegree-misc/deegree-javacheck/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - 4.0.0 - deegree-javacheck - jar - deegree-javacheck - Check for Java versions compatible with deegree - - - ok - - - - org.deegree - deegree-misc - 3.4.4-SNAPSHOT - - - - - deegree-repo - http://repo.deegree.org/content/groups/public - - never - - - true - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.3 - 1.3 - - - - - - diff --git a/deegree-misc/deegree-javacheck/src/main/java/org/deegree/JavaCheck.java b/deegree-misc/deegree-javacheck/src/main/java/org/deegree/JavaCheck.java deleted file mode 100644 index c1ce053c82..0000000000 --- a/deegree-misc/deegree-javacheck/src/main/java/org/deegree/JavaCheck.java +++ /dev/null @@ -1,147 +0,0 @@ -//$HeadURL$ -/*---------------------------------------------------------------------------- - This file is part of deegree, http://deegree.org/ - Copyright (C) 2001-2009 by: - - Department of Geography, University of Bonn - - and - - lat/lon GmbH - - - This library is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free - Software Foundation; either version 2.1 of the License, or (at your option) - any later version. - This library is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - details. - You should have received a copy of the GNU Lesser General Public License - along with this library; if not, write to the Free Software Foundation, Inc., - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Contact information: - - lat/lon GmbH - Aennchenstr. 19, 53177 Bonn - Germany - http://lat-lon.de/ - - Department of Geography, University of Bonn - Prof. Dr. Klaus Greve - Postfach 1147, 53001 Bonn - Germany - http://www.geographie.uni-bonn.de/deegree/ - - e-mail: info@deegree.org - ----------------------------------------------------------------------------*/ -package org.deegree; - -import java.awt.Button; -import java.awt.Dialog; -import java.awt.Frame; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.TextArea; -import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -/** - * Checks for a suitable Java installation (>= 1.6.0 Update 4). - * - * @author Markus Schneider - * @author last edited by: $Author$ - * - * @version $Revision$, $Date$ - */ -public class JavaCheck { - - private static void alert() { - - String msg = "You need to have Java SDK 1.6 (Update 4) or later installed in order to run this software.\n" - + "See http://wiki.deegree.org/deegreeWiki/deegree3/SystemRequirements for details."; - System.err.println( msg ); - - try { - Dialog d = new Dialog( new Frame(), "Incompatible Java installation", true ); - d.setLayout( new GridBagLayout() ); - - // Create an OK button - Button ok = new Button( "OK" ); - ok.addActionListener( new ActionListener() { - public void actionPerformed( ActionEvent e ) { - System.exit( 5 ); - } - } ); - - GridBagConstraints gb = new GridBagConstraints(); - gb.insets = new Insets( 2, 2, 2, 2 ); - gb.gridy = 0; - gb.fill = GridBagConstraints.HORIZONTAL; - - TextArea field = new TextArea( msg, 3, 80, TextArea.SCROLLBARS_VERTICAL_ONLY ); - field.setBackground( ok.getBackground() ); - d.add( field, gb ); - gb = (GridBagConstraints) gb.clone(); - gb.fill = GridBagConstraints.NONE; - ++gb.gridy; - d.add( ok, gb ); - - // Show dialog - d.pack(); - - d.setLocation( ( Toolkit.getDefaultToolkit().getScreenSize().width / 2 ) - ( d.getSize().width / 2 ), - ( java.awt.Toolkit.getDefaultToolkit().getScreenSize().height / 2 ) - - ( d.getSize().height / 2 ) ); - - d.setVisible( true ); - - } catch ( Throwable t ) { - t.printStackTrace(); - System.exit( 5 ); - } - } - - public static void main( String[] args ) { - - String javaVersion = System.getProperty( "java.version" ); - - String[] parts = javaVersion.split( "\\." ); - if ( parts.length != 3 ) { - System.err.println( "Java VM version (" + javaVersion + ") does not have expected format. Skipping check." ); - alert(); - return; - } - - int first = Integer.parseInt( parts[0] ); - if ( first < 1 ) { - alert(); - } else if ( first > 1 ) { - return; - } - - int second = Integer.parseInt( parts[1] ); - if ( second < 6 ) { - alert(); - } else if ( second > 6 ) { - return; - } - - String third = parts[2]; - String[] thirdParts = third.split( "_" ); - int third1 = Integer.parseInt( thirdParts[0] ); - if ( third1 > 0 ) { - return; - } - - if ( thirdParts.length < 2 ) { - alert(); - } - String update = thirdParts[1]; - String[] updateParts = update.split( "-" ); - int updateFirst = Integer.parseInt( updateParts[0] ); - if ( updateFirst < 4 ) { - alert(); - } - } -} diff --git a/deegree-misc/pom.xml b/deegree-misc/pom.xml deleted file mode 100644 index b6d7574474..0000000000 --- a/deegree-misc/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - 4.0.0 - deegree-misc - pom - deegree-misc - Modules that didn't fit anywhere else - - - org.deegree - deegree - 3.4.4-SNAPSHOT - - - - - deegree-repo - http://repo.deegree.org/content/groups/public - - never - - - true - - - - - - deegree-javacheck - - - From 9a759d6423de08f431d5e170d23625f7f265935e Mon Sep 17 00:00:00 2001 From: Torsten Friebe Date: Sat, 29 Sep 2018 22:32:22 +0200 Subject: [PATCH 2/4] Removed module deegree-misc --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9b6960a738..bdee4f1270 100644 --- a/pom.xml +++ b/pom.xml @@ -1069,7 +1069,6 @@ deegree-core deegree-datastores deegree-layers - deegree-misc deegree-processproviders deegree-services deegree-themes From 120920f29c292bae21a9e626e0878167a4c38428 Mon Sep 17 00:00:00 2001 From: Torsten Friebe Date: Sun, 30 Sep 2018 14:33:13 +0200 Subject: [PATCH 3/4] Removed JavaCheck module from Tomcat Distribution Bundle and related OS specific startup scripts --- .../deegree-webservices-tomcat-bundle/pom.xml | 6 ----- .../main/assembly/distribution-assembly.xml | 19 -------------- .../src/main/resources/start-deegree-linux.sh | 26 ------------------- .../src/main/resources/start-deegree-osx.cmd | 26 ------------------- .../main/resources/start-deegree-windows.bat | 26 ------------------- 5 files changed, 103 deletions(-) delete mode 100644 deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-linux.sh delete mode 100644 deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-osx.cmd delete mode 100644 deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-windows.bat diff --git a/deegree-services/deegree-webservices-tomcat-bundle/pom.xml b/deegree-services/deegree-webservices-tomcat-bundle/pom.xml index 7d250d8a0e..ac2f3a52f9 100644 --- a/deegree-services/deegree-webservices-tomcat-bundle/pom.xml +++ b/deegree-services/deegree-webservices-tomcat-bundle/pom.xml @@ -32,7 +32,6 @@ org.apache.tomcat - tomcat ${tomcat-version} zip @@ -43,11 +42,6 @@ ${project.version} war - - org.deegree - deegree-javacheck - ${project.version} - diff --git a/deegree-services/deegree-webservices-tomcat-bundle/src/main/assembly/distribution-assembly.xml b/deegree-services/deegree-webservices-tomcat-bundle/src/main/assembly/distribution-assembly.xml index 0ced3ea6b3..3516d5c328 100644 --- a/deegree-services/deegree-webservices-tomcat-bundle/src/main/assembly/distribution-assembly.xml +++ b/deegree-services/deegree-webservices-tomcat-bundle/src/main/assembly/distribution-assembly.xml @@ -4,18 +4,6 @@ zip - - - ${project.basedir}/src/main/resources - apache-tomcat-${tomcat-version}/bin - - *.bat - *.cmd - *.sh - - 0775 - - / @@ -33,13 +21,6 @@ true - - apache-tomcat-${tomcat-version}/bin/ - - org.deegree:deegree-javacheck:* - - ${artifact.artifactId}.${artifact.extension} - apache-tomcat-${tomcat-version}/webapps/ROOT diff --git a/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-linux.sh b/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-linux.sh deleted file mode 100644 index 03592b4b1c..0000000000 --- a/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-linux.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -setJavaHome() { - for jdir in /usr/lib/jvm/java-7* /usr/lib/jvm/java-6* $HOME/jdk* /usr/lib/j2* /usr/java/* /cygdrive/c/j2* /usr/local/j2* - do - if (test -z $JAVA_HOME && test -d $jdir) then - if (test -x $jdir/bin/java) then - export JAVA_HOME=$jdir - fi - fi - done - if (test -z $JAVA_HOME) then - echo "JAVA_HOME not set and automatic detection failed. Is a suitable JDK installed?" - exit - fi -} - -if (test -z $JAVA_HOME) then - setJavaHome -fi -$JAVA_HOME/bin/java -classpath deegree-javacheck.jar org.deegree.JavaCheck -RETVAL=$? -[ $RETVAL -ne 0 ] && exit - -export JAVA_OPTS=-Xmx1024M -./catalina.sh run diff --git a/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-osx.cmd b/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-osx.cmd deleted file mode 100644 index 03592b4b1c..0000000000 --- a/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-osx.cmd +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -setJavaHome() { - for jdir in /usr/lib/jvm/java-7* /usr/lib/jvm/java-6* $HOME/jdk* /usr/lib/j2* /usr/java/* /cygdrive/c/j2* /usr/local/j2* - do - if (test -z $JAVA_HOME && test -d $jdir) then - if (test -x $jdir/bin/java) then - export JAVA_HOME=$jdir - fi - fi - done - if (test -z $JAVA_HOME) then - echo "JAVA_HOME not set and automatic detection failed. Is a suitable JDK installed?" - exit - fi -} - -if (test -z $JAVA_HOME) then - setJavaHome -fi -$JAVA_HOME/bin/java -classpath deegree-javacheck.jar org.deegree.JavaCheck -RETVAL=$? -[ $RETVAL -ne 0 ] && exit - -export JAVA_OPTS=-Xmx1024M -./catalina.sh run diff --git a/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-windows.bat b/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-windows.bat deleted file mode 100644 index 2d9e4d8961..0000000000 --- a/deegree-services/deegree-webservices-tomcat-bundle/src/main/resources/start-deegree-windows.bat +++ /dev/null @@ -1,26 +0,0 @@ -@echo off -if "%JAVA_HOME%"=="" call:FIND_JAVA_HOME -"%JAVA_HOME%"\bin\java -classpath deegree-javacheck.jar org.deegree.JavaCheck else java -classpath deegree-javacheck.jar org.deegree.JavaCheck -IF ERRORLEVEL 5 GOTO WRONGJAVA -SET JAVA_OPTS=-Xmx1024M -.\catalina.bat run -goto:END - -:FIND_JAVA_HOME -FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Development Kit" /v CurrentVersion') DO set CurVer=%%B -FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Development Kit\%CurVer%" /v JavaHome') DO set JAVA_HOME=%%B -if "%JAVA_HOME%"=="" GOTO NOJAVA -goto:EOF - -:WRONGJAVA -pause -goto:END - -:NOJAVA -echo *********************************************************************** -echo JAVA_HOME is not set and automatic detection failed. -echo Please install a suitable JDK, e.g. Oracle Java 7 JDK. -echo *********************************************************************** -pause - -:END From 05f33dc5047d0aa13c90da976c93231cfc04cc0b Mon Sep 17 00:00:00 2001 From: Torsten Friebe Date: Thu, 4 Oct 2018 17:54:27 +0200 Subject: [PATCH 4/4] Updated handbook to use Apache Tomcat default startup scripts instead --- .../src/main/sphinx/installation.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/deegree-services/deegree-webservices-handbook/src/main/sphinx/installation.rst b/deegree-services/deegree-webservices-handbook/src/main/sphinx/installation.rst index dbc3e9d431..e7d0c924e6 100644 --- a/deegree-services/deegree-webservices-handbook/src/main/sphinx/installation.rst +++ b/deegree-services/deegree-webservices-handbook/src/main/sphinx/installation.rst @@ -12,8 +12,7 @@ deegree webservices work on any platform with a compatible Java SE 8 installatio * Microsoft Windows * Linux -* Mac OS X -* Solaris +* Apple macOS Supported Java SE 8 versions are `Oracle JDK 8 `_ [#f1]_, `OpenJDK 8 `_ [#f2]_. Newer Java SE versions may work, but are not officially supported by the deegree development team. @@ -28,17 +27,17 @@ deegree webservices downloads are available on the `deegree home page