-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
executable file
·19 lines (18 loc) · 1.39 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
group 'org.catapult.sa'
version '0.1-SNAPSHOT'
// on windows the hadoophome enviroment variable needs to be set.
// this causes a error to be issued if its not.
import org.gradle.internal.os.OperatingSystem
if ((!System.properties['hadoophome'] || !new File(System.properties['hadoophome'].toString()).isDirectory()) && OperatingSystem.current().isWindows()) {
logger.error("\n")
logger.error("*****************************************************************************************************")
logger.error("ERROR: hadoophome system property is not set to a valid directory. The tests will not be able to run.")
logger.error("Set systemProp.hadoophome in the gradle.properties file to the location of a windows hadoop build")
logger.error("that includes winutils.exe\n")
logger.error("A pre built copy can be found: http://www.barik.net/archive/2015/01/19/172716/\n")
logger.error("Please Note: \\ is an escape character in properties files. So they need to be doubled up or ")
logger.error("replaced with / when entering a windows style path. Also do not quote the path or escape spaces.\n")
logger.error("The current hadoophome is: " + System.properties['hadoophome'] )
logger.error("*****************************************************************************************************")
throw new GradleException("Hadoop Home not set.") // abort build
}