azkaban-aplcache
Changes
azkaban-db/build.gradle 30(+30 -0)
azkaban-solo-server/build.gradle 2(+1 -1)
settings.gradle 1(+0 -1)
Details
azkaban-db/build.gradle 30(+30 -0)
diff --git a/azkaban-db/build.gradle b/azkaban-db/build.gradle
index 50379a6..3acd356 100644
--- a/azkaban-db/build.gradle
+++ b/azkaban-db/build.gradle
@@ -14,6 +14,7 @@
* the License.
*
*/
+apply plugin: 'distribution'
dependencies {
@@ -27,3 +28,32 @@ dependencies {
testCompile('org.mockito:mockito-all:1.10.19')
testRuntime('com.h2database:h2:1.4.193')
}
+
+
+/**
+ * concat task
+ * Concatenate all the sql queries / files (except update.*.sql) and collect it into a single
+ * SQL file.
+ */
+task concat() << {
+ ext.destFile = 'build/sql/create-all-sql-' + version + '.sql';
+ ant.concat(destfile: destFile, fixlastline: 'yes') {
+ logger.info('Concating create scripts to ' + destFile)
+ fileset(dir: 'src/main/sql') {
+ exclude(name: 'database.properties')
+ }
+ }
+}
+
+installDist.dependsOn concat
+distTar.dependsOn concat
+distZip.dependsOn concat
+
+distributions {
+ main {
+ contents {
+ from('src/main/sql')
+ from("$buildDir/sql")
+ }
+ }
+}
azkaban-solo-server/build.gradle 2(+1 -1)
diff --git a/azkaban-solo-server/build.gradle b/azkaban-solo-server/build.gradle
index 13e3dc9..f1bb54b 100644
--- a/azkaban-solo-server/build.gradle
+++ b/azkaban-solo-server/build.gradle
@@ -35,7 +35,7 @@ distributions {
from(jar) {
into 'lib'
}
- from(project(':azkaban-sql').files('src/sql')) {
+ from(project(':azkaban-db').files('src/main/sql')) {
into('sql')
}
// Get the files from sub-dir of distribution of another sub-project
settings.gradle 1(+0 -1)
diff --git a/settings.gradle b/settings.gradle
index caa8add..24c7ff0 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -21,6 +21,5 @@ include 'azkaban-common'
include 'azkaban-exec-server'
include 'azkaban-hadoop-security-plugin'
include 'azkaban-solo-server'
-include 'azkaban-sql'
include 'azkaban-web-server'
include 'azkaban-test'