From 7dc806fd4fac07aa98fd5c512b81f053012b56f1 Mon Sep 17 00:00:00 2001 From: Chris Bethune Date: Wed, 18 Feb 2015 14:09:30 -0500 Subject: [PATCH] Update download links to v0.5 packaged distributions tiles-quickstart is now build into a .war instead of a zipped project directory. Added changes to quick-start guide for .war. - Copy renaming of Tile Client Template over to Download page - Update URL of downloadable asset - Minor edits to Quick Start --- .gitignore | 2 +- build.gradle | 16 ++++++++------ tile-examples/julia-demo/build.gradle | 22 ++++++++++++------- .../julia-demo/src/main/resources/.gitignore | 1 + 4 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 tile-examples/julia-demo/src/main/resources/.gitignore diff --git a/.gitignore b/.gitignore index 17f31b95..8803c126 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,5 @@ test-output .gradle bin */**/coverage -tile-quickstart.zip +tile-quickstart.war out/* diff --git a/build.gradle b/build.gradle index f4095fee..17767047 100644 --- a/build.gradle +++ b/build.gradle @@ -256,7 +256,6 @@ addSparkJar org.apache.hbase hbase-client $hbaseVersion""" copyTileRenderingToExploded.inputs.dir TILE_RENDERING_BUILD copyTileRenderingToExploded.outputs.dir EXPLODED_LIBS - // Copy binning-utilities jar into the exploded war task copyBinningUtilToExploded(type: Copy) { from fileTree(BINNING_UTIL_BUILD).include("*.jar") @@ -337,15 +336,18 @@ addSparkJar org.apache.hbase hbase-client $hbaseVersion""" // configure the war task to pick up the tile client build files war { - doLast { - ant.unzip(src: war.archivePath, dest: EXPLODED_DIR) - copyClientJsToExploded.execute() - copyClientCssToExploded.execute() - } + from fileTree(TILE_CLIENT_BUILD).include(["*.js", "*.css"]) } // install to ensure everything is ready for debug hotswap builds war.dependsOn ":tile-client:install" + task explodeWar() { + doLast { + ant.unzip(src: war.archivePath, dest: EXPLODED_DIR) + } + } + explodeWar.dependsOn war + // Jetty Exploded War // Configure the jetty run task jettyRun { @@ -356,7 +358,7 @@ addSparkJar org.apache.hbase hbase-client $hbaseVersion""" webAppSourceDirectory = file(EXPLODED_DIR) } jettyRun.dependsOn watchThread - jettyRun.dependsOn war + jettyRun.dependsOn explodeWar } } } diff --git a/tile-examples/julia-demo/build.gradle b/tile-examples/julia-demo/build.gradle index 68e0f73c..5d5a1cc1 100644 --- a/tile-examples/julia-demo/build.gradle +++ b/tile-examples/julia-demo/build.gradle @@ -12,20 +12,26 @@ apply plugin: "jetty" // can inject client build setup ext.clientProject = true -// task to zip up this example as the quickstart app -task zipProjectAsQuickstart(type: Zip) { - from "${projectDir}" - exclude "build", "*.iml", "README.md" - destinationDir file( rootDir.getPath() ) - archiveName "tile-quickstart.zip" +// Task to copy the .war file and rename to 'tile-quickstart.war' +// This is hacky because gradle does not like it if you try to copy into +// the rootdir using a Copy task on Windows. See: +// http://forums.gradle.org/gradle/topics/error-with-a-copy-task-on-windows +task createQuickstart() { + doLast { + ant.copy( file: war.archivePath, todir: rootDir ) { + } + file( "${rootDir}/"+war.archiveName ).renameTo(file( "${rootDir}/tile-quickstart.war" )) + } } +createQuickstart.dependsOn war + // create tiles-quickstart.zip on intall -install.dependsOn zipProjectAsQuickstart +install.dependsOn createQuickstart // task to delete the quickstart zip task deleteQuickstart(type: Delete) { - File quickstart = file( rootDir.getPath() + "/tile-quickstart.zip" ); + File quickstart = file( "${rootDir}/tile-quickstart.war" ); delete( quickstart ) } diff --git a/tile-examples/julia-demo/src/main/resources/.gitignore b/tile-examples/julia-demo/src/main/resources/.gitignore new file mode 100644 index 00000000..6f66c74b --- /dev/null +++ b/tile-examples/julia-demo/src/main/resources/.gitignore @@ -0,0 +1 @@ +*.zip \ No newline at end of file