diff --git a/org.adempiere.install/src/org/compiere/install/console/ConfigurationConsole.java b/org.adempiere.install/src/org/compiere/install/console/ConfigurationConsole.java index dcd87f0119..81829c1359 100644 --- a/org.adempiere.install/src/org/compiere/install/console/ConfigurationConsole.java +++ b/org.adempiere.install/src/org/compiere/install/console/ConfigurationConsole.java @@ -463,25 +463,25 @@ public class ConfigurationConsole { { writer.println("Database Type ["+(dbTypeSelected+1)+"]"); String input = reader.readLine(); - if (input != null && input.trim().length() > 0) + try { - try + if (input == null || input.trim().length() == 0) { - int inputIndex = Integer.parseInt(input); - if (inputIndex <= 0 || inputIndex > ConfigurationData.DBTYPE.length) - { - writer.println("Invalid input, please enter numeric value of 1 to " + ConfigurationData.DBTYPE.length); - continue; - } - data.initDatabase(ConfigurationData.DBTYPE[inputIndex-1]); - data.setDatabaseType(ConfigurationData.DBTYPE[inputIndex-1]); - break; + input = Integer.toString(dbTypeSelected+1); } - catch (NumberFormatException e){ + int inputIndex = Integer.parseInt(input); + if (inputIndex <= 0 || inputIndex > ConfigurationData.DBTYPE.length) + { writer.println("Invalid input, please enter numeric value of 1 to " + ConfigurationData.DBTYPE.length); + continue; } + data.initDatabase(ConfigurationData.DBTYPE[inputIndex-1]); + data.setDatabaseType(ConfigurationData.DBTYPE[inputIndex-1]); + break; + } + catch (NumberFormatException e){ + writer.println("Invalid input, please enter numeric value of 1 to " + ConfigurationData.DBTYPE.length); } - break; } } } diff --git a/org.adempiere.server-feature/idempiere-server.bat b/org.adempiere.server-feature/idempiere-server.bat index 7f3e4427eb..2cb40bfe01 100644 --- a/org.adempiere.server-feature/idempiere-server.bat +++ b/org.adempiere.server-feature/idempiere-server.bat @@ -17,5 +17,20 @@ goto START @Echo Starting iDempiere Server ... @Echo ======================================= +CALL utils\myEnvironment.bat Server + FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c -@"%JAVA%" -Dosgi.console=localhost:12612 -Djetty.home=jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-selector.xml,etc/jetty-ssl.xml,etc/jetty-https.xml,etc/jetty-deployer.xml -XX:MaxPermSize=192m -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -jar %JARFILE% -application org.adempiere.server.application + +@Set VMOPTS=-Xbootclasspath/p:alpn-boot.jar +@Set VMOPTS=%VMOPTS% -Xbootclasspath/p:alpn-boot.jar +@Set VMOPTS=%VMOPTS% -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.eclipse.jetty.alpn +@Set VMOPTS=%VMOPTS% -Dosgi.compatibility.bootdelegation=true +@Set VMOPTS=%VMOPTS% -Djetty.home=jettyhome +@Set VMOPTS=%VMOPTS% -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml +@Set VMOPTS=%VMOPTS% -Dosgi.console=localhost:12612 +@Set VMOPTS=%VMOPTS% -Dmail.mime.encodefilename=true +@Set VMOPTS=%VMOPTS% -Dmail.mime.decodefilename=true +@Set VMOPTS=%VMOPTS% -Dmail.mime.encodeparameters=true +@Set VMOPTS=%VMOPTS% -Dmail.mime.decodeparameters=true + +@"%JAVA%" %IDEMPIERE_JAVA_OPTIONS% %VMOPTS% -jar %JARFILE% -application org.adempiere.server.application diff --git a/org.adempiere.server-feature/idempiere-server.sh b/org.adempiere.server-feature/idempiere-server.sh index 4e6ad23b24..e6b23ccf31 100644 --- a/org.adempiere.server-feature/idempiere-server.sh +++ b/org.adempiere.server-feature/idempiere-server.sh @@ -18,5 +18,18 @@ echo Starting iDempiere Server echo =================================== unset DISPLAY -BASE=`dirname $( readlink -f idempiere-server.sh )` -$JAVA ${DEBUG} -Xbootclasspath/p:alpn-boot.jar -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.eclipse.jetty.alpn -Dosgi.compatibility.bootdelegation=true -Djetty.home=$BASE/jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml -Dosgi.console=localhost:12612 -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -jar $BASE/plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.server.application +BASE=`dirname $( readlink -f $0 )` +. $BASE/utils/myEnvironment.sh Server + +VMOPTS="-Xbootclasspath/p:alpn-boot.jar +-Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.eclipse.jetty.alpn +-Dosgi.compatibility.bootdelegation=true +-Djetty.home=$BASE/jettyhome +-Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml +-Dosgi.console=localhost:12612 +-Dmail.mime.encodefilename=true +-Dmail.mime.decodefilename=true +-Dmail.mime.encodeparameters=true +-Dmail.mime.decodeparameters=true" + +$JAVA ${DEBUG} $IDEMPIERE_JAVA_OPTIONS $VMOPTS -jar $BASE/plugins/org.eclipse.equinox.launcher_1.*.jar -application org.adempiere.server.application diff --git a/org.adempiere.server-feature/utils.unix/myEnvironmentTemplate.sh b/org.adempiere.server-feature/utils.unix/myEnvironmentTemplate.sh index 34766434df..fee55a1705 100644 --- a/org.adempiere.server-feature/utils.unix/myEnvironmentTemplate.sh +++ b/org.adempiere.server-feature/utils.unix/myEnvironmentTemplate.sh @@ -64,10 +64,10 @@ export ADEMPIERE_KEYSTOREPASS # Java ADEMPIERE_JAVA=$JAVA_HOME/bin/java export ADEMPIERE_JAVA -ADEMPIERE_JAVA_OPTIONS="@ADEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=$IDEMPIERE_HOME" -export ADEMPIERE_JAVA_OPTIONS +IDEMPIERE_JAVA_OPTIONS="@IDEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=$IDEMPIERE_HOME" +export IDEMPIERE_JAVA_OPTIONS if [ $DOLLAR$# -eq 0 ] then - cp myEnvironment.sh myEnvironment.sav -fi + cp $IDEMPIERE_HOME/utils/myEnvironment.sh $IDEMPIERE_HOME/utils/myEnvironment.sav +fi \ No newline at end of file diff --git a/org.adempiere.server-feature/utils.windows/myEnvironmentTemplate.bat b/org.adempiere.server-feature/utils.windows/myEnvironmentTemplate.bat index 9b36e362b5..033939af6b 100644 --- a/org.adempiere.server-feature/utils.windows/myEnvironmentTemplate.bat +++ b/org.adempiere.server-feature/utils.windows/myEnvironmentTemplate.bat @@ -46,9 +46,9 @@ @Rem Java @SET ADEMPIERE_JAVA=@JAVA_HOME@\bin\java -@SET ADEMPIERE_JAVA_OPTIONS=@ADEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=@IDEMPIERE_HOME@ +@SET IDEMPIERE_JAVA_OPTIONS=@IDEMPIERE_JAVA_OPTIONS@ -DIDEMPIERE_HOME=@IDEMPIERE_HOME@ @SET CLASSPATH="@IDEMPIERE_HOME@\lib\Adempiere.jar;@IDEMPIERE_HOME@\lib\AdempiereCLib.jar;" @Rem Save Environment file -@if (%1) == () copy myEnvironment.bat myEnvironment_%RANDOM%.bat /Y +@if (%1) == () copy utils\myEnvironment.bat utils\myEnvironment_%RANDOM%.bat /Y diff --git a/org.idempiere.eclipse.platform-feature/build.properties b/org.idempiere.eclipse.platform-feature/build.properties index 0b8cfb5f12..f08a8f4cec 100644 --- a/org.idempiere.eclipse.platform-feature/build.properties +++ b/org.idempiere.eclipse.platform-feature/build.properties @@ -1,20 +1,20 @@ bin.includes = feature.xml root.folder.director=director -root.linux.gtk.x86_64=file:director.sh,file:update.sh +root.linux.gtk.x86_64=file:director.sh,file:update.sh,file:update-prd.sh root.linux.gtk.x86_64.permissions.755=*.sh,**/*.sh -root.linux.gtk.x86=file:director.sh,file:update.sh +root.linux.gtk.x86=file:director.sh,file:update.sh,file:update-prd.sh root.linux.gtk.x86.permissions.755=*.sh,**/*.sh -root.macosx.cocoa.x86=file:director.sh,file:update.sh +root.macosx.cocoa.x86=file:director.sh,file:update.sh,file:update-prd.sh root.macosx.cocoa.x86.permissions.755=*.sh,**/*.sh -root.macosx.cocoa.x86_64=file:director.sh,file:update.sh +root.macosx.cocoa.x86_64=file:director.sh,file:update.sh,file:update-prd.sh root.macosx.cocoa.x86_64.permissions.755=*.sh,**/*.sh -root.win32.win32.x86=file:director.bat,file:update.bat -root.win32.win32.x86_64=file:director.bat,file:update.bat +root.win32.win32.x86=file:director.bat,file:update.bat,file:update-prd.bat +root.win32.win32.x86_64=file:director.bat,file:update.bat,file:update-prd.bat -root.solaris.gtk.x86=file:director.sh,file:update.sh +root.solaris.gtk.x86=file:director.sh,file:update.sh,file:update-prd.sh root.solaris.gtk.x86.permissions.755=*.sh,**/*.sh \ No newline at end of file diff --git a/org.idempiere.eclipse.platform-feature/update-prd.bat b/org.idempiere.eclipse.platform-feature/update-prd.bat new file mode 100644 index 0000000000..8da6c4f9cb --- /dev/null +++ b/org.idempiere.eclipse.platform-feature/update-prd.bat @@ -0,0 +1,43 @@ +@Title ... p2 director +@Echo on + +cd %~dp0 +set DESTINATION=%cd% +@echo %DESTINATION% +@echo %1% + +copy idempiere.ini idempiere.ini.sav + +if exist jetty.xml.sav del /q jetty.xml.sav +if exist jettyhome\etc\jetty.xml ( + copy jettyhome\etc\jetty.xml jetty.xml.sav +) + +if exist jetty-ssl.xml.sav del /q jetty-ssl.xml.sav +if exist jettyhome\etc\jetty-ssl.xml ( + copy jettyhome\etc\jetty-ssl.xml jetty-ssl.xml.sav +) + +if exist jetty-selector.xml.sav del /q jetty-selector.xml.sav +if exist jettyhome\etc\jetty-selector.xml ( + copy jettyhome\etc\jetty-selector.xml jetty-selector.xml.sav +) + +@call %DESTINATION%\update-prd %1% org.adempiere.server.product + +copy idempiere.ini.sav idempiere.ini + +if exist jetty.xml.sav ( + copy jetty.xml.sav jettyhome\etc\jetty.xml + del /q jetty.xml.sav +) + +if exist jetty-ssl.xml.sav ( + copy jetty-ssl.xml.sav jettyhome\etc\jetty-ssl.xml + del /q jetty-ssl.xml.sav +) + +if exist jetty-selector.xml.sav ( + copy jetty-selector.xml.sav jettyhome\etc\jetty-selector.xml + del /q jetty-selector.xml.sav +) diff --git a/org.idempiere.eclipse.platform-feature/update-prd.sh b/org.idempiere.eclipse.platform-feature/update-prd.sh new file mode 100644 index 0000000000..a8aa4e76b5 --- /dev/null +++ b/org.idempiere.eclipse.platform-feature/update-prd.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# + +cd $(dirname "${0}") +DESTINATION=$(pwd) + +VMOPTS="-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true" +java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u $2 +java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i $2 \ No newline at end of file diff --git a/org.idempiere.eclipse.platform-feature/update.bat b/org.idempiere.eclipse.platform-feature/update.bat index 60e31a7c05..a4fbd288ae 100644 --- a/org.idempiere.eclipse.platform-feature/update.bat +++ b/org.idempiere.eclipse.platform-feature/update.bat @@ -6,41 +6,6 @@ set DESTINATION=%cd% @echo %DESTINATION% @echo %1% -copy idempiere.ini idempiere.ini.sav - -if exist jetty.xml.sav del /q jetty.xml.sav -if exist jettyhome\etc\jetty.xml ( - copy jettyhome\etc\jetty.xml jetty.xml.sav -) - -if exist jetty-ssl.xml.sav del /q jetty-ssl.xml.sav -if exist jettyhome\etc\jetty-ssl.xml ( - copy jettyhome\etc\jetty-ssl.xml jetty-ssl.xml.sav -) - -if exist jetty-selector.xml.sav del /q jetty-selector.xml.sav -if exist jettyhome\etc\jetty-selector.xml ( - copy jettyhome\etc\jetty-selector.xml jetty-selector.xml.sav -) - FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c -java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -u org.adempiere.server.product -java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -i org.adempiere.server.product - -copy idempiere.ini.sav idempiere.ini - -if exist jetty.xml.sav ( - copy jetty.xml.sav jettyhome\etc\jetty.xml - del /q jetty.xml.sav -) - -if exist jetty-ssl.xml.sav ( - copy jetty-ssl.xml.sav jettyhome\etc\jetty-ssl.xml - del /q jetty-ssl.xml.sav -) - -if exist jetty-selector.xml.sav ( - copy jetty-selector.xml.sav jettyhome\etc\jetty-selector.xml - del /q jetty-selector.xml.sav -) - +java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -u %2% +java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -i %2% diff --git a/org.idempiere.eclipse.platform-feature/update.sh b/org.idempiere.eclipse.platform-feature/update.sh index 404c8c9490..e26cf3b792 100644 --- a/org.idempiere.eclipse.platform-feature/update.sh +++ b/org.idempiere.eclipse.platform-feature/update.sh @@ -33,9 +33,7 @@ then cp jettyhome/etc/jetty-selector.xml jetty-selector.xml.sav fi -VMOPTS="-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true" -java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u org.adempiere.server.product -java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i org.adempiere.server.product +$DESTINATION/update-prd.sh $1 org.adempiere.server.product cp idempiere.ini.sav idempiere.ini