You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/05/27 18:42:47 UTC

svn commit: r779236 - in /incubator/pivot/trunk: BUILD build.xml

Author: tvolkert
Date: Wed May 27 16:42:47 2009
New Revision: 779236

URL: http://svn.apache.org/viewvc?rev=779236&view=rev
Log:
Updated BUILD file to reflect JUnit 4 dependency, updated build.xml file to check for JUnit 4 and to log a message about whether annotation processing is enabled

Modified:
    incubator/pivot/trunk/BUILD
    incubator/pivot/trunk/build.xml

Modified: incubator/pivot/trunk/BUILD
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/BUILD?rev=779236&r1=779235&r2=779236&view=diff
==============================================================================
--- incubator/pivot/trunk/BUILD (original)
+++ incubator/pivot/trunk/BUILD Wed May 27 16:42:47 2009
@@ -3,7 +3,7 @@
 
 * JDK 1.6 or greater (http://java.sun.com/)
 * Ant 1.7 or greater (http://ant.apache.org/)
-* JUnit 3 (http://www.junit.org/)
+* JUnit 4 (http://www.junit.org/)
 
 
 Project Set-Up

Modified: incubator/pivot/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/build.xml?rev=779236&r1=779235&r2=779236&view=diff
==============================================================================
--- incubator/pivot/trunk/build.xml (original)
+++ incubator/pivot/trunk/build.xml Wed May 27 16:42:47 2009
@@ -36,28 +36,44 @@
     <property name="compiler.target" value="1.5"/>
     <property name="compiler.encoding" value="UTF-8"/>
 
-    <!-- Dynamic properties -->
-    <tstamp/>
-    <property file="build.properties"/>
-    <property name="folder.release" value="apache-${ant.project.name}-${version}"/>
-
     <!-- Compiler argument properties -->
     <property name="compilerarg.default" value="-Xlint"/>
     <condition property="compilerarg.processor"
         value="-Xlint -processor pivot.wtkx.BindProcessor" else="-Xlint">
+        <isset property="compiler.sun"/>
+    </condition>
+
+    <!-- Dynamic properties -->
+    <tstamp/>
+    <property file="build.properties"/>
+    <property name="folder.release" value="apache-${ant.project.name}-${version}"/>
+    <condition property="compiler.sun">
         <available classname="com.sun.tools.javac.tree.JCTree">
-          <classpath>
-            <fileset dir="${java.home}/lib" includes="**/*.jar"/>
-          </classpath>
+            <classpath>
+                <fileset dir="${java.home}/lib" includes="**/*.jar"/>
+            </classpath>
         </available>
     </condition>
 
     <!-- JDK version check -->
-    <condition property="echo.jdk" value="Using JDK ${ant.java.version} (OK)"
-        else="WARNING: Using JDK ${ant.java.version}">
-        <equals arg1="${ant.java.version}" arg2="1.6"/>
+    <fail message="Building Pivot requires JDK 1.6 or greater.">
+        <condition>
+            <not>
+                <or>
+                    <equals arg1="${ant.java.version}" arg2="1.6"/>
+                    <equals arg1="${ant.java.version}" arg2="1.7"/>
+                </or>
+            </not>
+        </condition>
+    </fail>
+
+    <!-- Sun compiler check -->
+    <condition property="msg.suncompiler"
+        value="Sun compiler detected (annotation processing enabled)"
+        else="!!! WARNING !!! Sun compiler not detected (annotation processing disabled)">
+        <isset property="compiler.sun"/>
     </condition>
-    <echo message="${echo.jdk}"/>
+    <echo message="${msg.suncompiler}"/>
 
     <target name="build" description="Compiles all packages"
         depends="charts, charts-test, core, core-test, web, web-test, wtk, wtk-test, tutorials, demos, tools"/>
@@ -207,10 +223,13 @@
 
     <!-- Core Test -->
     <target name="core-test" depends="core">
-        <fail message="JUnit not found. Please see the BUILD file for more information.">
+        <fail message="JUnit 4 not found. Please see the BUILD file for more information.">
             <condition>
                 <not>
-                    <available classname="junit.framework.TestCase"/>
+                    <and>
+                        <available classname="junit.framework.TestCase"/>
+                        <available classname="org.junit.Test"/>
+                    </and>
                 </not>
             </condition>
         </fail>