Created
October 28, 2013 12:57
-
-
Save orangeclover/7196371 to your computer and use it in GitHub Desktop.
GradleからPostgreSQL StudioのWarファイルをダウロードしてJetty上で動作させる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'war' | |
apply plugin: 'jetty' | |
war { | |
baseName = 'pgstudio' | |
archiveName = "pgstudio.war" | |
from 'war' | |
} | |
httpPort = 8080 | |
stopPort = 9451 | |
stopKey = 'foo' | |
def zipFile ='' | |
task downloadZip(type: MyDownload) { | |
sourceUrl = 'http://www.postgresqlstudio.org/?ddownload=839' | |
target = file("${temporaryDir}/pgstudio.war") | |
zipFile = target | |
} | |
class MyDownload extends DefaultTask { | |
@Input | |
String sourceUrl | |
@OutputFile | |
File target | |
@TaskAction | |
void download() { | |
ant.get(src: sourceUrl, dest: target) | |
} | |
} | |
task unzip(type: Copy) { | |
def outputDir = file("build/libs") | |
from zipTree(zipFile) | |
into outputDir | |
} | |
task deploy { | |
dependsOn downloadZip,unzip | |
} | |
task warRun { | |
war.enabled = false | |
dependsOn jettyRunWar | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
説明を書いてるブログはこちら。
『GradleからPostgreSQL StudioのWarファイルをダウロードしてJetty上で動作させる』 http://orangeclover.hatenablog.com/entry/2013/10/28/222719