You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2008/12/20 07:21:59 UTC
svn commit: r728244 - /lucene/solr/trunk/build.xml
Author: ehatcher
Date: Fri Dec 19 22:21:58 2008
New Revision: 728244
URL: http://svn.apache.org/viewvc?rev=728244&view=rev
Log:
Add convenience target to run example Solr with remote debugging enabled
Modified:
lucene/solr/trunk/build.xml
Modified: lucene/solr/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/build.xml?rev=728244&r1=728243&r2=728244&view=diff
==============================================================================
--- lucene/solr/trunk/build.xml (original)
+++ lucene/solr/trunk/build.xml Fri Dec 19 22:21:58 2008
@@ -578,6 +578,19 @@
</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 -->
<target name="package" depends="generate-maven-artifacts"/>
Re: svn commit: r728244 - /lucene/solr/trunk/build.xml
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 20, 2008, at 1:45 AM, Chris Hostetter wrote:
> : Add convenience target to run example Solr with remote debugging
> enabled
>
> There seems to be a lot of cut/paste in this commit .. wouldn't an ant
> macro come in handy here to eliminate some duplication with "run-
> example"?
>
> (You should check out the "Ant in Action" book ... I think it has a
> chapter on writing ant macros)
Ha! zing.
Well, 10-lines or so, a lot?!.... but point taken about a little copy/
paste action. I've got a copy or three of that book around here
somewhere (in Chinese, Korean, and English). Adding a macro won't
reduce clarity or lines of code though.
Erik
Re: svn commit: r728244 - /lucene/solr/trunk/build.xml
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 20, 2008, at 1:45 AM, Chris Hostetter wrote:
> (You should check out the "Ant in Action" book ... I think it has a
> chapter on writing ant macros)
I live indirection as much as the next guy.
I took your challenge and refactored to something a bit more fun than
macros.
ant run-example
- and -
ant run-example -Dexample.debug=true
or control the entire JVM line:
ant example -Dexample.jvm.line=....
or just the heap size:
ant example -Dexample.heap.size=2048M
I just need to set a new solr home most of the time, so I have a
build.properties file (that common-build.xml picks up) that has:
example.solr.home=/Users/erikhatcher/dev/solr/contrib/velocity/src/
main/solr/
And I just "ant run-example [-Dexample.debug=true]"
Erik
Re: svn commit: r728244 - /lucene/solr/trunk/build.xml
Posted by Chris Hostetter <ho...@fucit.org>.
: Add convenience target to run example Solr with remote debugging enabled
There seems to be a lot of cut/paste in this commit .. wouldn't an ant
macro come in handy here to eliminate some duplication with "run-example"?
(You should check out the "Ant in Action" book ... I think it has a
chapter on writing ant macros)
-Hoss