Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
release of 2.2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jprante committed Mar 6, 2016
1 parent 01103e1 commit ca066b8
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 383 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ zh-tw

| Elasticsearch | Plugin | Release date |
| -------------- | -------------- | ------------ |
| 2.2.0 | 2.2.0.1 | Mar 6, 2016 |
| 2.1.1 | 2.1.1.0 | Dec 20, 2015 |
| 2.1.0 | 2.1.0.0 | Dec 15, 2015 |
| 2.0.1 | 2.0.1.0 | Dec 15, 2015 |
Expand All @@ -98,7 +99,7 @@ zh-tw

## Installation Elasticsearch 2.x

./bin/plugin install http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-langdetect/2.1.1.0/elasticsearch-langdetect-2.1.1.0-plugin.zip
./bin/plugin install https://github.com/jprante/elasticsearch-langdetect/releases/download/2.2.0.1/elasticsearch-langdetect-2.2.0.1-plugin.zip

## Installation Elasticsearch 1.x

Expand Down
105 changes: 56 additions & 49 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@

def xbibGroup = 'org.xbib.elasticsearch.plugin'
def xbibVersion = '2.1.1.0'

group = xbibGroup
version = xbibVersion

println "Current JVM: " + org.gradle.internal.jvm.Jvm.current()
group = 'org.xbib.elasticsearch.plugin'
version = '2.2.0.1'

ext {
pluginName = 'langdetect'
pluginClassname = 'org.xbib.elasticsearch.plugin.langdetect.LangdetectPlugin'
pluginDescription = 'Language detection for Elasticsearch'
user = 'jprante'
name = 'elasticsearch-langdetect'
scmUrl = 'https://github.com/' + user + '/' + name
scmConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git'
scmDeveloperConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git'
versions = [
'log4j': '2.5',
'junit' : '4.12',
'elasticsearch' : '2.1.1',
'jackson': '2.6.2'
'elasticsearch' : '2.2.0',
'jackson': '2.6.2',
'log4j': '2.5',
'junit' : '4.12'
]
}

buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "http://xbib.org/repository"
}
}
dependencies {
classpath 'org.ajoberstar:gradle-git:1.4.2'
classpath 'co.riiid:gradle-github-plugin:0.4.2'
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3'
}
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'co.riiid.gradle'

repositories {
mavenCentral()
mavenLocal()
mavenCentral()
jcenter()
maven {
url "http://xbib.org/repository"
Expand All @@ -42,19 +59,22 @@ sourceSets {
}
}
configurations {
providedCompile
releaseJars
wagon
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
releaseJars {
extendsFrom runtime
exclude group: 'org.elasticsearch'
exclude module: 'jna'
exclude module: 'jackson-core'
exclude module: 'jackson-dataformat-smile'
exclude module: 'jackson-dataformat-yaml'
}
}

dependencies {
compile "org.elasticsearch:elasticsearch:${versions.elasticsearch}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
releaseJars("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}") {
exclude module: "jackson-core"
}
testCompile "junit:junit:${versions.junit}"
testCompile "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}"
testCompile "org.apache.logging.log4j:log4j-core:${versions.log4j}"
Expand All @@ -63,13 +83,11 @@ dependencies {
wagon 'org.apache.maven.wagon:wagon-ssh-external:2.10'
}

compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
sourceCompatibility = 1.7
targetCompatibility = 1.7

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
options.compilerArgs << "-Xlint:unchecked,deprecation"
}

test {
Expand Down Expand Up @@ -102,7 +120,7 @@ task buildPluginZip(type: Zip, dependsOn: [':jar', ':makePluginDescriptor']) {
from files(libsDir)
from configurations.releaseJars
from 'build/tmp/plugin'
classifier = 'plugin'
classifier 'plugin'
}

task unpackPlugin(type: Copy, dependsOn: [':buildPluginZip']) {
Expand Down Expand Up @@ -130,6 +148,12 @@ check.dependsOn integrationTest

clean {
delete "plugins"
delete "logs"
}

task javadocJar(type: Jar, dependsOn: classes) {
from javadoc
classifier 'javadoc'
}

task sourcesJar(type: Jar, dependsOn: classes) {
Expand All @@ -138,31 +162,14 @@ task sourcesJar(type: Jar, dependsOn: classes) {
}

artifacts {
archives sourcesJar
archives buildPluginZip
archives javadocJar, sourcesJar, buildPluginZip
}

uploadArchives {
repositories {
if (project.hasProperty("xbibUsername")) {
mavenDeployer {
configuration = configurations.wagon
repository(
id: 'xbib.org',
url: uri('scpexe://xbib.org/repository'),
authentication: [userName: xbibUsername, privateKey: xbibPrivateKey]
)
pom.project {
inceptionYear '2012'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
}
}
signing {
sign configurations.archives
}

ext.grgit = org.ajoberstar.grgit.Grgit.open()

apply from: 'gradle/git.gradle'
apply from: 'gradle/publish.gradle'
8 changes: 8 additions & 0 deletions gradle/git.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

task gitRelease(dependsOn: build) << {
grgit.add(patterns: ['.'], update: true)
grgit.commit(message: "release of ${project.version}")
grgit.tag.add(name: project.version)
grgit.push()
grgit.push(tags: true)
}
86 changes: 86 additions & 0 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
apply plugin: 'io.codearte.nexus-staging'


/*
nexus {
attachJavadoc = true
attachSources = true
attachTests = true
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
}
*/

nexusStaging {
packageGroup = "org.xbib"
}

uploadArchives {
repositories {
if (project.hasProperty("xbibUsername")) {
mavenDeployer {
configuration = configurations.wagon
repository(id: 'xbib.org',
url: uri('scpexe://xbib.org/repository'),
authentication: [userName: xbibUsername, privateKey: xbibPrivateKey])
}
}
if (project.hasProperty('ossrhUsername')) {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(id: 'ossrh', url: uri(ossrhReleaseUrl),
authentication: [userName: ossrhUsername, password: ossrhPassword])
snapshotRepository(id: 'ossrh', url: uri(ossrhSnapshotUrl),
authentication: [userName: ossrhUsername, password: ossrhPassword])
pom.project {
name pluginName
description pluginDescription
packaging 'jar'
inceptionYear '2012'
url url
organization {
name 'xbib'
url 'http://xbib.org'
}
developers {
developer {
id user
name 'Jörg Prante'
email '[email protected]'
url 'https://github.com/jprante'
}
}
scm {
url scmUrl
connection scmConnection
developerConnection scmDeveloperConnection
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}
}
}
}

if (project.hasProperty('githubToken')) {
github {
owner = user
token = githubToken
repo = project.name
name = project.version
tagName = project.version
targetCommitish = 'master'
assets = [
"build/distributions/${project.name}-${project.version}-plugin.zip"
]
}
githubRelease {
dependsOn gitRelease, buildPluginZip
}
}
Loading

0 comments on commit ca066b8

Please sign in to comment.