Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

295 lines (243 sloc) 8.895 kb
description = 'Impala'
allprojects {
group = "org.springframework.data.hadoop.impala"
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'eclipse'
apply from: "${rootProject.projectDir}/maven.gradle"
repositories {
maven { url "http://repo.springsource.org/libs-milestone" }
}
dependencies {
compile ("org.apache.hadoop:hadoop-core:$hadoopVersion", optional)
compile ("org.springframework.data:spring-data-hadoop:$shdpVersion") {
exclude module: "hbase"
}
compile "org.springframework.shell:spring-shell:$springShellVersion"
testCompile "junit:junit:$junitVersion"
testCompile "org.springframework:spring-test:$springVersion"
}
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
configure(subprojects) { subproject ->
jar {
manifest.attributes['Implementation-Title'] = rootProject.name + " " + subproject.name
manifest.attributes['Implementation-Version'] = subproject.version
from("${rootProject.projectDir}/docs/info") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
//baseName = "spring-impala"
//appendix = subproject.name
}
javadoc {
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
options.overview = "${rootProject.projectDir}/docs/api/overview.html"
}
task sourcesJar(type: Jar, dependsOn:classes) {
//baseName = "spring-impala"
//appendix = subproject.name
classifier = 'sources'
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
//baseName = "spring-impala"
//appendix = subproject.name
classifier = 'javadoc'
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
}
}
project('plugin-common') {
description = 'Impala Common plugin'
}
project('plugin-hdfs') {
description = 'Impala HDFS plugin'
dependencies {
compile project(':plugin-common')
compile "javax.ws.rs:jsr311-api:$jsr311Version"
}
}
project('plugin-mapreduce') {
description = 'Impala MapReduce plugin'
dependencies {
compile project(':plugin-common')
}
}
project('plugin-hive') {
description = 'Impala Hive plugin'
dependencies {
compile project(':plugin-common')
compile("org.springframework:spring-jdbc:$springVersion")
compile("org.apache.hive:hive-service:$hiveVersion") {
exclude module: "antlr"
exclude module: "org.antlr"
exclude module: "antlr-runtime"
exclude module: "jline"
}
}
}
project('plugin-pig') {
description = 'Impala Pig plugin'
dependencies {
compile project(':plugin-common')
compile("org.apache.pig:pig:$pigVersion")
compile("org.springframework:spring-tx:$springVersion")
compile "org.antlr:antlr-runtime:3.4"
}
}
project('plugin-r') {
description = 'Impala R plugin'
}
configure(rootProject) {
description = 'Impala'
// apply plugin: 'docbook-reference'
// reference {
// sourceDir = file('docs/reference/docbook')
// }
// don't publish the default jar for the root project
configurations.archives.artifacts.clear()
task api(type: Javadoc) {
group = 'Documentation'
description = 'Generates aggregated Javadoc API documentation.'
title = "${rootProject.description} ${version} API"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.overview = 'docs/api/overview.html'
options.splitIndex = true
options.links(
"http://download.oracle.com/javase/6/docs/api",
"http://static.springframework.org/spring/docs/3.1.x/javadoc-api",
"http://static.springframework.org/spring-hadoop/docs/current/api",
"http://static.springsource.org/spring-batch/apidocs/",
"http://hadoop.apache.org/common/docs/current/api/"
)
source subprojects.collect { project ->
project.sourceSets.main.allJava
}
destinationDir = new File(buildDir, "api")
classpath = files(subprojects.collect { project ->
project.sourceSets.main.compileClasspath
})
maxMemory = '1024m'
}
task docsZip(type: Zip) {
group = 'Distribution'
classifier = 'docs'
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at static.springframework.org/impala/docs."
from('docs/info') {
include 'changelog.txt'
}
from (api) {
into 'api'
}
// from (reference) {
// into 'reference'
// }
}
task distroZip(type: Zip, dependsOn: [docsZip]) {
group = 'Distribution'
classifier = 'dist'
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
ext.baseDir = "${project.name}-${project.version}";
from('docs/info') {
include 'readme.txt'
include 'license.txt'
include 'notice.txt'
into "${baseDir}"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}
subprojects.each { subproject ->
into ("${baseDir}/dist") {
from subproject.jar
if (subproject.tasks.findByPath('sourcesJar')) {
from subproject.sourcesJar
}
if (subproject.tasks.findByPath('javadocJar')) {
from subproject.javadocJar
}
}
}
}
// Create an distribution that contains all dependencies (required and optional).
// Not published by default; only for use when building from source.
task depsZip(type: Zip, dependsOn: distroZip) { zipTask ->
group = 'Distribution'
classifier = 'dist-with-deps'
description = "Builds -${classifier} archive, containing everything " +
"in the -${distroZip.classifier} archive plus all runtime dependencies."
from zipTree(distroZip.archivePath)
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(":${zipTask.name}")) {
def projectNames = rootProject.subprojects*.name
def artifacts = new HashSet()
subprojects.each { subproject ->
subproject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
def dependency = artifact.moduleVersion.id
if (!projectNames.contains(dependency.name)) {
artifacts << artifact.file
}
}
}
zipTask.from(artifacts) {
into "${distroZip.baseDir}/deps"
}
}
}
}
apply plugin: 'application'
mainClassName = "org.springframework.shell.Bootstrap"
startScripts {
classpath = files("foobarbaz")
doLast {
def text = unixScript.getText("utf-8")
def changed = text.replaceAll("foobarbaz", java.util.regex.Matcher.quoteReplacement(':$APP_HOME/lib/*'))
unixScript.write(changed)
def winText = windowsScript.getText("utf-8")
def changedWin = winText.replaceAll("foobarbaz", java.util.regex.Matcher.quoteReplacement(';%APP_HOME%\\lib\\*'))
windowsScript.write(changedWin)
}
}
configurations { dist }
dependencies {
dist subprojects
}
applicationDistribution.with {
into("lib") {
from file('plugin-common/src/main/resources/log4j.properties')
from configurations.dist
}
}
task runtimeZip(type: Zip, dependsOn: [installApp]) {
group = 'Distribution'
classifier = 'runtime'
description = "Builds -${classifier} archive, bundling the project as a JVM application with libs and OS specific scripts."
ext.baseDir = "${project.name}-${project.version}";
from("${project.buildDir}/install/") {
}
}
artifacts {
archives docsZip
archives distroZip
archives runtimeZip
}
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.2'
}
}
defaultTasks 'build'
Jump to Line
Something went wrong with that request. Please try again.