-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
56 lines (46 loc) · 2.01 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
plugins {
id "de.undercouch.download" version "1.2"
}
import de.undercouch.gradle.tasks.download.Download
import java.net.*;
import java.io.*;
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
project.ext.javaVersion = '1.7'
project.ext.solrVersion = '4.10.3'
project.ext.slf4jVersion = '1.7.6'
task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
}
repositories {
mavenCentral()
maven {
url "http://maven.restlet.com"
}
}
dependencies {
testCompile "org.apache.solr:solr-test-framework:${solrVersion}"
testCompile "org.apache.lucene:lucene-test-framework:${solrVersion}"
testCompile "junit:junit:4.11"
testCompile "org.hamcrest:hamcrest-all:1.3"
testCompile "org.slf4j:jcl-over-slf4j:${slf4jVersion}"
testCompile "org.slf4j:slf4j-log4j12:${slf4jVersion}"
compile "org.apache.solr:solr-core:${solrVersion}"
compile "org.apache.solr:solr-solrj:${solrVersion}"
compile "org.slf4j:slf4j-api:${slf4jVersion}"
compile "org.apache.commons:commons-lang3:3.3.1"
}
task downloadExampleData {
def file = "${temporaryDir}/data.csv"
def fileStr = file.toString()
download {
src "https://s3.amazonaws.com/bti360/ghosttree/etl-snowball/snowball_50"
dest fileStr
}
println "Downloaded to: $fileStr"
println "Index data via: http://localhost:8983/solr/gt/update/csv?stream.file=${fileStr}&stream.contentType=text/plain;charset=utf-8&commit=true&separator=%09&fieldnames=ip,sslcerts-hostname,sslcerts-certs,sslcerts-first-seen,sslcerts-last-seen,tcp80-response,tcp80-first-seen,tcp80-last-seen,rdns.hostname,rdns.first-seen,rdns.last-seen,network-start-ip,network-mask-length,postal-code,latitude,longitude,anonymous-proxy,satellite-provider,continent-code,continent,country-iso,country,subdivision-iso,subdivision,city,timezone,first-seen,last-seen&f.sslcerts-hostname.split=true&f.sslcerts-hostname.separator=::::&f.sslcerts-certs.separator=::::&f.sslcerts-certs.split=true"
}
jar{
destinationDir file("src/test/resources/solr-conf/lib")
}