Skip to content

Commit

Permalink
Updated BUILD file to reflect JUnit 4 dependency, updated build.xml f…
Browse files Browse the repository at this point in the history
…ile to check for JUnit 4 and to log a message about whether annotation processing is enabled

git-svn-id: https://svn.apache.org/repos/asf/incubator/pivot/trunk@779236 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Todd Volkert committed May 27, 2009
1 parent 88e262b commit fa733eb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion BUILD
Expand Up @@ -3,7 +3,7 @@ System Requirements

* 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
Expand Down
47 changes: 33 additions & 14 deletions build.xml
Expand Up @@ -36,28 +36,44 @@ limitations under the License.
<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"/>
Expand Down Expand Up @@ -207,10 +223,13 @@ limitations under the License.

<!-- 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>
Expand Down

0 comments on commit fa733eb

Please sign in to comment.