This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add profile to functional-test to run against wildfly 8
- Loading branch information
Patrick Huang
committed
Sep 15, 2014
1 parent
2ef538c
commit e83adb0
Showing
4 changed files
with
661 additions
and
65 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
def download(String address, File destFile) { | ||
def file = new FileOutputStream(destFile) | ||
def out = new BufferedOutputStream(file) | ||
out << new URL(address).openStream() | ||
out.close() | ||
} | ||
|
||
def mojarraUrl = "http://sourceforge.net/projects/zanata/files/wildfly/wildfly-8.1.0.Final-module-mojarra-2.1.28.zip/download" | ||
def hibernateUrl = "http://sourceforge.net/projects/zanata/files/wildfly/wildfly-8.1.0.Final-module-hibernate-main-4.2.15.Final.zip/download" | ||
|
||
File mojarraZip = new File(project.build.directory, "mojarra.zip") | ||
File hibernateZip = new File(project.build.directory, "hibernate.zip") | ||
|
||
download(mojarraUrl, mojarraZip) | ||
download(hibernateUrl, hibernateZip) | ||
|
||
|
||
def ant = new AntBuilder() | ||
|
||
def mojarraModuleDest = project.build.directory + "/mojarra" | ||
ant.unzip(src: mojarraZip.absolutePath, dest: mojarraModuleDest, overwrite: "true" ) | ||
def hibernateModuleDest = project.build.directory + "/hibernate" | ||
ant.unzip(src: hibernateZip.absolutePath, dest: hibernateModuleDest, overwrite: "true" ) | ||
|
||
File wildFlyInstallRoot = new File(project.properties['cargo.extract.dir']) | ||
def dirFilter = { | ||
it.isDirectory(); | ||
} as FileFilter | ||
|
||
def listSubDirs = { File it -> | ||
it.listFiles(dirFilter) | ||
} | ||
|
||
def subDirs = listSubDirs(wildFlyInstallRoot) | ||
File wildFlyRoot; | ||
while (subDirs.size() == 1) { | ||
wildFlyRoot = subDirs[0] | ||
subDirs = listSubDirs(wildFlyRoot) | ||
} | ||
|
||
assert wildFlyRoot != null | ||
println "Wild Fly root is at $wildFlyRoot" | ||
|
||
ant.copy(todir: wildFlyRoot, overwrite: true) { | ||
fileset(dir: mojarraModuleDest) | ||
} | ||
|
||
ant.copy(todir: wildFlyRoot, overwrite: true) { | ||
fileset(dir: hibernateModuleDest) | ||
} |
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
Oops, something went wrong.