Using ant build script instead

This commit is contained in:
Flare Microsystems
2024-11-08 17:51:48 -08:00
parent 9dd716b0ac
commit f288d0b66d
3 changed files with 104 additions and 0 deletions

27
bin/test.xml Normal file
View File

@@ -0,0 +1,27 @@
<execution>
<environment>
<variable name="ENV_VAR">Variable Contents</variable>
</environment>
<!--Empty clone clones the whole workspace?-->
<clone />
<bat>
echo this could be a whole batch script or just one command
</bat>
<py>
print("this could be a whole python script or just one call")
</py>
<sh which="bash">
echo "this could be a whole sh script or just one command"
</sh>
<ps>
echo "this could be a whole powershell script or just one command"
</ps>
<artifacts>
<!--Mode could be raw copy or zip?-->
<artifact mode="copy">
<from>dist/*</from>
<!--Empty clone clones the whole workspace?-->
<to>dist/</to>
</artifact>
</artifacts>
</execution>

63
build.xml Normal file
View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project CrossJeeves">
<property name="src.dir" value="src" />
<property name="testsrc.dir" value="src" />
<property name="build.dir" value="bin" />
<property name="test.dir" value="testbin" />
<property name="junit.dir" value="/tool/junit4" />
<property name="reports.dir" value="reports" />
<property name="jar.name" value="CrossJeeves.jar" />
<!-- Create build directories -->
<target name="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${test.dir}" />
<mkdir dir="${reports.dir}" />
</target>
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required -->
<target name="compile" depends="init">
<javac srcdir="${src.dir}" destdir="${build.dir}" target="1.5">
<classpath>
<pathelement location="${junit.dir}" />
</classpath>
</javac>
</target>
<target name="create_run_jar" depends="compile">
<jar destfile="${jar.name}" basedir="${build.dir}">
<manifest file="${manifest.file}" />
<fileset dir="${build.dir}">
<include name="**/*.class" />
</fileset>
</jar>
</target>
<target name="compile_tests" depends="compile">
<javac srcdir="${testsrc.dir}" destdir="${test.dir}">
<classpath>
<pathelement location="${junit.dir}" />
</classpath>
</javac>
</target>
<target name="test" depends="compile_tests">
<mkdir dir="reports" />
<junit printsummary="yes" haltonfailure="no">
<classpath>
<pathelement location="bin" />
<fileset dir="/tool/junit4" includes="*.jar" />
</classpath>
<batchtest fork="yes" todir="reports">
<fileset dir="bin/test">
<include name="**/*Test.class" />
</fileset>
</batchtest>
<formatter type="xml" />
</junit>
</target>
</project>

View File

@@ -0,0 +1,14 @@
package com.flaremicro.crossjeeves;
import static org.junit.Assert.*;
import org.junit.Test;
public class MainTest {
@Test
public void test() {
assertTrue(true);
}
}