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 /plugins/org.eclipse.osee.x.server.p2 | |
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
Diffstat (limited to 'plugins/org.eclipse.osee.x.server.p2')
4 files changed, 65 insertions, 12 deletions
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" /> |