summaryrefslogtreecommitdiff
path: root/packages/maven3/build.gradle
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2016-10-23 19:45:34 +0200
committerYves Fischer <yvesf-git@xapek.org>2016-10-23 19:45:34 +0200
commit74ad736656b986942d99667394b5462975c26304 (patch)
tree67d5c504c88948e8971f514d88d606cdf3781f3b /packages/maven3/build.gradle
parentc015b891ac4cebdf7b1ce6038490df321a135738 (diff)
downloaddebian-packages-74ad736656b986942d99667394b5462975c26304.tar.gz
debian-packages-74ad736656b986942d99667394b5462975c26304.zip
refactor buildscripts to use de.undercouch.download for dowload and verify
Diffstat (limited to 'packages/maven3/build.gradle')
-rw-r--r--packages/maven3/build.gradle25
1 files changed, 11 insertions, 14 deletions
diff --git a/packages/maven3/build.gradle b/packages/maven3/build.gradle
index 7cd1db3..da89ff3 100644
--- a/packages/maven3/build.gradle
+++ b/packages/maven3/build.gradle
@@ -1,24 +1,21 @@
-import org.xapek.yvesf.gradle.DownloadTask
-
version '3.3.9'
-task download(type: DownloadTask) {
- source "http://mirror.switch.ch/mirror/apache/dist/maven/maven-3/${version}/binaries/apache-maven-${version}-bin.tar.gz"
- sha256sum '6e3e9c949ab4695a204f74038717aa7b2689b1be94875899ac1b3fe42800ff82'
-}
+final download = makeDownloadTask(
+ url: "https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-${version}-bin.tar.gz",
+ sha256: '6e3e9c949ab4695a204f74038717aa7b2689b1be94875899ac1b3fe42800ff82')
task unpack(type: Copy) {
- from tarTree(download.destFile)
- into file("${buildDir}/unpacked/dist")
- eachFile { FileCopyDetails fcd ->
- fcd.path = fcd.path.substring(path.indexOf('/')+1)
- }
+ from tarTree(download.dest)
+ into file("${buildDir}/unpacked/dist")
+ eachFile { FileCopyDetails fcd ->
+ fcd.path = fcd.path.substring(path.indexOf('/') + 1)
+ }
}
unpack.dependsOn(download)
ospackage {
- into "/opt/${project.name}"
- from unpack.outputs.files
+ into "/opt/${project.name}"
+ from unpack.outputs.files
}
-activator.bin['mvn'] = "/opt/${project.name}/bin/mvn" \ No newline at end of file
+activator.bin['mvn'] = "/opt/${project.name}/bin/mvn"