refactor some lazy ant copy/paste into more ant idiotmatic

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@728280 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2008-12-20 13:15:22 +00:00
parent 1b46cc7d96
commit fc3eed423b
1 changed files with 8 additions and 14 deletions

View File

@ -571,26 +571,20 @@
<target name="run-example" depends="example"> <target name="run-example" depends="example">
<property name="example.solr.home" location="example/solr"/> <property name="example.solr.home" location="example/solr"/>
<property name="example.data.dir" location="example/solr/data"/> <property name="example.data.dir" location="example/solr/data"/>
<java jar="${example}/start.jar" fork="true" dir="${example}"> <property name="example.debug.suspend" value="n"/>
<condition property="example.jvm.line" value="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${example.debug.suspend},address=5005">
<isset property="example.debug"/>
</condition>
<property name="example.jvm.line" value=""/>
<property name="example.heap.size" value="512M"/>
<java jar="${example}/start.jar" fork="true" dir="${example}" maxmemory="${example.heap.size}">
<jvmarg line="${example.jvm.line}"/>
<sysproperty key="solr.solr.home" file="${example.solr.home}"/> <sysproperty key="solr.solr.home" file="${example.solr.home}"/>
<sysproperty key="solr.data.dir" file="${example.data.dir}"/> <sysproperty key="solr.data.dir" file="${example.data.dir}"/>
</java> </java>
</target> </target>
<target name="run-example-debug" depends="example">
<property name="heap.size" value="512"/>
<property name="suspend" value="n"/>
<property name="example.solr.home" location="example/solr"/>
<property name="example.data.dir" location="example/solr/data"/>
<java jar="${example}/start.jar" fork="true" dir="${example}">
<jvmarg line="-Xmx${heap.size}M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=5005"/>
<sysproperty key="solr.solr.home" file="${example.solr.home}"/>
<sysproperty key="solr.data.dir" file="${example.data.dir}"/>
</java>
</target>
<!-- make a distribution --> <!-- make a distribution -->
<target name="package" depends="generate-maven-artifacts"/> <target name="package" depends="generate-maven-artifacts"/>