summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Daniel2012-01-03 11:29:15 (EST)
committerAndrew Overholt2012-01-03 14:43:27 (EST)
commit0c3a5d17d9aeeadf57141aeaba3b65d1ff533584 (patch)
tree17a3b45f5228edc61640b6cba7bc7fb61b2ef6b5
parent8df17c01225e8102f84b33ae7dac51ca885cf85b (diff)
downloadorg.eclipse.linuxtools.eclipse-build-0c3a5d17d9aeeadf57141aeaba3b65d1ff533584.zip
org.eclipse.linuxtools.eclipse-build-0c3a5d17d9aeeadf57141aeaba3b65d1ff533584.tar.gz
org.eclipse.linuxtools.eclipse-build-0c3a5d17d9aeeadf57141aeaba3b65d1ff533584.tar.bz2
Verify if the JAVA_HOME is set before build starts
A check if JAVA_HOME is set and points to an existing directory.
-rw-r--r--eclipse-build/build.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/eclipse-build/build.xml b/eclipse-build/build.xml
index bae2c6b..d4775ac 100644
--- a/eclipse-build/build.xml
+++ b/eclipse-build/build.xml
@@ -4,6 +4,16 @@
</tstamp>
<record name="build_${timestamp}.log" />
<echo message="Build log is available in build_${timestamp}.log" />
+
+ <property environment="env"/>
+ <property name="jhome" value="${env.JAVA_HOME}"/>
+ <condition property="javaHomeDoesNotExists">
+ <resourceexists>
+ <file file="${jhome}"/>
+ </resourceexists>
+ </condition>
+ <fail unless="javaHomeDoesNotExists" message="JAVA_HOME is not set properly"/>
+
<property name="baseBuilder" value="${basedir}/bootstrap" />
<property name="launcher" value="${basedir}/bootstrap/plugins/org.eclipse.equinox.launcher.jar" />
<property name="eclipse.pdebuild.scripts" value="${basedir}/bootstrap/plugins/org.eclipse.pde.build/scripts" />