Skip to content

Commit

Permalink
Wikipedia River: A river to index wikipedia, closes elastic#403.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Oct 3, 2010
1 parent 425744e commit c4d1786
Show file tree
Hide file tree
Showing 21 changed files with 1,227 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/kimchy.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules/elasticsearch-root.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/modules/plugin-river-wikipedia.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

136 changes: 136 additions & 0 deletions plugins/river/wikipedia/build.gradle
@@ -0,0 +1,136 @@
dependsOn(':elasticsearch')

apply plugin: 'java'
apply plugin: 'maven'

archivesBaseName = "elasticsearch-river-wikipedia"

explodedDistDir = new File(distsDir, 'exploded')

manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::River::Wikipedia", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr)

configurations.compile.transitive = true
configurations.testCompile.transitive = true

// no need to use the resource dir
sourceSets.main.resources.srcDirs 'src/main/java'
sourceSets.test.resources.srcDirs 'src/test/java'

// add the source files to the dist jar
//jar {
// from sourceSets.main.allJava
//}

configurations {
dists
distLib {
visible = false
transitive = false
}
}

dependencies {
compile project(':elasticsearch')

testCompile project(':test-testng')
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
testCompile 'org.hamcrest:hamcrest-all:1.1'
}

test {
useTestNG()
jmvArgs = ["-ea", "-Xmx1024m"]
suiteName = project.name
listeners = ["org.elasticsearch.util.testng.Listeners"]
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
}

task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
[explodedDistDir]*.mkdirs()

copy {
from configurations.distLib
into explodedDistDir
}

// remove elasticsearch files (compile above adds the elasticsearch one)
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*.jar") }

copy {
from libsDir
into explodedDistDir
}

ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-javadoc.jar") }
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-sources.jar") }
}

task zip(type: Zip, dependsOn: ['explodedDist']) {
from(explodedDistDir) {
}
}

task release(dependsOn: [zip]) << {
ant.delete(dir: explodedDistDir)
copy {
from distsDir
into(new File(rootProject.distsDir, "plugins"))
}
}

configurations {
deployerJars
}

dependencies {
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
}

uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: rootProject.mavenRepoUrl) {
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
}
snapshotRepository(url: rootProject.mavenSnapshotRepoUrl) {
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
}

pom.project {
inceptionYear '2009'
name 'elasticsearch-plugins-river-wikipedia'
description 'Attachments Plugin for ElasticSearch'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
connection 'git://github.com/elasticsearch/elasticsearch.git'
developerConnection 'git@github.com:elasticsearch/elasticsearch.git'
url 'http://github.com/elasticsearch/elasticsearch'
}
}

pom.whenConfigured {pom ->
pom.dependencies = pom.dependencies.findAll {dep -> dep.scope != 'test' } // removes the test scoped ones
}
}
}
2 changes: 2 additions & 0 deletions plugins/river/wikipedia/src/main/java/es-plugin.properties
@@ -0,0 +1,2 @@
plugin=org.elasticsearch.plugin.river.wikipedia.WikipediaRiverPlugin

@@ -0,0 +1,40 @@
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.elasticsearch.plugin.river.wikipedia;

import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.plugins.AbstractPlugin;

/**
* @author kimchy (shay.banon)
*/
public class WikipediaRiverPlugin extends AbstractPlugin {

@Inject public WikipediaRiverPlugin() {
}

@Override public String name() {
return "river-wikipedia";
}

@Override public String description() {
return "River Wikipedia Plugin";
}
}

0 comments on commit c4d1786

Please sign in to comment.