no more need of this workaround, tomcat fixed it
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/234a109e Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/234a109e Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/234a109e Branch: refs/heads/tomee-7.0.0-M1 Commit: 234a109ee9f496c2075ba4cb7ea221fef0068496 Parents: 938c6f8 Author: Romain Manni-Bucau <rmann...@gmail.com> Authored: Wed Oct 21 18:07:31 2015 +0200 Committer: Romain Manni-Bucau <rmann...@gmail.com> Committed: Wed Oct 21 18:07:31 2015 +0200 ---------------------------------------------------------------------- pom.xml | 2 +- .../org/apache/tomee/installer/Installer.java | 48 ++++++-------------- 2 files changed, 16 insertions(+), 34 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/234a109e/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index c439adb..8e5084e 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ <version.shrinkwrap.descriptor>2.0.0-alpha-7</version.shrinkwrap.descriptor> <version.shrinkwrap.shrinkwrap>1.2.2</version.shrinkwrap.shrinkwrap> - <tomcat.version>8.0.27</tomcat.version> + <tomcat.version>8.0.28</tomcat.version> <cxf.version>3.1.3</cxf.version> <ehcache.version>2.8.5</ehcache.version> http://git-wip-us.apache.org/repos/asf/tomee/blob/234a109e/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java ---------------------------------------------------------------------- diff --git a/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java b/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java index 919ae48..621c82b 100644 --- a/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java +++ b/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java @@ -195,41 +195,23 @@ public class Installer implements InstallerInterface { } private void workaroundOnBat() { - { - String catalinaBat = Installers.readAll(paths.getCatalinaBatFile(), alerts); - if (catalinaBat == null || catalinaBat.contains("set _EXECJAVA=\"%_RUNJAVA%\"") /* already done since we just quote it */) { - return; - } - - // add our magic bits to the catalina bat file - catalinaBat = catalinaBat - .replace("set _EXECJAVA=%_RUNJAVA%", "set _EXECJAVA=\"%_RUNJAVA%\"") - .replace(" %_RUNJAVA%", " \"%_RUNJAVA%\""); - - // overwrite the catalina.bat file - if (!Installers.writeAll(paths.getCatalinaBatFile(), catalinaBat, alerts)) { - alerts.addInfo("Can't add workarounds for catalina.bat"); - } + final File setclasspath = new File(paths.getCatalinaBinDir(), "setclasspath.bat"); + String bat = Installers.readAll(setclasspath, alerts); + if (bat == null || bat.contains(" NOT DEFINED ") /* already done, tomcat doesnt use yet this new Windows NT 4 syntax */) { + return; } - { - final File setclasspath = new File(paths.getCatalinaBinDir(), "setclasspath.bat"); - String bat = Installers.readAll(setclasspath, alerts); - if (bat == null || bat.contains(" NOT DEFINED ") /* already done, tomcat doesnt use yet this new Windows NT 4 syntax */) { - return; - } - // add our magic bits to the catalina bat file - bat = bat // could be regex but here the diff is explicit which is better IMO - .replace("not \"%JRE_HOME%\" == \"\"", "DEFINED JRE_HOME") - .replace("not \"%JAVA_HOME%\" == \"\"", "DEFINED JAVA_HOME") - .replace("not \"%_RUNJAVA%\" == \"\"", "DEFINED _RUNJAVA") - .replace("not \"%_RUNJDB%\" == \"\"", "DEFINED _RUNJDB") - .replace("\"%JAVA_HOME%\" == \"\"", "NOT DEFINED JAVA_HOME"); - - // overwrite the catalina.bat file - if (!Installers.writeAll(setclasspath, bat, alerts)) { - alerts.addInfo("Can't add workarounds for setclasspath.bat"); - } + // add our magic bits to the catalina bat file + bat = bat // could be regex but here the diff is explicit which is better IMO + .replace("not \"%JRE_HOME%\" == \"\"", "DEFINED JRE_HOME") + .replace("not \"%JAVA_HOME%\" == \"\"", "DEFINED JAVA_HOME") + .replace("not \"%_RUNJAVA%\" == \"\"", "DEFINED _RUNJAVA") + .replace("not \"%_RUNJDB%\" == \"\"", "DEFINED _RUNJDB") + .replace("\"%JAVA_HOME%\" == \"\"", "NOT DEFINED JAVA_HOME"); + + // overwrite the catalina.bat file + if (!Installers.writeAll(setclasspath, bat, alerts)) { + alerts.addInfo("Can't add workarounds for setclasspath.bat"); } }