Giter Site home page Giter Site logo

sbt-solr-plugin's Introduction

SBT Solr Plugin

SBT plugin for Solr projects. Downloads and constructs a Solr context to contain specified conf files.

Usage

Plugins file:

import sbt._

class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
  val guardian = "Guardian GitHub" at "http://guardian.github.com/maven/repo-releases"
  val solr = "com.gu" % "sbt-solr-plugin" % "0.2"
}

Project file:

import sbt._
import com.gu.solr.SolrProject

class MyProject(info: ProjectInfo) extends SolrProject(info) {
...
}

Put your Solr conf directory in src/main/solr. This is copied on prepare-webapp and forms the Solr home for the container.

Use jetty-run to start. Uses port 8983 by default, override by changing jettyPort in your project definition. Hangs off a /solr context in Jetty, so URLs are the same as a Solr started with start.jar. You can change this context by overriding jettyContextPath in your project definition.

At present, defaults to Solr 1.4.1. Change this by overriding solrVersion in your project definition. You will also need to place a copy of the Solr war for this version in a repository somewhere with the group identifier org.apache.solr and artifact identifier solr-webapp. You will also need to rename the war from solr.war to solr-webapp-[version].war. This repository will have to be added to your project definition.

You can get a development trunk build of Solr 4.0 by using:

  val guardian_github = "Guardian GitHub" at "http://guardian.github.com/maven/repo-snapshots"
  override def solrVersion = "4.0-trunk-build-1343"

Gotchas

Developing with jetty-run, ~prepare-webapp may not work as expected. You may want to jetty-restart instead.

Add the following to your src/main/solr/conf/solrconfig.xml if you want to specify a index directory outside of target. And you do want to do this or prepare-webapp will hose your index each time.

 <dataDir>${solr.data.dir}</dataDir>

sbt-solr-plugin's People

Contributors

daithiocrualaoich avatar

Watchers

Martin Grotzke avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.