Skip to main content
summaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorrescobar2010-12-01 15:17:11 +0000
committerRyan D. Brooks2010-12-01 15:17:11 +0000
commit6f1bfb7e82a4c9f8c240f7f20d5132678c56b9e3 (patch)
treef3e860907a164db9d2abf635798b4e7639af78a7 /releng
parent5c7e9e093d7576215090118787e8ddb826aa7c4e (diff)
downloadorg.eclipse.osee-6f1bfb7e82a4c9f8c240f7f20d5132678c56b9e3.tar.gz
org.eclipse.osee-6f1bfb7e82a4c9f8c240f7f20d5132678c56b9e3.tar.xz
org.eclipse.osee-6f1bfb7e82a4c9f8c240f7f20d5132678c56b9e3.zip
refinement: Add pre-populated h2 demo db with Osee App Server
Diffstat (limited to 'releng')
-rw-r--r--releng/org.eclipse.osee.server.releng/demo/binary_data.zipbin0 -> 289252 bytes
-rw-r--r--releng/org.eclipse.osee.server.releng/demo/h2.zipbin0 -> 783890 bytes
-rw-r--r--releng/org.eclipse.osee.server.releng/demo/osee.demo.db.connection.xml24
-rw-r--r--releng/org.eclipse.osee.server.releng/scripts/createServerRuntime.xml329
4 files changed, 202 insertions, 151 deletions
diff --git a/releng/org.eclipse.osee.server.releng/demo/binary_data.zip b/releng/org.eclipse.osee.server.releng/demo/binary_data.zip
new file mode 100644
index 0000000000..b3c744cdae
--- /dev/null
+++ b/releng/org.eclipse.osee.server.releng/demo/binary_data.zip
Binary files differ
diff --git a/releng/org.eclipse.osee.server.releng/demo/h2.zip b/releng/org.eclipse.osee.server.releng/demo/h2.zip
new file mode 100644
index 0000000000..99dcc4026e
--- /dev/null
+++ b/releng/org.eclipse.osee.server.releng/demo/h2.zip
Binary files differ
diff --git a/releng/org.eclipse.osee.server.releng/demo/osee.demo.db.connection.xml b/releng/org.eclipse.osee.server.releng/demo/osee.demo.db.connection.xml
new file mode 100644
index 0000000000..2445fdfc33
--- /dev/null
+++ b/releng/org.eclipse.osee.server.releng/demo/osee.demo.db.connection.xml
@@ -0,0 +1,24 @@
+<DbConnection>
+
+ <DatabaseInfo id="h2.db.info">
+ <DatabaseHome key="#DBHOME#" value="demo/h2/" />
+ <DatabaseName key="#DBNAME#" value="osee.h2.db" />
+ <DatabaseType key="#TYPE#" value="h2" />
+ <Prefix key="#PREFIX#" value="jdbc:h2:tcp" />
+ <UserName key="#USERNAME#" value="osee" />
+ <Password key="#PASSWORD#" value="oseeadmin" />
+ <Host key="#HOST#" value="@AvailableDbServices.hostAddress" />
+ <Port key="#PORT#" value="@AvailableDbServices.port" />
+ </DatabaseInfo>
+
+ <ConnectionDescription id="h2.db.connection">
+ <Driver>org.h2.Driver</Driver>
+ <Url>#PREFIX#://#HOST#:#PORT#/#DBHOME##DBNAME#;IGNORECASE=TRUE;SCHEMA_SEARCH_PATH=OSEE,PUBLIC</Url>
+ </ConnectionDescription>
+
+ <AvailableDbServices>
+ <Server id="osee.demo.h2" dbInfo="h2.db.info" hostAddress="127.0.0.1"
+ port="8088" connectsWith="h2.db.connection" />
+ </AvailableDbServices>
+
+</DbConnection>
diff --git a/releng/org.eclipse.osee.server.releng/scripts/createServerRuntime.xml b/releng/org.eclipse.osee.server.releng/scripts/createServerRuntime.xml
index 242de0a9bd..70b0c1632d 100644
--- a/releng/org.eclipse.osee.server.releng/scripts/createServerRuntime.xml
+++ b/releng/org.eclipse.osee.server.releng/scripts/createServerRuntime.xml
@@ -1,151 +1,178 @@
-<project name="Generates OSEE Application Server Runtime Bundle" default="run">
-
- <target name="setup">
- <propertyregex property="updateSiteFile" input="${masterZip}" defaultvalue="${masterZip}" regexp="-Master-" replace="-Update-" casesensitive="false" override="true" />
- <property name="tempAppServerFolder" value="${buildDirectory}/${buildLabel}/${updateSiteFile}_tmp" />
- <mkdir dir="${tempAppServerFolder}" />
-
- <unzip src="${buildDirectory}/${buildLabel}/${updateSiteFile}" dest="${tempAppServerFolder}">
- <patternset includes="plugins/*" excludes="features/*,*.jar,*.xml,**/*source_*" />
- </unzip>
-
- <property name="configFolder" value="${tempAppServerFolder}/configuration" />
- <property name="pluginsFolder" value="${tempAppServerFolder}/plugins" />
-
- <mkdir dir="${configFolder}" />
-
- <pathconvert property="launcherBundlePath" setonempty="false">
- <path>
- <fileset dir="${pluginsFolder}">
- <include name="org.eclipse.equinox.launcher_*.jar" />
- </fileset>
- </path>
- </pathconvert>
- <propertyregex property="launcherJar" override="true" input="${launcherBundlePath}" regexp="[^/]+$" select="\0" casesensitive="false" />
- </target>
-
- <target name="generateConfig">
- <generateConfigIni configPath="${configFolder}" pluginsPath="${pluginsFolder}" />
- </target>
-
- <target name="pack">
- <propertyregex property="serverRuntimeFile" input="${masterZip}" defaultvalue="server-runtime.zip" regexp="-Master-" replace="-osgi-runtime-" casesensitive="false" override="true" />
- <zip destfile="${buildDirectory}/../${serverRuntimeFile}">
- <fileset dir="${tempAppServerFolder}" />
- </zip>
- </target>
-
- <target name="cleanup">
- <delete dir="${tempAppServerFolder}" quiet="true" />
- </target>
-
- <!-- *************************************************************** -->
- <!-- LAUNCH CONFIGS -->
- <!-- *************************************************************** -->
- <target name="generateTemplate">
- <createLaunch
- filepath="${tempAppServerFolder}/runExample.sh"
- connection.id="[id from connection file]"
- serverport="8089"
- isexecutable="false"
- launcher="${launcherJar}"
- extraVMArgs="-Dosee.connection.info.uri=[custom connection file path] -Dosee.application.server.data=[binary data path]" />
- </target>
-
- <target name="generateH2Launch">
- <createLaunch
- filepath="${tempAppServerFolder}/runH2.sh"
- connection.id="h2"
- serverport="8089"
- launcher="${launcherJar}"
- extraVMArgs="-Dosee.db.embedded.server=0.0.0.0:8088" />
- </target>
-
- <target name="generateLocalPostgresLaunch">
- <createLaunch
- filepath="${tempAppServerFolder}/runPostgresqlLocal.sh"
- connection.id="postgresqlLocalhost"
- serverport="8089"
- launcher="${launcherJar}" />
- </target>
-
- <target name="generateLaunchScripts" depends="generateTemplate,generateH2Launch,generateLocalPostgresLaunch">
- </target>
-
- <!-- *************************************************************** -->
- <!-- MAIN -->
- <!-- *************************************************************** -->
- <target name="run" depends="setup,generateConfig,generateLaunchScripts,pack,cleanup">
- </target>
-
- <!-- *************************************************************** -->
- <!-- GENERATE CONFIG.INI -->
- <!-- *************************************************************** -->
- <macrodef name="generateConfigIni">
- <attribute name="configPath" />
- <attribute name="pluginsPath" />
- <sequential>
- <echo file="@{configPath}/config.ini" append="false" message="osgi.bundles= \${line.separator}\${line.separator}" />
-
- <pathconvert property="serverBundles" setonempty="false" pathsep=";">
- <path>
- <fileset dir="@{pluginsPath}">
- <exclude name="org.eclipse.osgi_*.jar" />
- <exclude name="org.eclipse.equinox.launcher_*.jar" />
- <exclude name="*source_*.jar" />
- </fileset>
- </path>
- </pathconvert>
-
- <var name="isFirst" value="false" />
- <for param="bundle" delimiter=";" list="${serverBundles}" trim="true">
- <sequential>
- <propertyregex property="projectAndVersion" override="true" input="@{bundle}" regexp="[^${file.separator}]+$" select="\0" casesensitive="false" />
- <propertyregex property="projectName" override="true" input="${projectAndVersion}" regexp="(.*?)_" select="\1" casesensitive="false" />
- <if>
- <equals arg1="${isFirst}" arg2="true" />
- <then>
- <echo file="@{configPath}/config.ini" message=", \${line.separator}" append="true" />
- <var name="isFirst" value="false" />
- </then>
- </if>
- <echo file="@{configPath}/config.ini" message="${projectName}@start" append="true" />
- <var name="isFirst" value="true" />
- </sequential>
- </for>
- <echo file="@{configPath}/config.ini" append="true">
-osgi.noShutdown=true
-eclipse.ignoreApp=true
-equinox.ds.debug=true
-osee.log.default=INFO
- </echo>
- </sequential>
- </macrodef>
-
- <!-- *************************************************************** -->
- <!-- GENERATE LAUNCH -->
- <!-- *************************************************************** -->
- <macrodef name="createLaunch">
- <attribute name="filepath" />
- <attribute name="serverport" />
- <attribute name="connection.id" />
- <attribute name="launcher" />
- <attribute name="serverMaxMem" default="1024m" />
- <attribute name="isexecutable" default="true" />
- <attribute name="extraVMArgs" default=" " />
- <sequential>
- <echo file="@{filepath}" append="false">java \
--Xmx@{serverMaxMem}
--Dorg.osgi.service.http.port=@{serverport} \
--Dosee.db.connection.id=@{connection.id} \
-@{extraVMArgs} -jar plugins/@{launcher} -console
-</echo>
- <if>
- <equals arg1="executable" arg2="true" />
- <then>
- <chmod file="@{filepath}" perm="ugo+rx" />
- </then>
- </if>
- </sequential>
- </macrodef>
-</project> \ No newline at end of file
+<project name="Generates OSEE Application Server Runtime Bundle" default="run">
+
+ <target name="setup">
+ <propertyregex property="updateSiteFile" input="${masterZip}" defaultvalue="${masterZip}" regexp="-Master-" replace="-Update-" casesensitive="false" override="true" />
+ <property name="tempAppServerFolder" value="${buildDirectory}/${buildLabel}/${updateSiteFile}_tmp" />
+ <mkdir dir="${tempAppServerFolder}" />
+
+ <unzip src="${buildDirectory}/${buildLabel}/${updateSiteFile}" dest="${tempAppServerFolder}">
+ <patternset includes="plugins/*" excludes="features/*,*.jar,*.xml,**/*source_*" />
+ </unzip>
+
+ <property name="configFolder" value="${tempAppServerFolder}/configuration" />
+ <property name="pluginsFolder" value="${tempAppServerFolder}/plugins" />
+
+ <mkdir dir="${configFolder}" />
+
+ <pathconvert property="launcherBundlePath" setonempty="false">
+ <path>
+ <fileset dir="${pluginsFolder}">
+ <include name="org.eclipse.equinox.launcher_*.jar" />
+ </fileset>
+ </path>
+ </pathconvert>
+ <propertyregex property="launcherJar" override="true" input="${launcherBundlePath}" regexp="[^/]+$" select="\0" casesensitive="false" />
+ </target>
+
+ <target name="generateConfig">
+ <generateConfigIni configPath="${configFolder}" pluginsPath="${pluginsFolder}" />
+ </target>
+
+ <target name="pack">
+ <propertyregex property="serverRuntimeFile" input="${masterZip}" defaultvalue="server-runtime.zip" regexp="-Master-" replace="-osgi-runtime-" casesensitive="false" override="true" />
+ <zip destfile="${buildDirectory}/../${serverRuntimeFile}">
+ <fileset dir="${tempAppServerFolder}" />
+ </zip>
+ </target>
+
+ <target name="cleanup">
+ <delete dir="${tempAppServerFolder}" quiet="true" />
+ </target>
+
+ <!-- *************************************************************** -->
+ <!-- LAUNCH CONFIGS -->
+ <!-- *************************************************************** -->
+ <target name="generateTemplate">
+ <createLaunch
+ filepath="${tempAppServerFolder}/runExample.sh"
+ connection.id="[id from connection file]"
+ serverport="8089"
+ isexecutable="false"
+ launcher="${launcherJar}"
+ extraVMArgs="-Dosee.connection.info.uri=[custom connection file path] \${line.separator}-Dosee.application.server.data=[binary data path]" />
+ </target>
+
+ <target name="generateH2Launch">
+ <createLaunch
+ filepath="${tempAppServerFolder}/runH2.sh"
+ connection.id="h2"
+ serverport="8089"
+ launcher="${launcherJar}"
+ extraVMArgs="-Dosee.db.embedded.server=0.0.0.0:8088" />
+ </target>
+
+ <target name="generateDemoLaunch">
+ <createLaunch
+ filepath="${tempAppServerFolder}/runDemo.sh"
+ connection.id="h2"
+ serverport="8089"
+ launcher="${launcherJar}"
+ extraVMArgs="-Dosee.db.embedded.server=0.0.0.0:8088 \${line.separator}-Dosee.connection.info.uri=&quot;demo/osee.demo.db.connection.xml&quot; \${line.separator}-Dosee.application.server.data=&quot;demo/binary_data&quot;" />
+
+ <copy file="${tempAppServerFolder}/runDemo.sh" tofile="${tempAppServerFolder}/runDemo.bat" overwrite="true" />
+ <replaceregexp file="${tempAppServerFolder}/runDemo.bat" match="\\" replace="^" flags="g" />
+
+ <!-- Copy Demo Files -->
+ <dirname property="dependencies.basedir" file="${ant.file}" />
+ <property name="demoFiles" value="${dependencies.basedir}/../demo" />
+ <property name="demoTarget" value="${tempAppServerFolder}/demo" />
+
+ <copydir src="${demoFiles}" dest="${tempAppServerFolder}" />
+ <unzip src="h2.zip" dest="${demoTarget}" />
+
+ <mkdir dir="${demoDataPath}/binary_data" />
+ <unzip src="binary_data.zip" dest="${demoTarget}/binary_data" />
+
+ <delete file="h2.zip" failonerror="false" />
+ <delete file="binary_data.zip" failonerror="false" />
+ </target>
+
+ <target name="generateLocalPostgresLaunch">
+ <createLaunch
+ filepath="${tempAppServerFolder}/runPostgresqlLocal.sh"
+ connection.id="postgresqlLocalhost"
+ serverport="8089"
+ launcher="${launcherJar}" />
+ </target>
+
+ <target name="generateLaunchScripts" depends="generateTemplate,generateDemoLaunch,generateH2Launch,generateLocalPostgresLaunch">
+ </target>
+
+ <!-- *************************************************************** -->
+ <!-- MAIN -->
+ <!-- *************************************************************** -->
+ <target name="run" depends="setup,generateConfig,generateLaunchScripts,pack,cleanup">
+ </target>
+
+ <!-- *************************************************************** -->
+ <!-- GENERATE CONFIG.INI -->
+ <!-- *************************************************************** -->
+ <macrodef name="generateConfigIni">
+ <attribute name="configPath" />
+ <attribute name="pluginsPath" />
+ <sequential>
+ <echo file="@{configPath}/config.ini" append="false" message="osgi.bundles= \${line.separator}\${line.separator}" />
+
+ <pathconvert property="serverBundles" setonempty="false" pathsep=";">
+ <path>
+ <fileset dir="@{pluginsPath}">
+ <exclude name="org.eclipse.osgi_*.jar" />
+ <exclude name="org.eclipse.equinox.launcher_*.jar" />
+ <exclude name="*source_*.jar" />
+ </fileset>
+ </path>
+ </pathconvert>
+
+ <var name="isFirst" value="false" />
+ <for param="bundle" delimiter=";" list="${serverBundles}" trim="true">
+ <sequential>
+ <propertyregex property="projectAndVersion" override="true" input="@{bundle}" regexp="[^${file.separator}]+$" select="\0" casesensitive="false" />
+ <propertyregex property="projectName" override="true" input="${projectAndVersion}" regexp="(.*?)_" select="\1" casesensitive="false" />
+ <if>
+ <equals arg1="${isFirst}" arg2="true" />
+ <then>
+ <echo file="@{configPath}/config.ini" message=", \${line.separator}" append="true" />
+ <var name="isFirst" value="false" />
+ </then>
+ </if>
+ <echo file="@{configPath}/config.ini" message="${projectName}@start" append="true" />
+ <var name="isFirst" value="true" />
+ </sequential>
+ </for>
+ <echo file="@{configPath}/config.ini" append="true">
+osgi.noShutdown=true
+eclipse.ignoreApp=true
+equinox.ds.debug=true
+osee.log.default=INFO
+ </echo>
+ </sequential>
+ </macrodef>
+
+ <!-- *************************************************************** -->
+ <!-- GENERATE LAUNCH -->
+ <!-- *************************************************************** -->
+ <macrodef name="createLaunch">
+ <attribute name="filepath" />
+ <attribute name="serverport" />
+ <attribute name="connection.id" />
+ <attribute name="launcher" />
+ <attribute name="serverMaxMem" default="1024m" />
+ <attribute name="isexecutable" default="true" />
+ <attribute name="extraVMArgs" default=" " />
+ <sequential>
+ <echo file="@{filepath}" append="false">java \
+-Xmx@{serverMaxMem} \
+-Dorg.osgi.service.http.port=@{serverport} \
+-Dosee.db.connection.id=@{connection.id} \
+@{extraVMArgs} \
+-jar plugins/@{launcher} -console
+</echo>
+ <if>
+ <equals arg1="executable" arg2="true" />
+ <then>
+ <chmod file="@{filepath}" perm="ugo+rx" />
+ </then>
+ </if>
+ </sequential>
+ </macrodef>
+</project>

Back to the top