OpenSearch/plugins/mapper/attachments/build.gradle

140 lines
3.9 KiB
Groovy
Raw Normal View History

dependsOn(':elasticsearch')
2010-04-02 08:47:27 -04:00
apply plugin: 'java'
2010-04-02 12:08:33 -04:00
apply plugin: 'maven'
2010-04-25 16:01:00 -04:00
archivesBaseName = "elasticsearch-mapper-attachments"
explodedDistDir = new File(distsDir, 'exploded')
2010-04-25 16:01:00 -04:00
manifest.mainAttributes("Implementation-Title": "ElasticSearch::Plugins::Mapper::Attachments", "Implementation-Version": rootProject.version, "Implementation-Date": buildTimeStr)
2010-03-29 05:45:13 -04:00
configurations.compile.transitive = true
configurations.testCompile.transitive = true
// no need to use the resource dir
2010-04-20 18:17:19 -04:00
sourceSets.main.resources.srcDirs 'src/main/java'
sourceSets.test.resources.srcDirs 'src/test/java'
2010-04-01 16:06:11 -04:00
// add the source files to the dist jar
//jar {
// from sourceSets.main.allJava
//}
2010-04-01 16:05:05 -04:00
2010-03-29 05:45:13 -04:00
configurations {
dists
distLib {
visible = false
transitive = false
}
}
dependencies {
compile project(':elasticsearch')
2010-04-05 19:20:47 -04:00
compile('org.apache.tika:tika-app:0.7') { transitive = false }
distLib('org.apache.tika:tika-app:0.7') { transitive = false }
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"]
2010-04-02 08:47:27 -04:00
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 {
2010-03-29 05:45:13 -04:00
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
}
2010-04-09 11:19:37 -04:00
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-javadoc.jar") }
ant.delete { fileset(dir: explodedDistDir, includes: "elasticsearch-*-sources.jar") }
}
2010-04-02 08:47:27 -04:00
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"))
}
}
2010-04-02 14:24:28 -04:00
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
}
2010-04-02 12:08:33 -04:00
uploadArchives {
repositories.mavenDeployer {
2010-04-02 14:24:28 -04:00
configuration = configurations.deployerJars
2010-04-14 01:34:47 -04:00
repository(url: rootProject.mavenRepoUrl) {
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
2010-04-02 14:24:28 -04:00
}
2010-04-14 01:34:47 -04:00
snapshotRepository(url: rootProject.mavenSnapshotRepoUrl) {
authentication(userName: rootProject.mavenRepoUser, password: rootProject.mavenRepoPass)
2010-04-02 14:24:28 -04:00
}
2010-04-02 12:08:33 -04:00
pom.project {
inceptionYear '2009'
2010-04-27 16:54:30 -04:00
name 'elasticsearch-plugins-mapper-attachments'
2010-04-02 12:08:33 -04:00
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
}
}
}