- added 3 new conditions release60_vw_root
authoram111535@netbeans.org
Tue, 30 Jan 2007 04:04:29 +0000
changeset 188282bfbb21a61a
parent 1881 b3553b72e0ea
child 1883 c9b880ad5eae
- added 3 new conditions
a) check for ../../nbbuild dir for NB binaries before doing an IDE build
b) check for java in JAVA_HOME
c) java version must be 1.5
visualweb/ravebuild/build.xml
     1.1 --- a/visualweb/ravebuild/build.xml	Mon Jan 29 18:24:43 2007 +0000
     1.2 +++ b/visualweb/ravebuild/build.xml	Tue Jan 30 04:04:29 2007 +0000
     1.3 @@ -21,6 +21,7 @@
     1.4  -->
     1.5  <project name="ravebuild" default="build" basedir=".">
     1.6  
     1.7 +    <property environment="env"/>
     1.8      <!-- XXX Also like in nbbuild, allow to specify user properties in ravebuild-->
     1.9      <!-- First things first: read the user's and/or -->
    1.10      <!-- the site's build properties files.         -->
    1.11 @@ -196,12 +197,10 @@
    1.12      
    1.13      <!-- Overriding all target.
    1.14      Reason: removing commit-validation, adding sanity-start -->
    1.15 -    <!-- Removed sanity-start for now to avoid all the ide exceptions in the visualweb module -->
    1.16 -    <target name="all" depends="build-zip" description="Build the IDE, run basic validation tests, start the IDE, and create the zip"/>
    1.17 +    <target name="all" depends="build-zip,sanity-start" description="Build the IDE, run basic validation tests, start the IDE, and create the zip"/>
    1.18      
    1.19      <!-- All target without zipping the IDE -->
    1.20 -    <!-- Removed sanity-start for now to avoid all the ide exceptions in the visualweb module -->
    1.21 -    <target name="all-nozip" depends="build" description="Build the IDE, run basic validation tests, and start the IDE"/>
    1.22 +    <target name="all-nozip" depends="build,sanity-start" description="Build the IDE, run basic validation tests, and start the IDE"/>
    1.23      
    1.24      <target name="build" depends="prepare-netbeans-dest-dir, copy-jdk" description="Build the IDE, run basic validation tests, and start the IDE">
    1.25          <ant antfile="../visualwebsuite/build.xml" target="build" inheritall="false"/>
    1.26 @@ -258,26 +257,34 @@
    1.27      <target name="-validate-cache">
    1.28          <condition property="netbeans.bin.available">
    1.29              <or>
    1.30 +		<available file="${basedir}/../../nbbuild" type="dir"/>
    1.31                  <available file="${netbeans.location}/bin/netbeans"/>
    1.32 -                <isset property="bypass.cache.validation"/>
    1.33 +		<isset property="bypass.cache.validation"/>
    1.34              </or>
    1.35 -        </condition>
    1.36 -        
    1.37 +	</condition>
    1.38          <fail unless="netbeans.bin.available">
    1.39 -            Netbeans binary under ${netbeans.location} could not be found.  A cache update may be needed.
    1.40 +            Netbeans binary under ${netbeans.location} OR ${basedir}/../../nbbuildccould not be found.  A cache update may be needed.
    1.41          </fail>
    1.42  
    1.43          <condition property="jdk.available">
    1.44              <or>
    1.45 -                <available file="${basedir}/ship-java/COPYRIGHT"/>
    1.46 -                <os family="mac"/>
    1.47 -                <isset property="bypass.cache.validation"/>
    1.48 -            </or>
    1.49 +	        <available file="${env.JAVA_HOME}/COPYRIGHT"/>
    1.50 +		<os family="mac"/>
    1.51 +	        <isset property="bypass.cache.validation"/>
    1.52 +	    </or>
    1.53          </condition>
    1.54 -        
    1.55          <fail unless="jdk.available">
    1.56 -            The bundled version of the JVM under ${basedir}/ship-java could not be found.  A cache update may be needed.
    1.57 +            The bundled version of the JVM under ${env.JAVA_HOME}/bin/java could not be found.  A cache update may be needed.
    1.58          </fail>
    1.59 +
    1.60 +	<condition property="jdk.version">
    1.61 +	    <equals arg1="${ant.java.version}" arg2="1.5" />
    1.62 +	</condition>
    1.63 +	<fail unless="jdk.version">
    1.64 +	    The bundled version of the JVM under ${env.JAVA_HOME} should be 1.5.0_06.
    1.65 +	    Run the "ant unzip-jdk" target to download and unzip the required jdk.
    1.66 +	    Set JAVA_HOME to this new JDK location
    1.67 +	</fail>
    1.68      </target>
    1.69      
    1.70      <!-- Overriding init target.
    1.71 @@ -465,8 +472,8 @@
    1.72              </or>
    1.73          </condition>
    1.74  	<available property="shipJdkHome" 
    1.75 -		   value="${basedir}/ship-java"
    1.76 -		   file="${basedir}/ship-java/COPYRIGHT"/>
    1.77 +		   value="${env.JAVA_HOME}"
    1.78 +		   file="${env.JAVA_HOME}/COPYRIGHT"/>
    1.79  	<condition property="shipJdkHome" value="${jdkhome}">
    1.80  	    <not>
    1.81         		<isset property="shipJdkHome"/>
    1.82 @@ -1017,14 +1024,14 @@
    1.83          <get src="${jdk.cache.server.url}/zips/${jdk.win}.zip"
    1.84               dest="${jdk.cache.dir}/${jdk.win}.zip" usetimestamp="true" ignoreerrors="true"/>
    1.85      </target>
    1.86 -    
    1.87 +
    1.88      <target name="-unzip-jdk" depends="-download-jdk, init">
    1.89 -        <!-- use exec instead of the untar task, since the task does not preserve file permissions -->
    1.90 -        <mkdir dir="${basedir}/ship-java"/>
    1.91 -        <!-- <exec dir="${basedir}/ship-java" executable="tar" failonerror="true">
    1.92 -            <arg line="xvf ${cache.dir}/jdk-zip.tar"/>
    1.93 -        </exec> -->
    1.94 -		<untar src="${cache.dir}/jdk-zip.tar" dest="${basedir}/ship-java"/>
    1.95 +	<!-- use exec instead of the untar task, since the task does not preserve file permissions -->
    1.96 +      	<mkdir dir="${basedir}/ship-java"/>
    1.97 +      	<!-- <exec dir="${basedir}/ship-java" executable="tar" failonerror="true">
    1.98 +		<arg line="xvf ${cache.dir}/jdk-zip.tar"/>
    1.99 +	</exec> -->
   1.100 +	<untar src="${cache.dir}/jdk-zip.tar" dest="${basedir}/ship-java"/>
   1.101      </target>
   1.102      
   1.103      <target name="-unzip-netbeans-src" depends="-get-netbeans-src, init">