Best way to configure Solr (Ant vs Maven)?

I have a project that is currently built using ant, which pulls the latest version of trunk in Solr via git, and then builds through ant. I'm pretty used to Maven and its dependency system at this point and find our old ant way to make things pretty dirty and hard to maintain. With that said, basically wherever I seem to be watching online, people build solr using Ant, and a few tutorials that I found to work with Maven are all on the lines of this one that doesn't seem to work.

So, to be clear, all I'm looking for here is a clean way to develop a project in Eclipse and deploy it. I am sure that someone must have done this before and should have a good answer. I would be very interested to hear that.

+3
source share
3 answers

I just started working by throwing all the dependencies in Maven, creating my own repo for the attached version of Solr 4.0-SNAPSHOT, copying web.xml from it to src / main / webapp / WEB-INF / and doing things through mvn jetty: run with essential variables passed as arguments like:

mvn jetty:run -Dsolr.dataDir="./solr-data" -Dsolr.master-host="localhost" -Dsolr.solr.home="./solr-home"

, , ant Lucene Solr git, , . , / pom.xml , . , , Solr, .

+3

, , .

Solr, , , :

  • Mavenize Solr (, ). , , , .
  • ant, maven-antrun-plugin. , ( /, ). maven-install-plugin maven-build-helper-plugin.

eclipse . .

, .

+2

Maven, , , Solr. : http://wiki.apache.org/solr/HowToContribute#Maven. , , .

I do work with Solr + Ant and there basically task for everything ant test, ant distand so on. I agree it's a bit old fashioned, but it works. The build has recently been improved by introducing Ivy as a dependency management tool to remove all banks from the source tree.

Let me know if you have specific problems with ant, maybe I can help you.

+2
source

All Articles