Permalink
Browse files

Removed the non-test related Ant targets

The Strongback and 3rd party libraries are installed (via the Strongback CLI) into the WPILib's `user/java/lib` directory and therefore are found, used, and deployed during the WPILib's standard Ant build process.

However, WPILib's build does not support unit tests, so this file defines Ant targets related only for unit testing. Thus, a robot project that uses Strongback at runtime and has no tests need not use this Ant file.
  • Loading branch information...
rhauch committed Jan 2, 2017
1 parent f3adce4 commit 946af64019262b4d83f6ac06866a0a2849bce45e
Showing with 10 additions and 48 deletions.
  1. +10 −48 ant/strongback/build.xml
View
@@ -11,17 +11,19 @@
<property file="${user.home}/strongback/java/ant/build.properties" />
<import file="${wpilib.ant.dir}/build.xml" />
<!-- Define the classpaths -->
<path id="compile.classpath">
<fileset dir="${strongback.home}/java/lib" includes="**/*.jar" excludes="**/*-sources.jar" />
<fileset dir="${user.home}/wpilib/java/${version}/lib" includes="**/*.jar" excludes="**/*-sources.jar" />
<pathelement path="${classpath}" />
</path>
<!--
The Strongback and 3rd party libraries are installed (via the Strongback CLI) into the
WPILib's `user/java/lib` directory and therefore are found, used, and deployed during the
WPILib's standard Ant build process.
However, WPILib's build does not support unit tests, so this file defines Ant targets
related only for unit testing. Thus, a robot project that uses Strongback at runtime
and has no tests need not use this Ant file.
-->
<!-- Define a classpath for unit testing -->
<path id="junit.classpath">
<fileset dir="${strongback.home}/java/lib" includes="**/*.jar" excludes="**/*-sources.jar" />
<fileset dir="${strongback.home}/java/lib-tests" includes="**/*.jar" excludes="**/*-sources.jar" />
<pathelement location="${build.dir}" />
<pathelement path="${classpath}" />
@@ -37,46 +39,6 @@
<ant antfile="${wpilib.ant.dir}/build.xml" target="clean" />
</target>
<target name="compile" description="Compile the source code.">
<mkdir dir="${build.dir}" />
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false">
<classpath refid="compile.classpath" />
</javac>
<copy todir="${build.dir}">
<fileset dir="${src.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
</copy>
<copy todir="${build.dir}" failonerror="false" quiet="true">
<fileset dir="${resources.dir}" />
</copy>
</target>
<target name="jar" depends="compile">
<echo>Making jar ${dist.jar}.</echo>
<mkdir dir="${dist.dir}" />
<mkdir dir="${build.jars}" />
<echo>Copying jars from ${strongback.classpath} to ${build.jars}.</echo>
<copy todir="${build.jars}" flatten="true">
<path>
<pathelement path="${strongback.classpath}" />
</path>
</copy>
<jar destfile="${dist.jar}" update="false">
<manifest>
<attribute name="Main-Class" value="edu.wpi.first.wpilibj.RobotBase" />
<attribute name="Robot-Class" value="${robot.class}" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${build.dir}" includes="**/*.class" />
<zipgroupfileset dir="${build.jars}">
<include name="**/*.jar" />
</zipgroupfileset>
</jar>
</target>
<!-- Check if there are any JUnit Tests -->
<target name="if-tests">
<condition property="tests-exists">

0 comments on commit 946af64

Please sign in to comment.