[2.0] Start some webapp/war (solr) on 'run'

43 views
Skip to first unread message

Martin Grotzke

unread,
Jan 3, 2013, 4:33:52 AM1/3/13
to play-fr...@googlegroups.com
Hi,

we're developing a play 2 application that makes use of solr for searching.
For development I want to start solr in some servlet container (e.g.
jetty) when play is started via 'run'.

I found the xsbt-web-plugin
(https://github.com/JamesEarlDouglas/xsbt-web-plugin) but struggle to
integrate it in our build and connect it with the run task.

Has anyone done s.th. like this already and can help to achieve this?

TIA && cheers,
Martin

signature.asc

El Softwarerero (the player formerly known as sun)

unread,
Jan 6, 2013, 4:18:21 PM1/6/13
to play-fr...@googlegroups.com, martin....@googlemail.com
I have never used SOLR so I am not sure if it wraps Lucene calls. In case you're only interacting with Lucene you can run it embedded in you Play app. BTW: The same works with elasticsearch.

Guillaume Bort

unread,
Jan 7, 2013, 5:50:35 AM1/7/13
to play-fr...@googlegroups.com
I would do something like:

playOnStarted <+= baseDirectory { root =>
    (_: java.net.InetSocketAddress) => <x>{root}/something-like-solr/bin/start</x> !
},

playOnStopped <+= baseDirectory { root =>
    () => <x>{root}/something-like-solr/bin/stop</x> !
}
--
Guillaume Bort, http://guillaume.bort.fr
Reply all
Reply to author
Forward
0 new messages