converted to osgi based deployment. remove application server config that's no longer used.

This commit is contained in:
Heng Sin Low 2010-07-13 16:07:13 +08:00
parent 5b8efcd223
commit 7ddc6c4d1f
10 changed files with 161 additions and 1142 deletions

View File

@ -2,16 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/tools"/>
<classpathentry kind="src" path="/base"/>
<classpathentry kind="src" path="/client"/>
<classpathentry kind="src" path="/serverApps"/>
<classpathentry kind="src" path="/serverRoot"/>
<classpathentry kind="lib" path="/tools/lib/ant.jar"/>
<classpathentry kind="lib" path="/tools/lib/ant-commons-net.jar"/>
<classpathentry kind="lib" path="/tools/lib/ant-launcher.jar"/>
<classpathentry kind="lib" path="/tools/lib/commons-net-1.4.0.jar"/>
<classpathentry kind="lib" path="/tools/lib/ojdbc6.jar"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="build"/>
</classpath>

View File

@ -18,24 +18,11 @@ fi
echo ===================================
echo Setup Dialog
echo ===================================
CP=lib/CInstall.jar:lib/Adempiere.jar:lib/CCTools.jar:lib/oracle.jar:lib/jboss.jar:lib/postgresql.jar:
# Trace Level Parameter, e.g. ARGS=ALL
ARGS=CONFIG
# To test the OCI driver, add -DTestOCI=Y to the command - example:
# $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -DTestOCI=Y org.compiere.install.Setup $ARGS
# $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS
# OSGi:
$JAVA -jar osgi/org.eclipse.osgi_3.5.0.v20090520.jar -clean -console -application org.adempiere.Install
$JAVA -jar osgi/org.eclipse.osgi_3.6.0.v20100517.jar -clean -console -install osgi -configuration osgi/client -application org.adempiere.Install
#echo ===================================
#echo Setup Adempiere Server Environment
#echo ===================================
#$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -Dant.home="." org.apache.tools.ant.launch.Launcher setup
echo ===================================
echo Make .sh executable & set Env
echo ===================================
@ -43,15 +30,10 @@ chmod -R a+x *.sh
find . -name '*.sh' -exec chmod a+x '{}' \;
# Sign database build
cd utils
#. ./RUN_SignDatabaseBuild.sh
# cd utils
#. ./RUN_SignDatabaseBuild.sh
. ./RUN_UnixEnv.sh
#echo ================================
#echo Test local Connection
#echo ================================
#%JAVA% -classpath lib/Adempiere.jar:lib/AdempiereCLib.jar org.compiere.install.ConnectTest localhost
echo .
echo For problems, check log file in base directory

View File

@ -33,8 +33,6 @@
<!-- create the time stamp and environment -->
<tstamp />
<available file="${envFile}" property="envFileExists" />
<available file="lib/AdempiereOriginal.jar" type="file" property="adempiereOriginal.exists"/>
<available file="lib/webuiOriginal.war" type="file" property="webuiOriginal.exists"/>
<fail message="**** RUN_setup was not successful - please re-run ****" unless="envFileExists" />
<property file="${envFile}"/>
<filter filtersfile="${envFile}" />
@ -42,20 +40,12 @@
<echo message="Environment = ${envFile}" />
<echo message="Java VM = ${ADEMPIERE_JAVA_TYPE}" />
<echo message="Database = ${ADEMPIERE_DB_TYPE}" />
<echo message="Apps Server = ${ADEMPIERE_APPS_TYPE}" />
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<!-- Environment variables -->
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isAppsJBoss">
<equals arg1="jboss" arg2="${ADEMPIERE_APPS_TYPE}" />
</condition>
<condition property="isAppsGlassfish">
<equals arg1="glassfish" arg2="${ADEMPIERE_APPS_TYPE}" />
</condition>
<echo message="Windows=${isWindows} JBoss=${isAppsJBoss} Glassfish=${isAppsGlassfish}" />
</target>
@ -120,449 +110,13 @@
</target>
<target name="backupAdempiereOriginal" unless="adempiereOriginal.exists">
<copy file="lib/Adempiere.jar" tofile="lib/AdempiereOriginal.jar" overwrite="yes" />
</target>
<target name="backupWebuiOriginal" unless="webuiOriginal.exists">
<copy file="lib/webui.war" tofile="lib/webuiOriginal.war" overwrite="yes" />
</target>
<!-- rebuild Adempiere.jar and webui.war to include possible customization and patches -->
<target name="setupALib" depends="setupInit, backupAdempiereOriginal">
<delete file="lib/packages.jar" failonerror="false"/>
<jar jarfile="lib/packages.jar" duplicate="preserve">
<!-- 2pack packages -->
<zipgroupfileset dir="packages" includes="**/lib/*.jar" casesensitive="no">
<patternset refid="manifest.exclude"/>
</zipgroupfileset>
</jar>
<jar jarfile="lib/Adempiere1.jar" index="yes" duplicate="preserve">
<!-- pack patches.jar and customization.jar into Adempiere.jar -->
<zipfileset src="lib/customization.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<!-- 2pack packages -->
<zipfileset src="lib/packages.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/patches.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<!-- posterita packages -->
<zipfileset src="lib/posterita.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/AdempiereOriginal.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<indexjars>
<pathelement path="lib/AdempiereCLib.jar"/>
<pathelement path="lib/CompiereJasperReqs.jar"/>
</indexjars>
<manifest>
<attribute name="Specification-Title" value="Adempiere"/>
<attribute name="Specification-Version" value="${ADEMPIERE_VERSION}"/>
<attribute name="Specification-Vendor" value="ADempiere"/>
<attribute name="Implementation-Title" value="Adempiere ${ADEMPIERE_VERSION}"/>
<attribute name="Implementation-Version" value="${ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Vendor" value="${ADEMPIERE_VENDOR}"/>
<attribute name="Implementation-URL" value="http://www.adempiere.com"/>
<attribute name="Main-Class" value="org.compiere.Adempiere"/>
<attribute name="Class-Path" value="AdempiereSLib.jar"/>
</manifest>
</jar>
<!-- Sign Adempiere Jar -->
<signjar jar="lib/Adempiere1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/Adempiere1.jar" tofile="lib/Adempiere.jar" overwrite="yes" />
<!-- Sign patches Jar -->
<copy file="lib/patches.jar" tofile="lib/patches1.jar" overwrite="yes" />
<signjar jar="lib/patches1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/patches1.jar" tofile="lib/patches.jar" overwrite="yes" />
<!-- Sign customization Jar -->
<copy file="lib/customization.jar" tofile="lib/customization1.jar" overwrite="yes" />
<signjar jar="lib/customization1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/customization1.jar" tofile="lib/customization.jar" overwrite="yes" />
<!-- clean up -->
<delete file="lib/Adempiere1.jar"/>
<delete file="lib/patches1.jar"/>
<delete file="lib/customization1.jar"/>
</target>
<!-- rebuild Adempiere.jar and webui.war to include possible customization and patches -->
<target name="setupWLib" depends="setupInit, backupWebuiOriginal">
<delete file="lib/zkpackages.jar" failonerror="false"/>
<jar jarfile="lib/zkpackages.jar" duplicate="preserve">
<!-- 2pack zkpackages -->
<zipgroupfileset dir="zkpackages" includes="**/lib/*.jar" casesensitive="no">
<patternset refid="manifest.exclude"/>
</zipgroupfileset>
</jar>
<zip destfile="lib/webui1.war" duplicate="preserve">
<!-- pack zkpatches.jar and zkcustomization.jar into webui.war -->
<zipfileset src="lib/zkcustomization.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<!-- 2pack zkpackages -->
<zipfileset src="lib/zkpackages.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/zkpatches.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/webuiOriginal.war" >
<patternset refid="manifest.exclude"/>
</zipfileset>
</zip>
<copy file="lib/webui1.war" tofile="lib/webui.war" overwrite="yes" />
<!-- clean up -->
<delete file="lib/webui1.war"/>
</target>
<!-- ==================================================== -->
<!-- Adempiere Client Lib -->
<!-- ==================================================== -->
<target name="setupCLib" depends="setupInit"
description="Setup Adempiere Client Lib">
<!-- Delete Old -->
<delete file="lib/AdempiereCLib.jar" failonerror="no" />
<delete file="lib/CClient.jar" failonerror="no" />
<delete file="lib/CTools.jar" failonerror="no" />
<!-- Create AdempiereCLib.jar file -->
<jar jarfile="lib/AdempiereCLib.jar" index="yes" duplicate="preserve">
<zipfileset src="lib/${ADEMPIERE_APPS_TYPE}.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/CCTools.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/oracle.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/postgresql.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<manifest>
<attribute name="Specification-Title" value="Adempiere Client Library" />
<attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Specification-Vendor" value="Adempiere" />
<attribute name="Implementation-Title" value="AdempiereCLib ${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Implementation-Version" value="${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name="Implementation-Vendor" value="Adempiere, Inc." />
<attribute name="Implementation-URL" value="http://www.adempiere.com" />
</manifest>
</jar>
<echo message="KeyStore=${ADEMPIERE_KEYSTORE} - Alias=${ADEMPIERE_KEYSTORECODEALIAS}" />
<!-- Sign AdempiereCLib Jar -->
<signjar jar="lib/AdempiereCLib.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
</target>
<!-- ==================================================== -->
<!-- Adempiere Server Lib -->
<!-- ==================================================== -->
<target name="setupSLib" depends="setupInit"
description="Setup Adempiere Server Lib">
<!-- Delete Old -->
<delete file="lib/AdempiereSLib.jar" failonerror="no" />
<delete file="lib/CServer.jar" failonerror="no" />
<!-- Create AdempiereSLib.jar file -->
<jar jarfile="lib/AdempiereSLib.jar" index="yes" duplicate="preserve">
<zipfileset src="lib/CSTools.jar">
<patternset refid="manifest.exclude"/>
<exclude name="**/*.bsh"/>
</zipfileset>
<zipfileset src="lib/oracle.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/postgresql.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="lib/CompiereJasperReqs.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<manifest>
<attribute name="Specification-Title" value="Adempiere Server Library" />
<attribute name="Specification-Version" value="${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Specification-Vendor" value="Adempiere" />
<attribute name="Implementation-Title" value="AdempiereSLib ${ADEMPIERE_MAIN_VERSION}" />
<attribute name="Implementation-Version" value="${ADEMPIERE_MAIN_VERSION} ${DSTAMP}-${TSTAMP}" />
<attribute name="Implementation-Vendor" value="Adempiere, Inc." />
<attribute name="Implementation-URL" value="http://www.adempiere.com" />
</manifest>
</jar>
<!-- Sign AdempiereSLib Jar -->
<signjar jar="lib/AdempiereSLib.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<delete dir="buildSLib" />
<!-- Sign CompiereJasperReqs.jar for Java Web Start -->
<signjar jar="lib/CompiereJasperReqs.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
</target>
<!-- Sign other application jars -->
<target name="signOtherJars" depends="setupInit" >
<!-- Sign AdempiereRoot Jar -->
<copy file="lib/adempiereRoot.jar" tofile="lib/adempiereRoot1.jar" overwrite="yes" />
<signjar jar="lib/adempiereRoot1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/adempiereRoot1.jar" tofile="lib/adempiereRoot.jar" overwrite="yes" />
<delete file="lib/adempiereRoot1.jar"/>
<!-- Sign AdempiereApps Jar -->
<copy file="lib/adempiereApps.jar" tofile="lib/adempiereApps1.jar" overwrite="yes" />
<signjar jar="lib/adempiereApps1.jar" alias="${ADEMPIERE_KEYSTORECODEALIAS}"
storepass="${ADEMPIERE_KEYSTOREPASS}" keystore="${ADEMPIERE_KEYSTORE}" />
<copy file="lib/adempiereApps1.jar" tofile="lib/adempiereApps.jar" overwrite="yes" />
<delete file="lib/adempiereApps1.jar"/>
</target>
<!-- ==================================================== -->
<!-- Setup Lib -->
<!-- ==================================================== -->
<target name="setupLib" depends="setupInit, setupWin, setupNonWin"
description="Setup Adempiere Lib directory">
<!-- Filter files Overwrite -->
<copy file="${basedir}/utils/ftpPutExportTemplate.txt"
tofile="${basedir}/utils/ftpPutExport.txt" filtering="yes" overwrite="yes" />
<copy file="${basedir}/utils/ftpGetAdempiereTemplate.txt"
tofile="${basedir}/utils/ftpGetAdempiere.txt" filtering="yes" overwrite="yes" />
<copy file="${basedir}/utils/adempiereDirectTemplate.jnlp"
tofile="${basedir}/lib/adempiereDirect.jnlp" filtering="yes" overwrite="yes" />
<!-- Create Client Zip
<zip zipfile="${basedir}/lib/AdempiereClient.zip">
<zipfileset dir="." prefix="Adempiere"
includes="*.html" />
<zipfileset dir="." prefix="Adempiere"
includes="RUN_Adempiere.*" />
<zipfileset dir="utils" prefix="Adempiere"
includes="WinEnv.js" />
<zipfileset dir="lib" prefix="Adempiere/lib"
includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" />
</zip>
-->
<!-- Save properties -->
<copy file="AdempiereEnv.properties"
tofile="AdempiereEnv.properties.save" />
<copy file="Adempiere.properties"
tofile="Adempiere.properties.save" />
</target>
<!-- Update application library -->
<target name="updateLib" depends="setupInit, setupWin, setupNonWin, setupALib, setupWLib, signOtherJars">
<!-- Create Client Zip -->
<zip zipfile="${basedir}/lib/AdempiereClient.zip">
<zipfileset dir="." prefix="Adempiere"
includes="*.html" />
<zipfileset dir="." prefix="Adempiere"
includes="RUN_Adempiere.*" />
<zipfileset dir="utils" prefix="Adempiere"
includes="WinEnv.js" />
<zipfileset dir="lib" prefix="Adempiere/lib"
includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" />
</zip>
</target>
<target name="createEAR">
<!-- Create adempiereRoot war -->
<zip destfile="${basedir}/lib/adempiereRoot.war">
<!-- copy Base -->
<zipfileset src="${basedir}/lib/adempiereRootBase.war" />
<!-- copy to adempiereHome -->
<zipfileset dir="${basedir}/lib"
includes="AdempiereClient.zip,Adempiere.jar,AdempiereCLib.jar,*.jnlp,*.0,*.html,CompiereJasperReqs.jar,CompiereJasper.jar"
prefix="adempiereHome" />
</zip>
<!-- Create adempiereWebCM war -->
<zip destfile="${basedir}/lib/adempiereWebCM.war">
<!-- copy Base -->
<zipfileset src="${basedir}/lib/adempiereWebCMbase.war" />
</zip>
<antcall target="jbossEAR" inheritall="true"/>
<antcall target="glassfishEAR" inheritall="true"/>
</target>
<target name="jbossEAR" if="isAppsJBoss">
<!-- bundle everything in one ear file for simpler deployment -->
<ear destfile="${basedir}/lib/adempiere.ear" appxml="${basedir}/lib/adempiereAll.xml" >
<fileset dir="${basedir}/lib"
includes="Adempiere.jar,AdempiereSLib.jar,adempiereRoot.jar,adempiereApps.jar,adempiereApps.war,adempiereRoot.war,adempiereWebStore.war,adempiereWebCM.war,posterita.war,posterita.jar,webui.war" />
</ear>
</target>
<target name="glassfishEAR" if="isAppsGlassfish">
<unzip src="${basedir}/lib/webui.war" dest="${basedir}/lib/webui"/>
<copy file="${basedir}/lib/webui/WEB-INF/web-2.5.xml" tofile="${basedir}/lib/webui/WEB-INF/web.xml" overwrite="true" />
<delete file="${basedir}/lib/webui.war"/>
<zip destfile="${basedir}/lib/webui.war" basedir="${basedir}/lib/webui" />
<delete dir="${basedir}/lib/webui"/>
<!-- bundle everything in one ear file for simpler deployment -->
<ear destfile="${basedir}/lib/adempiere.ear" appxml="${basedir}/lib/adempiereAll.xml" >
<fileset dir="${basedir}/lib"
includes="adempiereRoot.jar,adempiereApps.jar,adempiereApps.war,adempiereRoot.war,adempiereWebStore.war,adempiereWebCM.war,posterita.war,posterita.jar,webui.war" />
<metainf dir="${basedir}/glassfish" includes="sun-application.xml"/>
</ear>
</target>
<!-- ==================================================== -->
<!-- Setup EAR Libraries -->
<!-- ==================================================== -->
<target name="setupEAR" depends="setupLib"
description="Setup Adempiere EAR Libraries">
<antcall target="createEAR" inheritall="true"/>
</target>
<target name="updateEAR" depends="updateLib">
<antcall target="createEAR" inheritall="true"/>
</target>
<!-- Update JBoss Server -->
<target name="updateJBoss" depends="updateEAR" if="isAppsJBoss"
description="Update JBoss Application Server">
<!-- Copy -->
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<!-- Deploy in exploded format for faster startup time -->
<unjar dest="${ADEMPIERE_APPS_DEPLOY}/adempiere.ear" src="${basedir}/lib/adempiere.ear" overwrite="true">
</unjar>
</target>
<!-- ==================================================== -->
<!-- Setup Glassfish (Sun Application Server) -->
<!-- ==================================================== -->
<target name="setupGlassfish" depends="setupLib, setupEAR" if="isAppsGlassfish"
description="Setup Glassfish Application Server">
<copy file="${basedir}/lib/adempiere.ear" tofile="${basedir}/glassfish/adempiere.ear"/>
<copy file="${basedir}/lib/Adempiere.jar" tofile="${basedir}/glassfish/Adempiere.jar"/>
<copy file="${basedir}/lib/AdempiereSLib.jar" tofile="${basedir}/glassfish/AdempiereSLib.jar"/>
</target>
<!-- ==================================================== -->
<!-- Setup JBoss Server -->
<!-- ==================================================== -->
<target name="setupJBoss" depends="setupEAR" if="isAppsJBoss"
description="Setup JBoss Application Server">
<!-- Filter JBoss Templates Conf -->
<copy file="${basedir}/jboss/server/adempiere/conf/jboss-serviceTemplate.xml" tofile="${basedir}/jboss/server/adempiere/conf/jboss-service.xml" filtering="yes" overwrite="yes" />
<copy file="${basedir}/jboss/server/adempiere/conf/login-configTemplate.xml" tofile="${basedir}/jboss/server/adempiere/conf/login-config.xml" filtering="yes" overwrite="yes" />
<!-- Filter Tomcat 6.0 -->
<copy file="${basedir}/jboss/server/adempiere/deploy/jboss-web.deployer/serverTemplate.xml" tofile="${basedir}/jboss/server/adempiere/deploy/jboss-web.deployer/server.xml" filtering="yes" overwrite="yes" />
<!-- Delete Old -->
<delete file="${basedir}/jboss/server/adempiere/lib/CClient.jar" failonerror="no" />
<delete file="${basedir}/jboss/server/adempiere/lib/CSTools.jar" failonerror="no" />
<delete file="${basedir}/jboss/server/adempiere/lib/CServer.jar" failonerror="no" />
<delete file="${basedir}/jboss/server/adempiere/lib/oracle.jar" failonerror="no" />
<!-- Copy -->
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
<!-- Deploy in exploded format for faster startup time -->
<unjar dest="${ADEMPIERE_APPS_DEPLOY}/adempiere.ear" src="${basedir}/lib/adempiere.ear" overwrite="true">
</unjar>
</target>
<!-- ==================================================== -->
<!-- Update J2EE Server -->
<!-- ==================================================== -->
<target name="updateDeploy" depends="updateJBoss"
description="Update Adempiere Application Server">
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
</target>
<!-- ==================================================== -->
<!-- Deploy J2EE Server -->
<!-- ==================================================== -->
<target name="setupDeploy" depends="setupJBoss, setupGlassfish"
description="Deploy Adempiere Application Server">
<echo message="AppsDeployment= ${ADEMPIERE_APPS_DEPLOY}" />
</target>
<!-- ==================================================== -->
<!-- Update (Main) -->
<!-- ==================================================== -->
<target name="update" depends="updateDeploy"
description="Update Adempiere Deployment">
</target>
<!-- ==================================================== -->
<!-- Setup (Main) -->
<!-- ==================================================== -->
<target name="setup" depends="setupInit, setupWin, setupNonWin, setupWar"
<target name="setup" depends="setupInit, setupWin, setupNonWin"
description="Setup Adempiere">
</target>
<!-- ==================================================== -->
<!-- Setup (War) -->
<!-- ==================================================== -->
<target name="setupWar"
description="Setup Adempiere ZK Webui">
<unzip src="webapp/bridge.war" dest="webapp/bridge" />
<copy todir="webapp/bridge/WEB-INF/eclipse/plugins">
<fileset dir="osgi/plugins">
<include name="**/*"/>
</fileset>
</copy>
</target>
<!-- ==================================================== -->
<!-- Test - Copy -->
<!-- ==================================================== -->
<target name="testsystemCopy"
description="Copy Adempiere to Test System">
<delete dir="lib" />
<delete dir="jboss" />
<delete dir="log" />
<unzip src="\\\\Dev1\\Adempiere\\Install\\Adempiere_253d.zip"
overwrite="true" />
</target>
<!-- ==================================================== -->
<!-- Test - Import DB -->
<!-- ==================================================== -->
<target name="testsystemImport" depends="setup"
description="Import Adempiere DB">
<exec command="${basedir}/lib/RUN_AdempiereImport" />
</target>
<!-- ==================================================== -->
<!-- Test - Setup -->
<!-- ==================================================== -->
<target name="testsystemSetup" depends="testsystemCopy, testsystemImport"
description="Set up Test System">
</target>
<!-- ==================================================== -->
<!-- Shutting down server, setting up adempiere and importing database -->
<!-- ==================================================== -->

View File

@ -3,18 +3,10 @@ Bundle-ManifestVersion: 2
Bundle-Name: install
Bundle-SymbolicName: org.adempiere.install;singleton:=true
Bundle-Version: 0.0.0.1
Bundle-ClassPath: install.jar,
lib/ant.jar,
lib/ant-commons-net.jar,
lib/ant-launcher.jar,
lib/commons-net-1.4.0.jar,
lib/ocrs12.jar,
lib/ojdbc14.jar
Export-Package: images,
org.compiere.install
Bundle-ClassPath: install.jar
Export-Package: org.compiere.install
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
org.adempiere.base;bundle-version="0.0.0",
org.adempiere.client;bundle-version="0.0.0",
org.adempiere.tools;bundle-version="0.0.0"
Bundle-Activator: org.compiere.install.Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View File

@ -1,4 +1,5 @@
source.install.jar = src/
output.install.jar = build/
bin.includes = META-INF/,\
install.jar,\
plugin.xml

View File

@ -21,7 +21,6 @@
<property name="launch.dir" value="../launch"/>
<property name="keystore.dir" value="../keystore"/>
<property name="data.dir" value="../data"/>
<property name="jboss.dir" value="../jboss"/>
<property name="src" value="src"/>
<property name="compile.dir" value="lib"/>
@ -54,71 +53,12 @@
<!-- create the time stamp -->
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${compile.dir}"/>
</target>
<!-- ======================================================= -->
<!-- Compile & Jar -->
<!-- ======================================================= -->
<target name="installCompile" depends="installInit">
<!-- compile the java code from ${src} into ${build.dir} -->
<javac target="1.6" srcdir="${src}" destdir="${compile.dir}" deprecation="on" debug="on">
<classpath refid="project.class.path"/>
</javac>
<!-- copy all image & sound files from src to the build directory -->
<copy todir="${compile.dir}">
<fileset dir="${src}">
<include name="**/images/*"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.wav"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.properties"/>
<exclude name="**/package.html"/>
</fileset>
</copy>
<!-- put everything into the $CInstall.jar file -->
<jar
jarfile="CInstall.jar"
index="yes"
duplicate="preserve">
<fileset dir="${compile.dir}"/>
<!-- Ant (with ftp) files -->
<zipfileset src="../tools/lib/ant.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../tools/lib/ant-launcher.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../tools/lib/ant-commons-net.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<zipfileset src="../tools/lib/commons-net-1.4.0.jar" >
<patternset refid="manifest.exclude"/>
</zipfileset>
<manifest>
<attribute name="Specification-Title" value="CInstall"/>
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
<attribute name="Specification-Vendor" value="Adempiere.org"/>
<attribute name="Implementation-Title" value="CInstall ${env.ADEMPIERE_VERSION}"/>
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
<attribute name="Main-Class" value="org.compiere.install.Setup"/>
<attribute name="Class-Path" value="CTools.jar CClient.jar oracle.jar"/>
</manifest>
</jar>
</target>
<!-- ======================================================= -->
<!-- Update from Web Site + Clean .sh -->
<!-- ======================================================= -->
<target name="installUpdate" depends=""
<target name="installUpdate" depends="plugin"
description="Update install directory with copies of web site">
<fixcrlf srcdir="${src.dir}"
@ -143,20 +83,6 @@
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/Adempiere"/>
<mkdir dir="${build.dir}/Adempiere/images"/>
<mkdir dir="${build.dir}/Adempiere/packages"/>
<mkdir dir="${build.dir}/Adempiere/zkpackages"/>
<mkdir dir="${build.dir}/Adempiere/packages/liberoMFG"/>
<mkdir dir="${build.dir}/Adempiere/packages/liberoMFG/lib"/>
<copy file="../packages/liberoMFG.jar" tofile="${build.dir}/Adempiere/packages/liberoMFG/lib/liberoMFG.jar"/>
<mkdir dir="${build.dir}/Adempiere/zkpackages/liberoMFG"/>
<mkdir dir="${build.dir}/Adempiere/zkpackages/liberoMFG/lib"/>
<copy file="../zkpackages/liberozkMFG.jar" tofile="${build.dir}/Adempiere/zkpackages/liberoMFG/lib/liberozkMFG.jar"/>
<mkdir dir="${build.dir}/Adempiere/packages/liberoHR"/>
<mkdir dir="${build.dir}/Adempiere/packages/liberoHR/lib"/>
<copy file="../packages/liberoHR.jar" tofile="${build.dir}/Adempiere/packages/liberoHR/lib/liberoHR.jar"/>
<copy file="../lib/CheckConflicts.sh" tofile="${build.dir}/Adempiere/lib/CheckConflicts.sh"/>
@ -182,33 +108,34 @@
<include name="**/*0"/>
</fileset>
</copy>
<copy file="${launch.dir}/Release/Adempiere.exe" todir="${build.dir}/Adempiere/lib"/>
<!-- <copy file="CInstall.jar" todir="${build.dir}/Adempiere/lib"/>
<copy file="../sqlj/sqlj.jar" todir="${build.dir}/Adempiere/lib"/>
<copy file="../JasperReports/CompiereJasperReqs.jar" todir="${build.dir}/Adempiere/lib"/> -->
<concat destfile="${build.dir}/Adempiere/lib/index.html">AdempiereHome</concat>
<!-- OSGi Container -->
<mkdir dir="${build.dir}/Adempiere/osgi"/>
<copy overwrite="true" todir="${build.dir}/Adempiere/osgi" >
<fileset dir="../equinox-target">
<include name="configuration/**/*"/>
<include name="plugins/**/*"/>
<include name="org.eclipse.*.jar"/>
</fileset>
<fileset dir="../equinox-target/spring">
<include name="plugins/**/*"/>
</fileset>
<fileset dir="../lib">
<include name="plugins/**/*"/>
</fileset>
</copy>
<!-- Bridge webapp -->
<mkdir dir="${build.dir}/Adempiere/webapp"/>
<copy overwrite="true" todir="${build.dir}/Adempiere/webapp" >
<fileset dir="../lib">
<include name="bridge.war"/>
<copy overwrite="true" todir="${build.dir}/Adempiere/osgi/client" >
<fileset dir="../equinox-target/configuration">
<include name="*.ini"/>
</fileset>
</copy>
</copy>
<copy overwrite="true" todir="${build.dir}/Adempiere/osgi/server" >
<fileset dir="../equinox-target/webapp/configuration">
<include name="*.ini"/>
</fileset>
</copy>
<delete dir="${build.dir}/Adempiere/lib/plugins"/>
<!-- Utils Directory -->
<mkdir dir="${build.dir}/Adempiere/utils"/>
<copy todir="${build.dir}/Adempiere/utils">
@ -237,37 +164,13 @@
<include name="**/Accounting*.*"/>
<include name="Example*.csv"/>
</fileset>
</copy>
</copy>
<copy todir="${build.dir}/Adempiere/data/">
<fileset dir="${data.dir}/seed/">
<include name="**/*.jar"/>
</fileset>
</copy>
<!-- JBoss Directory -->
<mkdir dir="${build.dir}/Adempiere/jboss"/>
<mkdir dir="${build.dir}/Adempiere/jboss/bin"/>
<copy todir="${build.dir}/Adempiere/jboss/bin">
<fileset dir="${jboss.dir}/bin" excludes="**/CVS/**"/>
</copy>
<mkdir dir="${build.dir}/Adempiere/jboss/lib"/>
<copy todir="${build.dir}/Adempiere/jboss/lib">
<fileset dir="${jboss.dir}/lib" excludes="**/CVS/**"/>
</copy>
<mkdir dir="${build.dir}/Adempiere/jboss/server"/>
<copy todir="${build.dir}/Adempiere/jboss/server">
<fileset dir="${jboss.dir}/server"
excludes="**/CVS/**"/>
</copy>
<!-- GlassFish -->
<mkdir dir="${build.dir}/Adempiere/glassfish"/>
<copy todir="${build.dir}/Adempiere/glassfish">
<fileset dir="../glassfishfacet/config"/>
</copy>
<!-- Create Install ZIP -->
<zip zipfile="${build.dir}/Adempiere_${env.ADEMPIERE_VERSION_FILE}.zip"
basedir="${build.dir}"
@ -289,17 +192,20 @@
</target>
<target name="plugin">
<buildPlugin workspaceDirectory=".."
<target name="plugin" depends="installInit">
<buildPlugin workspaceDirectory="${workspace}"
projectName="install"
targetPlatformId="target.platform"
destination="${dist.dir}"
destination="../lib"
buildSourceJar="false" />
</target>
</target>
<target name="clean" description="deletes build">
<delete dir="${build.dir}"/>
<delete dir="${compile.dir}"/>
<delete>
<fileset dir="../lib/plugins">
<include name="org.adempiere.install*.jar"/>
</fileset>
</delete>
</target>
</project>

View File

@ -16,57 +16,38 @@
*****************************************************************************/
package org.compiere.install;
import java.io.File;
import java.net.InetAddress;
/**
* JBoss 4.0.2 Apps Server Configuration
*
* @author Jorg Janke
* Apps Server Configuration
*
* @author hengsin
* @version $Id: ConfigJBoss.java,v 1.3 2006/07/30 00:57:42 jjanke Exp $
*/
public class ConfigJBoss extends Config
public class ConfigAppServer extends Config
{
/**
* ConfigJBoss
* @param data configuration
*/
public ConfigJBoss (ConfigurationData data)
public ConfigAppServer(ConfigurationData data)
{
super (data);
} // ConfigJBoss
/**
* Initialize
*/
public void init()
{
p_data.setAppsServerDeployDir(getDeployDir());
p_data.setAppsServerDeployDir(false);
//
p_data.setAppsServerJNPPort("1099");
p_data.setAppsServerJNPPort(true);
p_data.setAppsServerWebPort("80");
p_data.setAppsServerWebPort(true);
p_data.setAppsServerSSLPort("443");
p_data.setAppsServerSSLPort(true);
} // init
/**
* Get Deployment Dir
* @return deployment dir
*/
private String getDeployDir()
{
return p_data.getAdempiereHome()
+ File.separator + "jboss"
+ File.separator + "server"
+ File.separator + "adempiere"
+ File.separator + "deploy";
} // getDeployDir
/**
* Test
* @return error message or null if OK
@ -79,7 +60,7 @@ public class ConfigJBoss extends Config
&& server.toLowerCase().indexOf("localhost") == -1
&& !server.equals("127.0.0.1");
InetAddress appsServer = null;
String error = "Not correct: AppsServer = " + server;
String error = "Not correct: AppsServer = " + server;
try
{
if (pass)
@ -92,60 +73,33 @@ public class ConfigJBoss extends Config
}
if (getPanel() != null)
signalOK(getPanel().okAppsServer, "ErrorAppsServer",
pass, true, error);
pass, true, error);
if (!pass)
return error;
log.info("OK: AppsServer = " + appsServer);
setProperty(ConfigurationData.ADEMPIERE_APPS_SERVER, appsServer.getHostName());
setProperty(ConfigurationData.ADEMPIERE_APPS_TYPE, p_data.getAppsServerType());
// Deployment Dir
p_data.setAppsServerDeployDir(getDeployDir());
File deploy = new File (p_data.getAppsServerDeployDir());
pass = deploy.exists();
error = "Not found: " + deploy;
if (getPanel() != null)
signalOK(getPanel().okDeployDir, "ErrorDeployDir",
pass, true, error);
if (!pass)
return error;
setProperty(ConfigurationData.ADEMPIERE_APPS_DEPLOY, p_data.getAppsServerDeployDir());
log.info("OK: Deploy Directory = " + deploy);
// JNP Port
int JNPPort = p_data.getAppsServerJNPPort();
pass = !p_data.testPort (appsServer, JNPPort, false)
&& p_data.testServerPort(JNPPort);
error = "Not correct: JNP Port = " + JNPPort;
if (getPanel() != null)
signalOK(getPanel().okJNPPort, "ErrorJNPPort",
pass, true, error);
if (!pass)
return error;
log.info("OK: JNPPort = " + JNPPort);
setProperty(ConfigurationData.ADEMPIERE_JNP_PORT, String.valueOf(JNPPort));
// Web Port
int WebPort = p_data.getAppsServerWebPort();
pass = !p_data.testPort ("http", appsServer.getHostName(), WebPort, "/")
pass = !p_data.testPort ("http", appsServer.getHostName(), WebPort, "/")
&& p_data.testServerPort(WebPort);
error = "Not correct: Web Port = " + WebPort;
if (getPanel() != null)
signalOK(getPanel().okWebPort, "ErrorWebPort",
pass, true, error);
pass, true, error);
if (!pass)
return error;
log.info("OK: Web Port = " + WebPort);
setProperty(ConfigurationData.ADEMPIERE_WEB_PORT, String.valueOf(WebPort));
// SSL Port
int sslPort = p_data.getAppsServerSSLPort();
pass = !p_data.testPort ("https", appsServer.getHostName(), sslPort, "/")
pass = !p_data.testPort ("https", appsServer.getHostName(), sslPort, "/")
&& p_data.testServerPort(sslPort);
error = "Not correct: SSL Port = " + sslPort;
if (getPanel() != null)
signalOK(getPanel().okSSLPort, "ErrorWebPort",
pass, true, error);
pass, true, error);
if (!pass)
return error;
log.info("OK: SSL Port = " + sslPort);
@ -153,5 +107,5 @@ public class ConfigJBoss extends Config
//
return null;
} // test
} // ConfigJBoss

View File

@ -1,153 +0,0 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Praneet Tiwari. *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - D3 Soft (http://www.d3-soft.com) *
***********************************************************************/
package org.compiere.install;
import java.io.File;
import java.net.InetAddress;
/**
* GlassFish v2UR1 Apps Server Configuration
*
* @author Praneet Tiwari
* @author Trifon Trifonov
* @version $Id: $
*/
public class ConfigGlassfish extends Config {
/**
* ConfigGlassfish
* @param data configuration
*/
public ConfigGlassfish (ConfigurationData data)
{
super (data);
} // ConfigGlassfish
/**
* Initialize
*/
public void init()
{
p_data.setAppsServerDeployDir(getDeployDir());
p_data.setAppsServerDeployDir(false);
//
p_data.setAppsServerJNPPort("3700");
p_data.setAppsServerJNPPort(true);
p_data.setAppsServerWebPort("8080");
p_data.setAppsServerWebPort(true);
p_data.setAppsServerSSLPort("443");
p_data.setAppsServerSSLPort(true);
} // init
/**
* Get Deployment Dir
* @return deployment dir
*/
private String getDeployDir()
{
// TODO - check deployment directory
return p_data.getAdempiereHome() + File.separator + "glassfish";
/*Commented for now
+ File.separator + "glassfish"
+ File.separator + "domains"
+ File.separator + "domain1" ;
* */
} // getDeployDir
/**
* Test
* @return error message or null if OK
*/
public String test()
{
// AppsServer
String server = p_data.getAppsServer();
boolean pass = server != null && server.length() > 0
&& server.toLowerCase().indexOf("localhost") == -1
&& !server.equals("127.0.0.1");
InetAddress appsServer = null;
String error = "Not correct: AppsServer = " + server;
try
{
if (pass)
appsServer = InetAddress.getByName(server);
}
catch (Exception e)
{
error += " - " + e.getMessage();
pass = false;
}
if (getPanel() != null)
signalOK(getPanel().okAppsServer, "ErrorAppsServer",
pass, true, error);
if (!pass)
return error;
log.info("OK: AppsServer = " + appsServer);
setProperty(ConfigurationData.ADEMPIERE_APPS_SERVER, appsServer.getHostName());
setProperty(ConfigurationData.ADEMPIERE_APPS_TYPE, p_data.getAppsServerType());
setProperty(ConfigurationData.ADEMPIERE_APPS_DEPLOY, p_data.getAppsServerDeployDir());
// JNP Port
int JNPPort = p_data.getAppsServerJNPPort();
setProperty(ConfigurationData.ADEMPIERE_JNP_PORT, String.valueOf(JNPPort));
// Web Port
int WebPort = p_data.getAppsServerWebPort();
pass = !p_data.testPort ("http", appsServer.getHostName(), WebPort, "/")
&& p_data.testServerPort(WebPort);
error = "Not correct: Web Port = " + WebPort;
if (getPanel() != null)
signalOK(getPanel().okWebPort, "ErrorWebPort",
pass, true, error);
if (!pass)
return error;
log.info("OK: Web Port = " + WebPort);
setProperty(ConfigurationData.ADEMPIERE_WEB_PORT, String.valueOf(WebPort));
// SSL Port
int sslPort = p_data.getAppsServerSSLPort();
pass = !p_data.testPort ("https", appsServer.getHostName(), sslPort, "/")
&& p_data.testServerPort(sslPort);
error = "Not correct: SSL Port = " + sslPort;
if (getPanel() != null)
signalOK(getPanel().okSSLPort, "ErrorWebPort",
pass, true, error);
if (!pass)
return error;
log.info("OK: SSL Port = " + sslPort);
setProperty(ConfigurationData.ADEMPIERE_SSL_PORT, String.valueOf(sslPort));
//
return null;
} // test
} // ConfigGlassfish

View File

@ -52,7 +52,7 @@ import org.compiere.util.Ini;
/**
* Configuration Data
*
*
* @author Jorg Janke
* @version $Id: ConfigurationData.java,v 1.4 2006/07/30 00:57:42 jjanke Exp $
*/
@ -75,14 +75,14 @@ public class ConfigurationData
/** Adempiere Home */
private File m_adempiereHome;
/** Static Logger */
static CLogger log = CLogger.getCLogger (ConfigurationData.class);
/** Properties File name */
public static final String ADEMPIERE_ENV_FILE = "AdempiereEnv.properties";
/** Adempiere Home */
public static final String ADEMPIERE_HOME = "ADEMPIERE_HOME";
/** */
@ -108,7 +108,7 @@ public class ConfigurationData
public static final String ADEMPIERE_SSL_PORT = "ADEMPIERE_SSL_PORT";
/** */
public static final String ADEMPIERE_WEB_ALIAS = "ADEMPIERE_WEB_ALIAS";
/** */
public static final String ADEMPIERE_KEYSTORE = "ADEMPIERE_KEYSTORE";
/** */
@ -117,17 +117,17 @@ public class ConfigurationData
public static final String ADEMPIERE_KEYSTORECODEALIAS = "ADEMPIERE_KEYSTORECODEALIAS";
/** */
public static final String ADEMPIERE_KEYSTOREWEBALIAS = "ADEMPIERE_KEYSTOREWEBALIAS";
public static final String ADEMPIERE_CERT_CN = "ADEMPIERE_CERT_CN";
public static final String ADEMPIERE_CERT_ORG = "ADEMPIERE_CERT_ORG";
public static final String ADEMPIERE_CERT_ORG_UNIT = "ADEMPIERE_CERT_ORG_UNIT";
public static final String ADEMPIERE_CERT_LOCATION = "ADEMPIERE_CERT_LOCATION";
public static final String ADEMPIERE_CERT_STATE = "ADEMPIERE_CERT_STATE";
public static final String ADEMPIERE_CERT_COUNTRY = "ADEMPIERE_CERT_COUNTRY";
/** DB Type */
@ -173,8 +173,8 @@ public class ConfigurationData
/** */
public static final String ADEMPIERE_WEBSTORES = "ADEMPIERE_WEBSTORES";
private void updateProperty(String property, String value) {
if (value == null) value = "";
String currentValue = (String)p_properties.get(property);
@ -183,7 +183,7 @@ public class ConfigurationData
else if (!currentValue.equals(value))
p_properties.put(property, value);
}
/**
* Load Configuration Data
* @return true if loaded
@ -194,7 +194,7 @@ public class ConfigurationData
String adempiereHome = System.getProperty(ADEMPIERE_HOME);
if (adempiereHome == null || adempiereHome.length() == 0)
adempiereHome = System.getProperty("user.dir");
boolean envLoaded = false;
String fileName = adempiereHome + File.separator + ADEMPIERE_ENV_FILE;
File env = new File (fileName);
@ -213,7 +213,7 @@ public class ConfigurationData
log.info(env.toString());
if (p_properties.size() > 5)
envLoaded = true;
Properties loaded = new Properties();
loaded.putAll(p_properties);
//
@ -231,14 +231,8 @@ public class ConfigurationData
}
setKeyStore(s);
//
int appServerIndex = setAppsServerType((String)p_properties.get(ADEMPIERE_APPS_TYPE));
initAppsServer(appServerIndex);
if (loaded.containsKey(ADEMPIERE_APPS_SERVER))
setAppsServer((String)loaded.get(ADEMPIERE_APPS_SERVER));
if (loaded.containsKey(ADEMPIERE_APPS_DEPLOY))
setAppsServerDeployDir((String)loaded.get(ADEMPIERE_APPS_DEPLOY));
if (loaded.containsKey(ADEMPIERE_JNP_PORT))
setAppsServerJNPPort((String)loaded.get(ADEMPIERE_JNP_PORT));
if (loaded.containsKey(ADEMPIERE_WEB_PORT))
setAppsServerWebPort((String)loaded.get(ADEMPIERE_WEB_PORT));
if (loaded.containsKey(ADEMPIERE_SSL_PORT))
@ -281,7 +275,7 @@ public class ConfigurationData
{
log.severe("Cannot get local host name");
}
// No environment file found - defaults
// envLoaded = false;
if (!envLoaded)
@ -329,9 +323,9 @@ public class ConfigurationData
// Web Alias
if (!p_properties.containsKey(ADEMPIERE_WEB_ALIAS) && localhost != null)
p_properties.setProperty(ADEMPIERE_WEB_ALIAS, localhost.getCanonicalHostName());
// (String)p_properties.get(ADEMPIERE_DB_URL) // derived
// Keystore Alias
if (!p_properties.containsKey(ADEMPIERE_KEYSTORECODEALIAS))
p_properties.setProperty(ADEMPIERE_KEYSTORECODEALIAS, "adempiere");
@ -340,8 +334,8 @@ public class ConfigurationData
return true;
} // load
public String resolveDatabaseName(String connectionName) {
int index = p_panel.fDatabaseType.getSelectedIndex();
if (index < 0 || index >= DBTYPE.length)
@ -365,7 +359,7 @@ public class ConfigurationData
log.severe(error);
return false;
}
error = testAdempiere();
if (error != null)
{
@ -381,7 +375,7 @@ public class ConfigurationData
log.warning(error);
return false;
}
if (p_panel != null)
p_panel.setStatusBar(p_panel.lDatabaseServer.getText());
error = testDatabase();
@ -399,10 +393,10 @@ public class ConfigurationData
log.warning(error);
return false;
}
return true;
} // test
/**
* Test Adempiere and set AdempiereHome
@ -415,27 +409,27 @@ public class ConfigurationData
boolean pass =m_adempiereHome.exists();
String error = "Not found: AdempiereHome = " + m_adempiereHome;
if (p_panel != null)
p_panel.signalOK(p_panel.okAdempiereHome, "ErrorAdempiereHome",
p_panel.signalOK(p_panel.okAdempiereHome, "ErrorAdempiereHome",
pass, true, error);
if (!pass)
return error;
log.info("OK: AdempiereHome = " + m_adempiereHome);
p_properties.setProperty(ADEMPIERE_HOME, m_adempiereHome.getAbsolutePath());
System.setProperty(ADEMPIERE_HOME, m_adempiereHome.getAbsolutePath());
// KeyStore
String fileName = KeyStoreMgt.getKeystoreFileName(m_adempiereHome.getAbsolutePath());
p_properties.setProperty(ADEMPIERE_KEYSTORE, fileName);
// KeyStore Password
String pw = p_panel != null
String pw = p_panel != null
? new String(p_panel.fKeyStore.getPassword())
: (String)p_properties.get(ADEMPIERE_KEYSTOREPASS);
pass = pw != null && pw.length() > 0;
error = "Invalid Key Store Password = " + pw;
if (p_panel != null)
p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword",
pass, true, error);
p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword",
pass, true, error);
if (!pass)
return error;
p_properties.setProperty(ADEMPIERE_KEYSTOREPASS, pw);
@ -448,20 +442,20 @@ public class ConfigurationData
ks.setLocation((String)p_properties.getProperty(ADEMPIERE_CERT_LOCATION));
ks.setState((String)p_properties.getProperty(ADEMPIERE_CERT_STATE));
ks.setCountry((String)p_properties.getProperty(ADEMPIERE_CERT_COUNTRY));
error = p_panel != null
error = p_panel != null
? ks.verify((JFrame)SwingUtilities.getWindowAncestor(p_panel))
: ks.verify(null);
pass = error == null;
if (p_panel != null)
p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword",
p_panel.signalOK(p_panel.okKeyStore, "KeyStorePassword",
pass, true, error);
if (!pass)
return error;
log.info("OK: KeyStore = " + fileName);
return null;
} // testAdempiere
/**************************************************************************
* Test (optional) Mail
* @return error message or null, if OK
@ -473,7 +467,7 @@ public class ConfigurationData
? p_panel.fMailServer.getText()
: (String)p_properties.get(ADEMPIERE_MAIL_SERVER);
boolean pass = server != null && server.length() > 0
&& server.toLowerCase().indexOf("localhost") == -1
&& server.toLowerCase().indexOf("localhost") == -1
&& !server.equals("127.0.0.1");
String error = "Error Mail Server = " + server;
InetAddress mailServer = null;
@ -498,7 +492,7 @@ public class ConfigurationData
p_properties.setProperty(ADEMPIERE_MAIL_SERVER, mailServer.getHostName());
// Mail User
String mailUser = p_panel != null
String mailUser = p_panel != null
? p_panel.fMailUser.getText()
: (String)p_properties.get(ADEMPIERE_MAIL_USER);
String mailPassword = p_panel != null
@ -508,7 +502,7 @@ public class ConfigurationData
// log.config("Mail User = " + mailUser + "/" + mailPassword);
// Mail Address
String adminEMailString = p_panel != null
String adminEMailString = p_panel != null
? p_panel.fAdminEMail.getText()
: (String)p_properties.get(ADEMPIERE_ADMIN_EMAIL);
InternetAddress adminEMail = null;
@ -528,7 +522,7 @@ public class ConfigurationData
pass = testMailServer(mailServer, adminEMail, mailUser, mailPassword);
}
if (p_panel != null)
p_panel.signalOK(p_panel.okMailUser, "ErrorMail",
p_panel.signalOK(p_panel.okMailUser, "ErrorMail",
pass, false, error);
if (pass)
{
@ -548,7 +542,7 @@ public class ConfigurationData
}
return null;
} // testMail
/**
* Test Mail
* @param mailServer mail server
@ -598,7 +592,7 @@ public class ConfigurationData
EMail email = new EMail (new Properties(),
mailServer.getHostName (),
adminEMail.toString (), adminEMail.toString(),
"Adempiere Server Setup Test",
"Adempiere Server Setup Test",
"Test: " + getProperties());
email.createAuthenticator (mailUser, mailPassword);
if (EMail.SENT_OK.equals (email.send ()))
@ -673,8 +667,8 @@ public class ConfigurationData
}
return true;
} // testMailServer
/**************************************************************************
* Test Apps Server Port (client perspective)
* @param protocol protocol (http, ..)
@ -693,7 +687,7 @@ public class ConfigurationData
}
catch (MalformedURLException ex)
{
log.severe("No URL for Protocol=" + protocol
log.severe("No URL for Protocol=" + protocol
+ ", Server=" + server
+ ": " + ex.getMessage());
return false;
@ -763,7 +757,7 @@ public class ConfigurationData
}
if (!shouldBeUsed)
log.warning("Open Socket " + host + ":" + port + " - " + pingSocket);
log.fine(host + ":" + port + " - " + pingSocket);
if (pingSocket == null)
return false;
@ -779,7 +773,7 @@ public class ConfigurationData
return true;
} // testPort
/**************************************************************************
* Save Settings
* @return true if saved
@ -792,7 +786,7 @@ public class ConfigurationData
p_properties.setProperty("ADEMPIERE_DB_VERSION", Adempiere.DB_VERSION);
log.finest(p_properties.toString());
// Before we save, load Ini
Ini.setClient(false);
String fileName = m_adempiereHome.getAbsolutePath() + File.separator + Ini.ADEMPIERE_PROPERTY_FILE;
@ -811,8 +805,8 @@ public class ConfigurationData
{
log.severe("Cannot save Properties to " + fileName + " - " + e.toString());
if (p_panel != null)
JOptionPane.showConfirmDialog(p_panel,
ConfigurationPanel.res.getString("ErrorSave"),
JOptionPane.showConfirmDialog(p_panel,
ConfigurationPanel.res.getString("ErrorSave"),
ConfigurationPanel.res.getString("AdempiereServerSetup"),
JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
else
@ -823,8 +817,8 @@ public class ConfigurationData
{
log.severe("Cannot save Properties to " + fileName + " - " + t.toString());
if (p_panel != null)
JOptionPane.showConfirmDialog(p_panel,
ConfigurationPanel.res.getString("ErrorSave"),
JOptionPane.showConfirmDialog(p_panel,
ConfigurationPanel.res.getString("ErrorSave"),
ConfigurationPanel.res.getString("AdempiereServerSetup"),
JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
else
@ -834,10 +828,10 @@ public class ConfigurationData
log.info(fileName);
return saveIni();
} // save
/**
* Synchronize and save Connection Info in Ini
* @return true
* @return true
*/
private boolean saveIni()
{
@ -854,7 +848,6 @@ public class ConfigurationData
getDatabaseServer(), getDatabasePort(), getDatabaseName(),
getDatabaseUser(), getDatabasePassword());
cc.setAppsHost(getAppsServer());
cc.setAppsPort(getAppsServerJNPPort());
cc.setConnectionProfile(CConnection.PROFILE_LAN);
}
catch(Exception e)
@ -871,8 +864,8 @@ public class ConfigurationData
Ini.saveProperties(false);
return true;
} // saveIni
/**
* Get Properties
* @return properties
@ -881,14 +874,14 @@ public class ConfigurationData
{
return p_properties;
} // getProperties
/**
* Get Adempiere Home
* @return adempiere home
*/
public String getAdempiereHome()
{
return p_panel != null
return p_panel != null
? p_panel.fAdempiereHome.getText()
: (String)p_properties.get(ADEMPIERE_HOME);
} // getAdempiereHome
@ -904,7 +897,7 @@ public class ConfigurationData
else
updateProperty(ADEMPIERE_HOME, adempiereHome);
} // setAdempiereHome
/**
* Get Key Store
* @return password
@ -928,8 +921,8 @@ public class ConfigurationData
else
updateProperty(ADEMPIERE_KEYSTOREPASS, password);
} // setKeyStore
/**************************************************************************
* Java Settings
*************************************************************************/
@ -945,10 +938,11 @@ public class ConfigurationData
/** Java VM Types */
static String[] JAVATYPE = new String[]
{JAVATYPE_SUN, JAVATYPE_OPENJDK, JAVATYPE_MAC, JAVATYPE_IBM};
/** Virtual machine Configurations */
private Config[] m_javaConfig = new Config[]
{new ConfigVMSun(this), new ConfigVMOpenJDK(this), new ConfigVMMac(this), null};
private ConfigAppServer m_appsConfig = new ConfigAppServer(this);
/**
* Init Database
@ -958,7 +952,7 @@ public class ConfigurationData
int index = (p_panel != null ? p_panel.fJavaType.getSelectedIndex() : 0);
initJava(index);
} // initDatabase
private void initJava(int index)
{
if (index < 0 || index >= JAVATYPE.length)
@ -972,14 +966,14 @@ public class ConfigurationData
else
m_javaConfig[index].init();
}
/**
* Test Java
* @return error message or null of OK
*/
public String testJava()
{
int index = p_panel != null
int index = p_panel != null
? p_panel.fJavaType.getSelectedIndex()
: setJavaType((String)p_properties.get(JAVA_TYPE));
if (index < 0 || index >= JAVATYPE.length)
@ -988,7 +982,7 @@ public class ConfigurationData
return "JavaType Config class missing: " + index;
return m_javaConfig[index].test();
} // testJava
/**
* Set Java Type
* @param javaType The javaType to set.
@ -1013,7 +1007,7 @@ public class ConfigurationData
p_panel.fJavaType.setSelectedIndex(index);
else
updateProperty(JAVA_TYPE, javaType);
return index;
} // setJavaType
@ -1048,110 +1042,30 @@ public class ConfigurationData
else
updateProperty(JAVA_HOME, javaHome);
}
/**************************************************************************
* Apps Server Settings
*************************************************************************/
/** JBoss (default) */
protected static String APPSTYPE_JBOSS = "jboss";
/** GlassFish */
protected static String APPSTYPE_GLASSFISH = "glassfish";
/** Application Server Type */
static String[] APPSTYPE = new String[]
{ APPSTYPE_JBOSS
, APPSTYPE_GLASSFISH
};
/** Database Configs */
private Config[] m_appsConfig = new Config[]
{ new ConfigJBoss(this)
, new ConfigGlassfish( this )
};
/**
* Init Apps Server
*/
public void initAppsServer()
{
int index = (p_panel != null ? p_panel.fAppsType.getSelectedIndex() : 0);
initAppsServer(index);
m_appsConfig.init();
} // initAppsServer
private void initAppsServer(int index)
{
if (index < 0 || index >= APPSTYPE.length)
log.warning("AppsServerType Index invalid: " + index);
else if (m_appsConfig[index] == null)
{
log.warning("AppsServerType Config missing: " + APPSTYPE[index]);
p_panel.fAppsType.setSelectedIndex(0);
}
else
m_appsConfig[index].init();
}
/**
* Test Apps Server
* @return error message or null of OK
*/
public String testAppsServer()
{
int index = p_panel != null
? p_panel.fAppsType.getSelectedIndex()
: setAppsServerType((String)p_properties.get(ADEMPIERE_APPS_TYPE));
if (index < 0 || index >= APPSTYPE.length)
return "AppsServerType Index invalid: " + index;
else if (m_appsConfig[index] == null)
return "AppsServerType Config class missing: " + index;
return m_appsConfig[index].test();
return m_appsConfig.test();
} // testAppsServer
/**
* Set Apps Server Type
* @param appsType The appsType to set.
*/
public int setAppsServerType (String appsType)
{
int index = -1;
for (int i = 0; i < APPSTYPE.length; i++)
{
if (APPSTYPE[i].equals(appsType))
{
index = i;
break;
}
}
if (index == -1)
{
index = 0;
log.warning("Invalid AppsType=" + appsType);
}
if (p_panel != null)
p_panel.fAppsType.setSelectedIndex(index);
else
updateProperty(ADEMPIERE_APPS_TYPE, appsType);
return index;
} // setAppsServerType
/**
* Get Apps Server Type
* @return Apps Server Type
*/
public String getAppsServerType ()
{
return p_panel != null
? (String)p_panel.fAppsType.getSelectedItem()
: (String)p_properties.get(ADEMPIERE_APPS_TYPE);
} // setDatabaseType
/**
* @return Returns the appsServer.
*/
public String getAppsServer ()
{
return p_panel != null
return p_panel != null
? p_panel.fAppsServer.getText()
: (String)p_properties.get(ADEMPIERE_APPS_SERVER);
}
@ -1165,74 +1079,7 @@ public class ConfigurationData
else
updateProperty(ADEMPIERE_APPS_SERVER, appsServer);
}
/**
* @return Returns the appsServerDeployDir.
*/
public String getAppsServerDeployDir ()
{
return p_panel != null
? p_panel.fDeployDir.getText()
: (String)p_properties.get(ADEMPIERE_APPS_DEPLOY);
}
/**
* @param appsServerDeployDir The appsServerDeployDir to set.
*/
public void setAppsServerDeployDir (String appsServerDeployDir)
{
if (p_panel != null)
p_panel.fDeployDir.setText(appsServerDeployDir);
else
updateProperty(ADEMPIERE_APPS_DEPLOY, appsServerDeployDir);
}
/**
* @param enable if true enable entry
*/
public void setAppsServerDeployDir (boolean enable)
{
if (p_panel != null)
{
p_panel.fDeployDir.setEnabled(enable);
p_panel.bDeployDir.setEnabled(enable);
}
}
/**
* @return Returns the appsServerJNPPort.
*/
public int getAppsServerJNPPort ()
{
String port = p_panel != null
? p_panel.fJNPPort.getText()
: (String)p_properties.get(ADEMPIERE_JNP_PORT);
try
{
return Integer.parseInt(port);
}
catch (Exception e)
{
setAppsServerJNPPort("0");
}
return 0;
}
/**
* @param appsServerJNPPort The appsServerJNPPort to set.
*/
public void setAppsServerJNPPort (String appsServerJNPPort)
{
if (p_panel != null)
p_panel.fJNPPort.setText(appsServerJNPPort);
else
updateProperty(ADEMPIERE_JNP_PORT, appsServerJNPPort);
}
/**
* @param enable if enable JNP entry
*/
public void setAppsServerJNPPort (boolean enable)
{
if (p_panel != null)
p_panel.fJNPPort.setEnabled(enable);
}
/**
* @return Returns the appsServerSSLPort.
*/
@ -1305,36 +1152,36 @@ public class ConfigurationData
if (p_panel != null)
p_panel.fWebPort.setEnabled(enable);
}
/**************************************************************************
* Database Settings
*************************************************************************/
/** Oracle directory */
private static String DBTYPE_ORACLE = "oracle";
/** Oracle XP */
private static String DBTYPE_ORACLEXE = "oracleXE";
/** PostgreSQL */
private static String DBTYPE_POSTGRESQL = "postgresql";
/** Database Types */
static String[] DBTYPE = new String[]
{ DBTYPE_ORACLEXE,
DBTYPE_ORACLE,
DBTYPE_ORACLE,
//begin e-evolution vpj-cd 02/07/2005 PostgreSQL
DBTYPE_POSTGRESQL
DBTYPE_POSTGRESQL
};
//end e-evolution vpj-cd 02/07/2005 PostgreSQL
/** Database Configs */
private Config[] m_databaseConfig = new Config[]
{
new ConfigOracle(this,true),
new ConfigOracle(this,false),
new ConfigOracle(this,true),
new ConfigOracle(this,false),
//begin e-evolution vpj-cd 02/07/2005 PostgreSQL
new ConfigPostgreSQL(this)
new ConfigPostgreSQL(this)
// end e-evolution vpj-cd 02/07/2005 PostgreSQL
};
@ -1347,7 +1194,7 @@ public class ConfigurationData
int index = (p_panel != null ? p_panel.fDatabaseType.getSelectedIndex() : 0);
initDatabase(selected, index);
} // initDatabase
private void initDatabase(String selected, int index)
{
if (index < 0 || index >= DBTYPE.length)
@ -1361,26 +1208,26 @@ public class ConfigurationData
else
{
m_databaseConfig[index].init();
if (p_panel != null)
if (p_panel != null)
{
String[] databases = m_databaseConfig[index].discoverDatabases(selected);
DefaultComboBoxModel model = new DefaultComboBoxModel(databases);
p_panel.fDatabaseDiscovered.setModel(model);
p_panel.fDatabaseDiscovered.setModel(model);
p_panel.fDatabaseDiscovered.setEnabled(databases.length != 0);
if (databases.length > 0)
p_panel.fDatabaseName.setText(databases[0]);
}
}
}
/**
* Test Database
* @return error message or null of OK
*/
public String testDatabase()
{
int index = p_panel != null
int index = p_panel != null
? p_panel.fDatabaseType.getSelectedIndex()
: setDatabaseType((String)p_properties.get(ADEMPIERE_DB_TYPE));
if (index < 0 || index >= DBTYPE.length)
@ -1389,8 +1236,8 @@ public class ConfigurationData
return "DatabaseType Config class missing: " + index;
return m_databaseConfig[index].test();
} // testDatabase
/**
* Set Database Type
* @param databaseType The databaseType to set.
@ -1415,10 +1262,10 @@ public class ConfigurationData
p_panel.fDatabaseType.setSelectedIndex(index);
else
updateProperty(ADEMPIERE_DB_TYPE, databaseType);
return index;
} // setDatabaseType
/**
* @return Returns the databaseType.
*/
@ -1443,7 +1290,7 @@ public class ConfigurationData
if (p_panel != null)
p_panel.fDatabaseDiscovered.setSelectedItem(databaseDiscovered);
}
/**
* @return Returns the databaseName.
*/
@ -1463,7 +1310,7 @@ public class ConfigurationData
else
updateProperty(ADEMPIERE_DB_NAME, databaseName);
}
/**
* @return Returns the database User Password.
*/
@ -1594,5 +1441,5 @@ public class ConfigurationData
else
updateProperty(ADEMPIERE_DB_USER, databaseUser);
}
} // ConfigurationData

View File

@ -38,7 +38,6 @@ import javax.swing.border.TitledBorder;
import org.adempiere.base.Core;
import org.apache.tools.ant.Main;
import org.compiere.Adempiere;
import org.compiere.swing.CButton;
import org.compiere.swing.CCheckBox;
import org.compiere.swing.CComboBox;
@ -48,9 +47,6 @@ import org.compiere.swing.CPassword;
import org.compiere.swing.CTextField;
import org.compiere.util.CLogger;
import com.sfcommerce.jpaymentcomponent.ssl.Client;
/**
* Configuration Panel
*
@ -60,7 +56,7 @@ import com.sfcommerce.jpaymentcomponent.ssl.Client;
public class ConfigurationPanel extends CPanel implements ActionListener
{
/**
*
*
*/
private static final long serialVersionUID = -5113669370606054608L;
@ -93,8 +89,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener
/** Translation */
static ResourceBundle res = ResourceBundle.getBundle("org.compiere.install.SetupRes");
/** Setup Frame */
private Setup m_setup = null;
/** Status Bar */
private JLabel m_statusBar;
/** Configuration Data */
@ -123,20 +117,10 @@ public class ConfigurationPanel extends CPanel implements ActionListener
private CLabel lKeyStore = new CLabel();
CPassword fKeyStore = new CPassword();
CCheckBox okKeyStore = new CCheckBox();
// Apps Server - Type
// Apps Server - Type
CLabel lAppsServer = new CLabel();
CTextField fAppsServer = new CTextField(FIELDLENGTH);
CCheckBox okAppsServer = new CCheckBox();
private CLabel lAppsType = new CLabel();
CComboBox fAppsType = new CComboBox(ConfigurationData.APPSTYPE);
// Deployment Directory - JNP
private CLabel lDeployDir = new CLabel();
CTextField fDeployDir = new CTextField(FIELDLENGTH);
CCheckBox okDeployDir = new CCheckBox();
CButton bDeployDir = new CButton(iOpen);
private CLabel lJNPPort = new CLabel();
CTextField fJNPPort = new CTextField(FIELDLENGTH);
CCheckBox okJNPPort = new CCheckBox();
// Web Ports
private CLabel lWebPort = new CLabel();
CTextField fWebPort = new CTextField(FIELDLENGTH);
@ -181,7 +165,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
private CButton bHelp = new CButton(iHelp);
private CButton bTest = new CButton();
private CButton bSave = new CButton(iSave);
/**
* Static Layout Init
@ -192,7 +176,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
this.setLayout(gridBagLayout);
Insets bInsets = new Insets(0, 5, 0, 5);
TitledBorder titledBorder = new TitledBorder("dummy");
// Java
lJavaHome.setToolTipText(res.getString("JavaHomeInfo"));
lJavaHome.setText(res.getString("JavaHome"));
@ -203,7 +187,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
lJavaType.setToolTipText(res.getString("JavaTypeInfo"));
lJavaType.setText(res.getString("JavaType"));
fJavaType.setPreferredSize(fJavaHome.getPreferredSize());
JLabel sectionLabel = new JLabel("Java");
sectionLabel.setForeground(titledBorder.getTitleColor());
JSeparator separator = new JSeparator();
@ -211,7 +195,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 0, 10), 0, 0));
this.add(separator, new GridBagConstraints(0, 1, 7, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 10), 0, 0));
this.add(lJavaHome, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fJavaHome, new GridBagConstraints(1, 2, 1, 1, 0.5, 0.0
@ -235,7 +219,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
lKeyStore.setToolTipText(res.getString("KeyStorePasswordInfo"));
fKeyStore.setText("");
okKeyStore.setEnabled(false);
sectionLabel = new JLabel("Adempiere");
sectionLabel.setForeground(titledBorder.getTitleColor());
separator = new JSeparator();
@ -263,9 +247,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener
lAppsServer.setFont(lAppsServer.getFont().deriveFont(Font.BOLD));
fAppsServer.setText(".");
okAppsServer.setEnabled(false);
lAppsType.setToolTipText(res.getString("AppsTypeInfo"));
lAppsType.setText(res.getString("AppsType"));
fAppsType.setPreferredSize(fAppsServer.getPreferredSize());
sectionLabel = new JLabel(res.getString("AppsServer"));
sectionLabel.setForeground(titledBorder.getTitleColor());
separator = new JSeparator();
@ -279,35 +260,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0));
this.add(okAppsServer, new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0));
this.add(lAppsType, new GridBagConstraints(4, 8, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fAppsType, new GridBagConstraints(5, 8, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 2, 0), 0, 0));
// Deployment - JNP
lDeployDir.setToolTipText(res.getString("DeployDirInfo"));
lDeployDir.setText(res.getString("DeployDir"));
fDeployDir.setText(".");
okDeployDir.setEnabled(false);
bDeployDir.setMargin(bInsets);
bDeployDir.setToolTipText(res.getString("DeployDirInfo"));
lJNPPort.setToolTipText(res.getString("JNPPortInfo"));
lJNPPort.setText(res.getString("JNPPort"));
fJNPPort.setText(".");
okJNPPort.setEnabled(false);
this.add(lDeployDir, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fDeployDir, new GridBagConstraints(1, 9, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(okDeployDir, new GridBagConstraints(2, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
this.add(bDeployDir, new GridBagConstraints(3, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.add(lJNPPort, new GridBagConstraints(4, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fJNPPort, new GridBagConstraints(5, 9, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(okJNPPort, new GridBagConstraints(6, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
// Web Ports
lWebPort.setToolTipText(res.getString("WebPortInfo"));
lWebPort.setText(res.getString("WebPort"));
@ -357,7 +309,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
lDatabaseName.setToolTipText(res.getString("DatabaseNameInfo"));
lDatabaseName.setText(res.getString("DatabaseName"));
fDatabaseName.setText(".");
//TNS/Native connection
lDatabaseDiscovered.setToolTipText(res.getString("TNSNameInfo"));
lDatabaseDiscovered.setText(res.getString("TNSName"));
@ -438,7 +390,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fAdminEMail, new GridBagConstraints(5, 19, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0));
// Mail User = Password
lMailUser.setToolTipText(res.getString("MailUserInfo"));
lMailUser.setText(res.getString("MailUser"));
@ -464,7 +416,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
filler.setBorder(null);
this.add(filler, new GridBagConstraints(0, 21, 1, 1, 0.0, 1.0
,GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
// End
bTest.setToolTipText(res.getString("TestInfo"));
bTest.setText(res.getString("Test"));
@ -480,9 +432,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
//
bAdempiereHome.addActionListener(this);
bJavaHome.addActionListener(this);
bDeployDir.addActionListener(this);
fJavaType.addActionListener(this);
fAppsType.addActionListener(this);
fDatabaseType.addActionListener(this);
fDatabaseDiscovered.addActionListener(this);
bHelp.addActionListener(this);
@ -508,8 +458,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener
{
m_statusBar.setText(text);
} // setStatusBar
/**************************************************************************
* ActionListener
* @param e event
@ -528,8 +478,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener
//
else if (e.getSource() == fJavaType)
m_data.initJava();
else if (e.getSource() == fAppsType)
m_data.initAppsServer();
else if (e.getSource() == fDatabaseType)
m_data.initDatabase("");
//
@ -537,8 +485,6 @@ public class ConfigurationPanel extends CPanel implements ActionListener
setPath (fJavaHome);
else if (e.getSource() == bAdempiereHome)
setPath (fAdempiereHome);
else if (e.getSource() == bDeployDir)
setPath (fDeployDir);
else if (e.getSource() == bHelp)
new Setup_Help((Frame)SwingUtilities.getWindowAncestor(this));
else if (e.getSource() == bTest)
@ -547,8 +493,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener
startTest(true);
} // actionPerformed
/**
* Set Path in Field
* @param field field to set Path
@ -564,7 +510,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
field.setText(fc.getSelectedFile().getAbsolutePath());
} // setPath
/**************************************************************************
* Start Test Async.
* @param saveIt save
@ -605,8 +551,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener
if (m_errorString != null)
{
CLogger.get().severe(m_errorString);
JOptionPane.showConfirmDialog (m_statusBar.getParent(),
m_errorString,
JOptionPane.showConfirmDialog (m_statusBar.getParent(),
m_errorString,
res.getString("ServerError"),
JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
}
@ -641,7 +587,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
* @param critical true if critical
* @param errorMsg error Message
*/
void signalOK (CCheckBox cb, String resString,
void signalOK (CCheckBox cb, String resString,
boolean pass, boolean critical, String errorMsg)
{
m_errorString = res.getString(resString);
@ -672,10 +618,10 @@ public class ConfigurationPanel extends CPanel implements ActionListener
bSave.setEnabled(false);
bTest.setEnabled(false);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
if (!m_data.save())
return;
// Final Info
JOptionPane.showConfirmDialog(this, res.getString("EnvironmentSaved"),
res.getString("AdempiereServerSetup"),
@ -695,7 +641,7 @@ public class ConfigurationPanel extends CPanel implements ActionListener
{
CLogger.get().log(Level.SEVERE, "ant", e);
}
// To be sure
((Frame)SwingUtilities.getWindowAncestor(this)).dispose();
System.exit(0); // remains active when License Dialog called