IDEMPIERE-3451 IDEMPIERE_JAVA_OPTIONS property not work - general changes in setup process

- enable back the ability to configure the IDEMPIERE_JAVA_OPTIONS in idempiereEnv.properties and preserve it between setups (as suggested in patch from Vinicius and Eduardo)
- fix a minor issue on Console Setup - not assuming correctly the default database type
- implement update-prd.sh - so other products can be updated (not just org.adempiere.server.product)
This commit is contained in:
Carlos Ruiz 2017-08-26 19:21:17 +02:00
parent 553867474e
commit 58df7a7405
10 changed files with 112 additions and 69 deletions

View File

@ -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;
}
}
}

View File

@ -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

View File

@ -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

View File

@ -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
cp $IDEMPIERE_HOME/utils/myEnvironment.sh $IDEMPIERE_HOME/utils/myEnvironment.sav
fi

View File

@ -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

View File

@ -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

View File

@ -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
)

View File

@ -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

View File

@ -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%

View File

@ -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