summaryrefslogtreecommitdiffstats
path: root/make/validate-properties.xml
blob: e5ed6889cb1e88ee975bd617d9eb7021aa4a00b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
   - A validator for all of the user-defined properties.  It will be called
   - from build.xml in the "init" task.
  -->
<project name="Configuration validator" default="validate">

    <!-- ================================================================== -->
    <!-- 
       - Ensure that "antlr.jar" is set.
      -->
    <target name="antlr.jar.validate" unless="antlr.jar">
        <fail>
        
    **************************************************************
    ** The property &quot;antlr.jar&quot; was not set in host.properties. **
    ** Please set &quot;antlr.jar&quot; to the full path of the ANTLR jar **
    ** including the jar itself.                                **
    **************************************************************
        </fail>
    </target>

    <!-- 
       - Ensure that "java.home.dir" is set.
       - NOTE:  "java.home" is an internal property for ANT that is not
       -        typically set to what the build needs it to be.
      -->
    <target name="java.home.dir.validate" unless="java.home.dir">
        <fail>
        
    ******************************************************************
    ** The property &quot;java.home.dir&quot; was not set in host.properties. **
    ** Please set &quot;java.home.dir&quot; to your JAVA_HOME directory.      **
    ******************************************************************
        </fail>
    </target>

    <!-- 
       - Make sure that jogl.jar is not on the CLASSPATH; this can cause
       - builds to fail since if this Java process has the jar file open
       - we can not overwrite it.
      -->
    <target name="test.for.jogl.jar">
        <available property="jogl.jar.on.class.path" classname="net.java.games.jogl.GL" />
    </target>
    <target name="java.class.path.validate" depends="test.for.jogl.jar" if="jogl.jar.on.class.path">
        <fail>
        
    ******************************************************************
    ** Your CLASSPATH environment variable appears to be set (some  **
    ** JOGL classes are currently visible to the build.) This can   **
    ** cause the build to fail. Please unset your CLASSPATH         **
    ** variable and restart the build.                              **
    ******************************************************************
        </fail>
    </target>

    <!-- ================================================================== -->
    <!-- 
       - Validate the required properties 
      -->
    <target name="validate" depends="antlr.jar.validate, java.home.dir.validate, java.class.path.validate" 
            description="Validate required properties" />

</project>