<commit_before><project name="og-examples" default="compile" xmlns:ivy="antlib:org.apache.ivy.ant">

	<property file="build.properties" />

	<import file="${common.dir}/common.xml" />

	<property name="webapp.dir" value="${lib.dir}/webapp/com.opengamma/og-web" />
	<property name="sql.dir" value="${lib.dir}/sql/com.opengamma/og-masterdb" />

	<target name="new-hsqldb" depends="jetty-stop" description="creates a new hsql database">
		<property name="exampleDb.parent" value="${basedir}/install/db/hsqldb" />
		<property name="exampleDb.dir" value="${basedir}/install/db/hsqldb/example-db" />
		<property name="finUserDb.dir" value="${basedir}/temp/hsqldb/og-fin-user" />

		<unzip dest="${basedir}/temp" overwrite="true">
			<fileset dir="${sql.dir}">
				<include name="*.zip" />
			</fileset>
		</unzip>

		<delete dir="${exampleDb.parent}" failonerror="false" />
		<delete dir="${finUserDb.dir}" failonerror="false" />

		<new-hsqldb-db path="${exampleDb.dir}" scriptdir="${basedir}/temp" catalog="og-financial" />
		<new-hsqldb-db path="${finUserDb.dir}" scriptdir="${basedir}/temp" catalog="og-financial" />
	</target>

	<!-- NOTE jonathan 2011-02-04 - Note that that the following Jetty targets operate only on web-engine, not web-marketdata -->

	<target name="jetty-resolve" depends="load-ivy">
		<ivy:resolve inline="true" organisation="org.eclipse" module="jetty" revision="7.0.1+" conf="start" />
		<ivy:retrieve pattern="${lib.dir}/[type]/[organization]/[module]/[artifact]-[revision].[ext]" />
	</target>

	<target name="jetty-properties" depends="jetty-resolve">
		<property name="jetty.spawn" value="true" />
		<property name="jetty.stopport" value="8079" />
		<property name="jetty.stopkey" value="OpenGamma" />
		<property name="jetty.config" value="standalone" />
		<path id="jetty.start.path">
			<fileset dir="${lib.dir}/jar/org.eclipse/jetty">
				<include name="jetty-start-*.jar" />
			</fileset>
		</path>
		<property name="jetty.start" value="${toString:jetty.start.path}" />
	</target>

	<path id="jetty.run.path">
		<pathelement path="${basedir}/config" />
		<path refid="run.path.id" />
		<fileset dir="${lib.dir}/resource/com.opengamma/og-component">
			<include name="*.zip" />
		</fileset>
		<fileset dir="${lib.dir}/resource/com.opengamma/og-financial">
			<include name="*.zip" />
		</fileset>
		<fileset dir="${lib.dir}/resource/com.opengamma/og-web">
			<include name="*.zip" />
		</fileset>
	</path>

	<target name="jetty-debug" depends="compile-src,jetty-stop" description="same as 'jetty' but block waiting for output">
		<java classpathref="jetty.run.path" classname="com.opengamma.component.OpenGammaComponentServer" fork="true" spawn="false">
			<jvmarg value="-Dlogback.configurationFile=com/opengamma/util/warn-logback.xml" />
			<jvmarg value="-Dcommandmonitor.port=${jetty.stopport}" />
			<jvmarg value="-Dcommandmonitor.secret=${jetty.stopkey}" />
			<jvmarg value="-Xms${jetty.initialheap}" />
			<jvmarg value="-Xmx${jetty.maxheap}" />
			<jvmarg value="-XX:MaxPermSize=${jetty.maxpermgen}" />
			<arg value="-v" />
			<arg value="classpath:fullstack${file.separator}fullstack-example-dev.properties" />
		</java>
	</target>

	<target name="run-engine" depends="init-database">
		<java classpathref="jetty.run.path" classname="com.opengamma.component.OpenGammaComponentServer" fork="true" spawn="false">
			<jvmarg value="-Dlogback.configurationFile=com/opengamma/util/warn-logback.xml" />
			<jvmarg value="-Dcommandmonitor.port=${jetty.stopport}" />
			<jvmarg value="-Dcommandmonitor.secret=${jetty.stopkey}" />
			<jvmarg value="-Xms${jetty.initialheap}" />
			<jvmarg value="-Xmx${jetty.maxheap}" />
			<jvmarg value="-XX:MaxPermSize=${jetty.maxpermgen}" />
			<arg value="-v" />
			<arg value="classpath:fullstack${file.separator}fullstack-example-dev.properties" />
		</java>
	</target>

	<target name="jetty" depends="compile-src,jetty-stop" description="start the server using the project web-engine folder">
		<java classpath="${toString:jetty.run.path}" classname="com.opengamma.component.OpenGammaComponentServer" fork="true" spawn="${jetty.spawn}">
			<jvmarg value="-Dlogback.configurationFile=${junit.logback}" />
			<jvmarg value="-Dcommandmonitor.port=${jetty.stopport}" /><commit_msg>Ant target to start hsqldb database swing manager<commit_after><project name="og-examples" default="compile" xmlns:ivy="antlib:org.apache.ivy.ant">

	<property file="build.properties" />

	<import file="${common.dir}/common.xml" />

	<property name="webapp.dir" value="${lib.dir}/webapp/com.opengamma/og-web" />
	<property name="sql.dir" value="${lib.dir}/sql/com.opengamma/og-masterdb" />

	<target name="new-hsqldb" depends="jetty-stop" description="creates a new hsql database">
		<property name="exampleDb.parent" value="${basedir}/install/db/hsqldb" />
		<property name="exampleDb.dir" value="${basedir}/install/db/hsqldb/example-db" />
		<property name="finUserDb.dir" value="${basedir}/temp/hsqldb/og-fin-user" />

		<unzip dest="${basedir}/temp" overwrite="true">
			<fileset dir="${sql.dir}">
				<include name="*.zip" />
			</fileset>
		</unzip>

		<delete dir="${exampleDb.parent}" failonerror="false" />
		<delete dir="${finUserDb.dir}" failonerror="false" />

		<new-hsqldb-db path="${exampleDb.dir}" scriptdir="${basedir}/temp" catalog="og-financial" />
		<new-hsqldb-db path="${finUserDb.dir}" scriptdir="${basedir}/temp" catalog="og-financial" />
	</target>

	<!-- NOTE jonathan 2011-02-04 - Note that that the following Jetty targets operate only on web-engine, not web-marketdata -->

	<target name="jetty-resolve" depends="load-ivy">
		<ivy:resolve inline="true" organisation="org.eclipse" module="jetty" revision="7.0.1+" conf="start" />
		<ivy:retrieve pattern="${lib.dir}/[type]/[organization]/[module]/[artifact]-[revision].[ext]" />
	</target>

	<target name="jetty-properties" depends="jetty-resolve">
		<property name="jetty.spawn" value="true" />
		<property name="jetty.stopport" value="8079" />
		<property name="jetty.stopkey" value="OpenGamma" />
		<property name="jetty.config" value="standalone" />
		<path id="jetty.start.path">
			<fileset dir="${lib.dir}/jar/org.eclipse/jetty">
				<include name="jetty-start-*.jar" />
			</fileset>
		</path>
		<property name="jetty.start" value="${toString:jetty.start.path}" />
	</target>

	<path id="jetty.run.path">
		<pathelement path="${basedir}/config" />
		<path refid="run.path.id" />
		<fileset dir="${lib.dir}/resource/com.opengamma/og-component">
			<include name="*.zip" />
		</fileset>
		<fileset dir="${lib.dir}/resource/com.opengamma/og-financial">
			<include name="*.zip" />
		</fileset>
		<fileset dir="${lib.dir}/resource/com.opengamma/og-web">
			<include name="*.zip" />
		</fileset>
	</path>

	<target name="jetty-debug" depends="compile-src,jetty-stop" description="same as 'jetty' but block waiting for output">
		<java classpathref="jetty.run.path" classname="com.opengamma.component.OpenGammaComponentServer" fork="true" spawn="false">
			<jvmarg value="-Dlogback.configurationFile=com/opengamma/util/warn-logback.xml" />
			<jvmarg value="-Dcommandmonitor.port=${jetty.stopport}" />
			<jvmarg value="-Dcommandmonitor.secret=${jetty.stopkey}" />
			<jvmarg value="-Xms${jetty.initialheap}" />
			<jvmarg value="-Xmx${jetty.maxheap}" />
			<jvmarg value="-XX:MaxPermSize=${jetty.maxpermgen}" />
			<arg value="-v" />
			<arg value="classpath:fullstack${file.separator}fullstack-example-dev.properties" />
		</java>
	</target>
	
	<target name="db-manager" depends="compile-src,jetty-stop">
	  <java classpathref="jetty.run.path" classname="org.hsqldb.util.DatabaseManagerSwing" fork="true" spawn="false">
	    <jvmarg value="-Xms${jetty.initialheap}" />
	    <jvmarg value="-Xmx${jetty.maxheap}" />
	    <jvmarg value="-XX:MaxPermSize=${jetty.maxpermgen}" />
	  </java>
	</target>
	
	<target name="run-engine" depends="init-database">
		<java classpathref="jetty.run.path" classname="com.opengamma.component.OpenGammaComponentServer" fork="true" spawn="false">
			<jvmarg value="-Dlogback.configurationFile=com/opengamma/util/warn-logback.xml" />
			<jvmarg value="-Dcommandmonitor.port=${jetty.stopport}" />
			<jvmarg value="-Dcommandmonitor.secret=${jetty.stopkey}" />
			<jvmarg value="-Xms${jetty.initialheap}" />
			<jvmarg value="-Xmx${jetty.maxheap}" />
			<jvmarg value="-XX:MaxPermSize=${jetty.maxpermgen}" />
			<arg value="-v" />
			<arg value="classpath:fullstack${file.separator}fullstack-example-dev.properties" />
		</java>
	</target>

	<target name="jetty" depends="compile-src,jetty-stop" description="start the server using the project web-engine folder">
		<java classpath="${toString:jetty.run.path}" classname="com.opengamma.component.OpenGammaComponentServer" fork="true" spawn="${jetty.spawn}">
			<jvmarg value="-Dlogback.configurationFile=${junit.logback}" />
			<jvmarg value="-Dcommandmonitor.port=${jetty.stopport}" />
{'fraction_non_alphanumeric': 0.20478813083061706, 'fraction_numerical': 0.0033719231201528605, 'mean_word_length': 5.119669876203576, 'pattern_counts': {'":': 0, '<': 164, '<?xml version=': 0, '>': 164, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4914166', 'n_tokens_mistral': 3320, 'n_tokens_neox': 3080, 'n_words': 447}