Hi,
I am trying to unzip a dependency Zip and include other folders and Zip all together.
But when i do:
into(“newFolder”) {
from configurations.wherehows.collect { zipTree(it) }
}
I realized the folder structure is like:
Zip:
–newFolder:
----FolderFromZip
–bin
–conf
What i expected was:
Zip:
–newFolder (just a rename for FolderFromZip):
–bin
–conf
So right now if i need to find the dependecy i have to go
cd zipFile/newFolder/FolderFromZip/ to get all the content.
I am not sure why bin and conf works fine but zipTree is not.
configurations {
wherehows
}
dependencies {
wherehows spec.product.‘wherehows-proxy’.‘wherehows-kafka’
}
task myTar(type: Tar, dependsOn: tasks.‘generate-static-app-def’) {
extension = "tgz"
compression = Compression.GZIP
into(“newFolder”) {
from configurations.wherehows.collect { zipTree(it) }
}
manifest {
attributes(‘Class-Path’: configurations.wherehows.collect { it.toURI().toString() }.join(’ '),
‘Main-Class’: ‘wherehows.main.ApplicationStart’)
}
// Must also include the app-def file for JVML.
into(".") {
from tasks.‘generate-static-app-def’.artifact.file
}
into(“bin”) {
from(“bin”)
}
into(“conf”) {
from(“conf”)
fileMode = 0600
}
into(“jobs”) {
from(“jobs”)
fileMode = 0600
}
}