diff options
author | Roberto E. Escobar | 2014-11-21 01:36:22 +0000 |
---|---|---|
committer | Angel Avila | 2014-11-21 01:36:22 +0000 |
commit | 6407bc44a88f6b410f560916358bdf2a90606b8b (patch) | |
tree | f9d3e3ef4d3596a4b022aa69ee39957c45f1857f | |
parent | f6d80395bcec4bc4f53b27f42dbc08d02243767f (diff) | |
download | org.eclipse.osee-6407bc44a88f6b410f560916358bdf2a90606b8b.tar.gz org.eclipse.osee-6407bc44a88f6b410f560916358bdf2a90606b8b.tar.xz org.eclipse.osee-6407bc44a88f6b410f560916358bdf2a90606b8b.zip |
feature[ats_ATS139503]: Set JDBC config in json preferences
Add json preferences to launch configs
Add json preferences to server integration tests
Add json preferences to server runtime
Change-Id: I7f959d4cc5bd3e63795e3f9888e663f8766ddbf6
15 files changed, 190 insertions, 28 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/pom.xml b/plugins/org.eclipse.osee.ats.client.integration.tests/pom.xml index a029d30bdea..d2d23f7a64c 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/pom.xml +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/pom.xml @@ -149,7 +149,8 @@ value="${project.build.directory}/server-data" /> <property name="xserver-log-config" value="${project.basedir}/logback-test.xml" /> - <property name="xserver-db-home" value="file:target/server-data/osee-test-db.db" /> + <property name="xserver-use-demo-data" value="true" /> + <property name="xserver-db-home" value="file:${xserver-data}/osee-test-db" /> <property name="xserver-db-name" value="osee-test-db" /> <property name="xserver-db-username" value="public" /> <property name="xserver-db-password" value="" /> @@ -161,7 +162,6 @@ <property name="xserver-log-output" value="${xserver-data}/server-output.log" /> - <mkdir dir="${xserver-data}" /> <ant antfile="${osee-application-server-launch-ant}" target="run" inheritRefs="true" output="${xserver-log-output}" /> </target> diff --git a/plugins/org.eclipse.osee.client.integration.tests/pom.xml b/plugins/org.eclipse.osee.client.integration.tests/pom.xml index 739b0c5918d..675c35c105e 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/pom.xml +++ b/plugins/org.eclipse.osee.client.integration.tests/pom.xml @@ -144,7 +144,8 @@ value="${project.build.directory}/server-data" /> <property name="xserver-log-config" value="${project.basedir}/logback-test.xml" /> - <property name="xserver-db-home" value="file:target/server-data/osee-test-db.db" /> + <property name="xserver-use-demo-data" value="true" /> + <property name="xserver-db-home" value="file:${xserver-data}/osee-test-db" /> <property name="xserver-db-name" value="osee-test-db" /> <property name="xserver-db-username" value="public" /> <property name="xserver-db-password" value="" /> @@ -156,7 +157,6 @@ <property name="xserver-log-output" value="${xserver-data}/server-output.log" /> - <mkdir dir="${xserver-data}" /> <ant antfile="${osee-application-server-launch-ant}" target="run" inheritRefs="true" output="${xserver-log-output}" /> </target> diff --git a/plugins/org.eclipse.osee.coverage.integration.tests/pom.xml b/plugins/org.eclipse.osee.coverage.integration.tests/pom.xml index e0086364617..56a2cfa5262 100644 --- a/plugins/org.eclipse.osee.coverage.integration.tests/pom.xml +++ b/plugins/org.eclipse.osee.coverage.integration.tests/pom.xml @@ -164,7 +164,8 @@ value="${project.build.directory}/server-data" /> <property name="xserver-log-config" value="${project.basedir}/logback-test.xml" /> - <property name="xserver-db-home" value="file:target/server-data/osee-test-db.db" /> + <property name="xserver-use-demo-data" value="true" /> + <property name="xserver-db-home" value="file:${xserver-data}/osee-test-db" /> <property name="xserver-db-name" value="osee-test-db" /> <property name="xserver-db-username" value="public" /> <property name="xserver-db-password" value="" /> diff --git a/plugins/org.eclipse.osee.logback.config/logback-test.xml b/plugins/org.eclipse.osee.logback.config/logback-test.xml index d5b5f183787..f0425fbcd98 100644 --- a/plugins/org.eclipse.osee.logback.config/logback-test.xml +++ b/plugins/org.eclipse.osee.logback.config/logback-test.xml @@ -13,6 +13,8 @@ </appender> <!-- Configure OSEE log messages --> + <logger name="org.eclipse.osee.jdbc" level="TRACE" /> + <logger name="org.eclipse.osee.orcs.db" level="TRACE" /> <logger name="org.eclipse.osee.database" level="TRACE" /> <!-- <logger name="org.eclipse.osee.orcs.core" level="TRACE" /> --> diff --git a/plugins/org.eclipse.osee.parent/tools/osee-application-server.xml b/plugins/org.eclipse.osee.parent/tools/osee-application-server.xml index 2215664f651..9d5b6c115aa 100644 --- a/plugins/org.eclipse.osee.parent/tools/osee-application-server.xml +++ b/plugins/org.eclipse.osee.parent/tools/osee-application-server.xml @@ -10,7 +10,6 @@ $xserver-db-password=osee.eclipse \ $xserver-db-address=127.0.0.1 \ $xserver-db-port=1623 \ - $xserver-db-web-port=1623 \ $xserver-db-type=H2,PGSQL \ ${xserver-authentication} @@ -33,11 +32,13 @@ </sequential> </for> + <property name="xserver-use-demo-data" value="false" /> + <property name="osee.app.server.config.file" value="${xserver-data}/osee.hsql.test.json" /> <property name="osee.app.server.connectionFile" value="${xserver-data}/test.osee.performance.db.connection.xml" /> <property name="osee.app.server.connectionId" value="hsql" /> - <property name="osee.application.server.data" value="${xserver-project}/target/server/demo/binary_data" /> <echo message="Server Connection File: [${osee.app.server.connectionFile}]" /> + <echo message="Server Config File: [${osee.app.server.config.file}]" /> <echo message="Server Data Directory: [${osee.application.server.data}]" /> <echo message="Osee Application Server Home: [${xserver-home}]" /> @@ -45,11 +46,28 @@ <echo message="Osee Application Server Telnet Port: [${xserver-telnet-port}]" /> <echo message="Osee Application Server Db Type: [${xserver-db-type}]" /> <echo message="Osee Application Server Db Address: [${xserver-db-address}:${xserver-db-port}]" /> - <echo message="Osee Application Server Db Web Port: [${xserver-db-web-port}]" /> + + <mkdir dir="${xserver-data}" /> + + <property name="osee.application.server.data" value="${xserver-data}/binary_data" /> + <mkdir dir="${osee.application.server.data}" /> + + <!-- copy server data to temp area --> + <if> + <equals arg1="${xserver-use-demo-data}" arg2="true" /> + <then> + <copydir src="${xserver-project}/target/server/demo/binary_data" dest="${osee.application.server.data}" /> + + <!-- copy database data to server area --> + <copy file="${xserver-project}/target/server/demo/hsql/osee.hsql.db.properties" tofile="${xserver-data}/${xserver-db-name}.properties" /> + <copy file="${xserver-project}/target/server/demo/hsql/osee.hsql.db.script" tofile="${xserver-data}/${xserver-db-name}.script" /> + </then> + </if> </target> <target name="writeHsqlConnectionFile" depends="init"> <writeConnectionFile dbType="hsql" dbHome="${xserver-db-home}" dbPrefix="jdbc:hsqldb:hsql" dbDriver="hsql.db.connection" dbName="${xserver-db-name}" dbUser="${xserver-db-username}" dbPasswd="${xserver-db-password}" dbAddress="${xserver-db-address}" dbPort="${xserver-db-port}" connectionFilePath="${osee.app.server.connectionFile}" connectionid="${osee.app.server.connectionId}" /> + <writeJsonConfig dbaddress="${xserver-db-address}" dbpath="${xserver-db-home}" dbport="${xserver-db-port}" filepath="${osee.app.server.config.file}" /> </target> <target name="run" depends="init,writeHsqlConnectionFile,startServer" /> @@ -81,10 +99,10 @@ <sysproperty key="osee.connection.info.uri" value="${osee.app.server.connectionFile}" /> <sysproperty key="osee.application.server.data" value="${osee.application.server.data}" /> <sysproperty key="osee.authentication.protocol" value="${xserver-authentication}" /> - <sysproperty key="osee.db.embedded.server" value="${xserver-db-address}:${xserver-db-port}" /> - <sysproperty key="osee.db.embedded.web.server.port" value="${xserver-db-web-port}" /> + <!--<sysproperty key="osee.db.embedded.server" value="${xserver-db-address}:${xserver-db-port}" />--> <sysproperty key="logback.configurationFile" value="${xserver-log-config}" /> <sysproperty key="osgi.configuration.area" value="${xserver-project}/configuration" /> + <sysproperty key="cm.config.uri" value="${osee.app.server.config.file}" /> <jvmarg line="${additionalJvmArgs}" /> <arg line=" -console ${xserver-telnet-port} -consoleLog -configuration "${xserver-home}/configuration"" /> @@ -167,4 +185,43 @@ </sequential> </macrodef> + <macrodef name="writeJsonConfig"> + <attribute name="dbAddress" /> + <attribute name="dbPort" /> + <attribute name="dbPath" /> + <attribute name="filePath" /> + <sequential> + <propertyregex property="dbFilePath" input="@{dbPath}" override="true" regexp="\\" replace="/" global="true" defaultValue="@{dbPath}" /> + + <echo message="Writing Json Configuration" /> + <echo file="@{filePath}"> +{ + "config": [ + { + "service.pid": "org.eclipse.osee.jdbc.internal.osgi.JdbcComponentFactory", + "jdbc.service": [ + { + "service.id": "1001", + "jdbc.server.host": "@{dbAddress}", + "jdbc.server.port": "@{dbPort}", + "jdbc.server.db.data.path": "${dbFilePath}", + "jdbc.client.db.username": "public", + "jdbc.client.connection.pool.enabled": "true", + "jdbc.client.connection.pool.max.active.connections": "100", + "jdbc.client.connection.pool.max.idle.connections": "100", + "osgi.binding": [ + "activity.jdbc.service", + "orcs.jdbc.service", + "account.jdbc.service", + "oauth.jdbc.service" + ] + } + ] + } + ] +} + </echo> + </sequential> + </macrodef> + </project>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[HSQLDB].launch b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[HSQLDB].launch index d8115351e97..2efb6adbd7a 100644 --- a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[HSQLDB].launch +++ b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[HSQLDB].launch @@ -20,7 +20,7 @@ <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> -<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m -Xmx1024m -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8089 -Dosee.db.connection.id=hsql -Dosee.db.embedded.server=0.0.0.0:8088 -Dosee.log.default=INFO -Dosee.authentication.protocol=demo -Dosee.connection.info.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.demo.db.connection.xml" -Dlogback.configurationFile=C:\UserData\logback-dev.xml"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m -Xmx1024m -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8089 -Dosee.db.connection.id=hsql -Dosee.log.default=INFO -Dosee.authentication.protocol=demo -Dosee.connection.info.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.demo.db.connection.xml" -Dlogback.configurationFile=C:\UserData\logback-dev.xml -Dcm.config.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.hsql.json""/> <stringAttribute key="pde.version" value="3.3"/> <setAttribute key="selected_features"> <setEntry value="org.eclipse.osee.disposition.feature:default"/> diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[PostGreSQL].launch b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[PostGreSQL].launch index 03bd705d726..7b782e774cd 100644 --- a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[PostGreSQL].launch +++ b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_[PostGreSQL].launch @@ -20,7 +20,7 @@ <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> -<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m -Xmx1024m -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8089 -Dosee.db.connection.id=postgresqlLocalhost -Dosee.log.default=INFO -Dosee.db.connection.count=12 -Dosee.authentication.protocol=demo -Dosee.connection.info.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.demo.db.connection.xml""/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m -Xmx1024m -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8089 -Dosee.db.connection.id=postgresqlLocalhost -Dosee.log.default=INFO -Dosee.db.connection.count=12 -Dosee.authentication.protocol=demo -Dosee.connection.info.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.demo.db.connection.xml" -Dcm.config.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.postgresql.json""/> <stringAttribute key="pde.version" value="3.3"/> <setAttribute key="selected_features"> <setEntry value="org.eclipse.osee.orcs.feature:default"/> diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch index 2dfea33bba5..589975b229d 100644 --- a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch +++ b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE_Application_Server_https_[HSQLDB].launch @@ -20,7 +20,7 @@ <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> -<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m -Xmx1024m -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dosee.db.connection.id=hsql -Dosee.db.embedded.server=0.0.0.0:8088 -Dosee.log.default=INFO -Dosee.authentication.protocol=demo -Dosee.connection.info.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.demo.db.connection.xml" -Dorg.eclipse.equinox.http.jetty.https.enabled=true -Dorg.eclipse.equinox.http.jetty.ssl.keystore=${project_loc:org.eclipse.osee.support.config}/launchConfig/demo.keystore -Dorg.eclipse.equinox.http.jetty.ssl.password=demoPassword -Dorg.eclipse.equinox.http.jetty.ssl.keypassword=demoPassword -Dorg.osgi.service.http.port.secure=8089"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:MaxPermSize=256m -Xmx1024m -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dosee.db.connection.id=hsql -Dosee.log.default=INFO -Dosee.authentication.protocol=demo -Dosee.connection.info.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.demo.db.connection.xml" -Dorg.eclipse.equinox.http.jetty.https.enabled=true -Dorg.eclipse.equinox.http.jetty.ssl.keystore=${project_loc:org.eclipse.osee.support.config}/launchConfig/demo.keystore -Dorg.eclipse.equinox.http.jetty.ssl.password=demoPassword -Dorg.eclipse.equinox.http.jetty.ssl.keypassword=demoPassword -Dorg.osgi.service.http.port.secure=8089 -Dcm.config.uri="${project_loc:org.eclipse.osee.support.config}/launchConfig/osee.hsql.json""/> <stringAttribute key="pde.version" value="3.3"/> <setAttribute key="selected_features"> <setEntry value="org.eclipse.osee.orcs.feature:default"/> diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/osee.hsql.json b/plugins/org.eclipse.osee.support.config/launchConfig/osee.hsql.json new file mode 100644 index 00000000000..40e286558d8 --- /dev/null +++ b/plugins/org.eclipse.osee.support.config/launchConfig/osee.hsql.json @@ -0,0 +1,25 @@ +{ + "config": [ + { + "service.pid": "org.eclipse.osee.jdbc.internal.osgi.JdbcComponentFactory", + "jdbc.service": [ + { + "service.id": "1001", + "jdbc.server.host": "127.0.0.1", + "jdbc.server.port": "8088", + "jdbc.server.db.data.path": "file:~/hsql/osee.hsql.db", + "jdbc.client.db.username": "public", + "jdbc.client.connection.pool.enabled": "true", + "jdbc.client.connection.pool.max.active.connections": "100", + "jdbc.client.connection.pool.max.idle.connections": "100", + "osgi.binding": [ + "activity.jdbc.service", + "orcs.jdbc.service", + "account.jdbc.service", + "oauth.jdbc.service" + ] + } + ] + } + ] +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json b/plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json new file mode 100644 index 00000000000..ef2110fb3d2 --- /dev/null +++ b/plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json @@ -0,0 +1,24 @@ +{ + "config": [ + { + "service.pid": "org.eclipse.osee.jdbc.internal.osgi.JdbcComponentFactory", + "jdbc.service": [ + { + "service.id": "1001", + "jdbc.client.db.uri": "jdbc:postgresql://localhost:5432/OSEE", + "jdbc.client.db.username": "osee", + "jdbc.client.db.password": "osee", + "jdbc.client.connection.pool.enabled": "true", + "jdbc.client.connection.pool.max.active.connections": "100", + "jdbc.client.connection.pool.max.idle.connections": "100", + "osgi.binding": [ + "activity.jdbc.service", + "orcs.jdbc.service", + "account.jdbc.service", + "oauth.jdbc.service" + ] + } + ] + } + ] +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/pom.xml b/plugins/org.eclipse.osee.x.server.integration.tests/pom.xml index fc03f8d91db..13b2a5bac62 100644 --- a/plugins/org.eclipse.osee.x.server.integration.tests/pom.xml +++ b/plugins/org.eclipse.osee.x.server.integration.tests/pom.xml @@ -122,7 +122,8 @@ <property name="xserver-data" value="${project.build.directory}/server-data" /> <property name="xserver-log-config" value="${project.basedir}/logback-test.xml" /> - <property name="xserver-db-home" value="file:${xserver-project}/target/server/demo/hsql/osee.hsql.db" /> + <property name="xserver-use-demo-data" value="true" /> + <property name="xserver-db-home" value="file:${xserver-data}/osee-test-db" /> <property name="xserver-db-name" value="osee-test-db" /> <property name="xserver-db-username" value="public" /> <property name="xserver-db-password" value="" /> @@ -133,8 +134,7 @@ <property name="additionalJvmArgs" value=" " /> <property name="xserver-log-output" value="${xserver-data}/server-output.log" /> - - <mkdir dir="${xserver-data}" /> + <ant antfile="${osee-application-server-launch-ant}" target="run" inheritRefs="true" output="${xserver-log-output}" /> </target> </configuration> diff --git a/plugins/org.eclipse.osee.x.server.p2/etc/osee.hsql.json b/plugins/org.eclipse.osee.x.server.p2/etc/osee.hsql.json new file mode 100644 index 00000000000..40e286558d8 --- /dev/null +++ b/plugins/org.eclipse.osee.x.server.p2/etc/osee.hsql.json @@ -0,0 +1,25 @@ +{ + "config": [ + { + "service.pid": "org.eclipse.osee.jdbc.internal.osgi.JdbcComponentFactory", + "jdbc.service": [ + { + "service.id": "1001", + "jdbc.server.host": "127.0.0.1", + "jdbc.server.port": "8088", + "jdbc.server.db.data.path": "file:~/hsql/osee.hsql.db", + "jdbc.client.db.username": "public", + "jdbc.client.connection.pool.enabled": "true", + "jdbc.client.connection.pool.max.active.connections": "100", + "jdbc.client.connection.pool.max.idle.connections": "100", + "osgi.binding": [ + "activity.jdbc.service", + "orcs.jdbc.service", + "account.jdbc.service", + "oauth.jdbc.service" + ] + } + ] + } + ] +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.x.server.p2/etc/osee.postgresql.json b/plugins/org.eclipse.osee.x.server.p2/etc/osee.postgresql.json new file mode 100644 index 00000000000..ef2110fb3d2 --- /dev/null +++ b/plugins/org.eclipse.osee.x.server.p2/etc/osee.postgresql.json @@ -0,0 +1,24 @@ +{ + "config": [ + { + "service.pid": "org.eclipse.osee.jdbc.internal.osgi.JdbcComponentFactory", + "jdbc.service": [ + { + "service.id": "1001", + "jdbc.client.db.uri": "jdbc:postgresql://localhost:5432/OSEE", + "jdbc.client.db.username": "osee", + "jdbc.client.db.password": "osee", + "jdbc.client.connection.pool.enabled": "true", + "jdbc.client.connection.pool.max.active.connections": "100", + "jdbc.client.connection.pool.max.idle.connections": "100", + "osgi.binding": [ + "activity.jdbc.service", + "orcs.jdbc.service", + "account.jdbc.service", + "oauth.jdbc.service" + ] + } + ] + } + ] +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.x.server.p2/package-server-runtime.xml b/plugins/org.eclipse.osee.x.server.p2/package-server-runtime.xml index 685d8c254f7..43499e61c20 100644 --- a/plugins/org.eclipse.osee.x.server.p2/package-server-runtime.xml +++ b/plugins/org.eclipse.osee.x.server.p2/package-server-runtime.xml @@ -17,6 +17,7 @@ <property name="server-config-path" value="${server-path}/configuration" /> <property name="server-plugins-path" value="${server-path}/plugins" /> + <property name="server-etc-path" value="${server-path}/etc" /> <mkdir dir="${server-config-path}" /> <mkdir dir="${server-plugins-path}" /> @@ -25,6 +26,9 @@ <fileset dir="${p2-content-path}/plugins" excludes="**/*source_*.jar" /> </copy> + <mkdir dir="${server-etc-path}" /> + <copydir src="${etc-content-path}" dest="${server-etc-path}" /> + <pathconvert property="launcherBundlePath" setonempty="false"> <path> <fileset dir="${server-plugins-path}"> @@ -57,16 +61,17 @@ <!-- *************************************************************** --> <!-- LAUNCH CONFIGS --> <!-- *************************************************************** --> - <target name="generateTemplate"> - <createLaunch filepath="${server-path}/runExample.sh" connection.id="[id from connection file]" serverport="8089" executable="false" launcher="${equinox-launcher-jar}" extraVMArgs="-Dosee.connection.info.uri=[custom connection file path] \${line.separator}-Dosee.application.server.data=[binary data path] \${line.separator}-Dosee.authentication.protocol=[trustAll,demo]" /> + + <target name="postgreSqlLaunch"> + <createLaunch filepath="${server-path}/runPostgreSqlLocal.sh" cm.cfg.uri="etc/osee.postgresql.json" connection.id="postgresqlLocalhost" serverport="8089" launcher="${equinox-launcher-jar}" extraVMArgs="-Dosee.authentication.protocol=trustAll" /> </target> - <target name="generateHSQLLaunch"> - <createLaunch filepath="${server-path}/runHSQL.sh" connection.id="hsql" serverport="8089" launcher="${equinox-launcher-jar}" extraVMArgs="-Dosee.authentication.protocol=trustAll \${line.separator}-Dosee.db.embedded.server=0.0.0.0:8088" /> + <target name="hsqlLaunch"> + <createLaunch filepath="${server-path}/runHsql.sh" cm.cfg.uri="etc/osee.hsql.json" connection.id="hsql" serverport="8089" launcher="${equinox-launcher-jar}" extraVMArgs="-Dosee.authentication.protocol=trustAll " /> </target> - <target name="generateDemoLaunch"> - <createLaunch filepath="${server-path}/runDemo.sh" connection.id="hsql" serverport="8089" launcher="${equinox-launcher-jar}" extraVMArgs="-Dosee.authentication.protocol=demo \${line.separator}-Dosee.db.embedded.server=0.0.0.0:8088 \${line.separator}-Dosee.connection.info.uri="demo/osee.demo.db.connection.xml" \${line.separator}-Dosee.application.server.data="demo/binary_data"" /> + <target name="demoLaunch"> + <createLaunch filepath="${server-path}/runDemo.sh" cm.cfg.uri="etc/osee.hsql.json" connection.id="hsql" serverport="8089" launcher="${equinox-launcher-jar}" extraVMArgs="-Dosee.authentication.protocol=demo \${line.separator}-Dosee.connection.info.uri="demo/osee.demo.db.connection.xml" \${line.separator}-Dosee.application.server.data="demo/binary_data"" /> <copy file="${server-path}/runDemo.sh" tofile="${server-path}/runDemo.bat" overwrite="true" /> <replaceregexp file="${server-path}/runDemo.bat" match="\\" replace="^" flags="g" /> @@ -82,11 +87,7 @@ <copy file="${demo-content-path}/osee.demo.db.connection.xml" tofile="${server-demo-path}/osee.demo.db.connection.xml" /> </target> - <target name="generateLocalPostgresLaunch"> - <createLaunch filepath="${server-path}/runPostgresqlLocal.sh" connection.id="postgresqlLocalhost" serverport="8089" launcher="${equinox-launcher-jar}" extraVMArgs="-Dosee.authentication.protocol=trustAll"/> - </target> - - <target name="generateLaunchScripts" depends="generateTemplate,generateDemoLaunch,generateHSQLLaunch,generateLocalPostgresLaunch" /> + <target name="generateLaunchScripts" depends="demoLaunch,hsqlLaunch,postgreSqlLaunch" /> <!-- *************************************************************** --> <!-- GENERATE CONFIG.INI --> @@ -174,12 +175,13 @@ osee.log.default=INFO <attribute name="filepath" /> <attribute name="serverport" /> <attribute name="connection.id" /> - <attribute name="db.connection.pool.size" default="100" /> + <attribute name="db.connection.pool.size" default="100" /> <attribute name="launcher" /> <attribute name="session.timeout" default="3600" /> <attribute name="serverMaxMem" default="1024m" /> <attribute name="executable" default="true" /> <attribute name="extraVMArgs" default=" " /> + <attribute name="cm.cfg.uri" /> <sequential> <echo file="@{filepath}" append="false">java -server \ -Xmx@{serverMaxMem} \ @@ -187,6 +189,7 @@ osee.log.default=INFO -Dosee.db.connection.id=@{connection.id} \ -Dosee.db.connection.pool.size=@{db.connection.pool.size} \ -Dorg.eclipse.equinox.http.jetty.context.sessioninactiveinterval=@{session.timeout} \ +-Dcm.config.uri="@{cm.cfg.uri}" \ @{extraVMArgs} \ -jar plugins/@{launcher} -console -consoleLog </echo> diff --git a/plugins/org.eclipse.osee.x.server.p2/pom.xml b/plugins/org.eclipse.osee.x.server.p2/pom.xml index 5155ddebd41..af21c0555d4 100644 --- a/plugins/org.eclipse.osee.x.server.p2/pom.xml +++ b/plugins/org.eclipse.osee.x.server.p2/pom.xml @@ -39,6 +39,7 @@ <property name="output-path" value="${project.build.directory}" /> <property name="server-path" value="${output-path}/server" /> <property name="demo-content-path" value="${project.basedir}/demo" /> + <property name="etc-content-path" value="${project.basedir}/etc" /> <ant antfile="package-server-runtime.xml" target="run" inheritRefs="true" /> |