aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.classpath3
-rw-r--r--.gitignore2
-rw-r--r--build/build.xml (renamed from build/cardbasecli.xml)4
-rw-r--r--build/newbuild.xml112
-rw-r--r--lib/junit/hamcrest-core-1.3-sources.jarbin0 -> 32624 bytes
-rw-r--r--lib/junit/hamcrest-core-1.3.jarbin0 -> 45024 bytes
-rw-r--r--lib/junit/junit-4.12-sources.jarbin0 -> 200355 bytes
-rw-r--r--lib/junit/junit-4.12.jarbin0 -> 314932 bytes
8 files changed, 118 insertions, 3 deletions
diff --git a/.classpath b/.classpath
index eaefb07..2fd2bdf 100644
--- a/.classpath
+++ b/.classpath
@@ -15,6 +15,7 @@
<attribute name="javadoc_location" value="http://fasterxml.github.com/jackson-databind/javadoc/2.5/"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+ <classpathentry kind="lib" path="lib/junit/hamcrest-core-1.3.jar" sourcepath="lib/junit/hamcrest-core-1.3-sources.jar"/>
+ <classpathentry kind="lib" path="lib/junit/junit-4.12.jar" sourcepath="lib/junit/junit-4.12-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/.gitignore b/.gitignore
index 49a0b91..d0bc10e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@ __pycache__/
bin/
dist/
test/spike/
+build/main/
+build/test/
diff --git a/build/cardbasecli.xml b/build/build.xml
index 12c4c40..ce3d166 100644
--- a/build/cardbasecli.xml
+++ b/build/build.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<project name="cardbasecli" default="deploy" basedir="..">
+<project name="cardbase" default="deploy" basedir="..">
<property name="jar.name" value="cardbase" />
<property name="src.dir" location="src" />
@@ -8,6 +8,7 @@
<property name="dist.dir" location="dist" />
<property name="lib.dir" value="lib" />
<property name="res.dir" value="res" />
+ <property name="test.src.dir" value="test" />
<property name="main-class" value="eu.equalparts.cardbase.cli.CardbaseCLI" />
<!-- Clean up temporary directories -->
@@ -66,7 +67,6 @@
</concat>
<chmod file="${dist.dir}/${jar.name}" perm="755"/>
-
</target>
<!-- Produce a standalone, runnable jar -->
diff --git a/build/newbuild.xml b/build/newbuild.xml
new file mode 100644
index 0000000..2bbfd65
--- /dev/null
+++ b/build/newbuild.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<project name="cardbasenew" default="test" basedir="..">
+
+ <property name="main.build.dir" value="build/main" />
+ <property name="main.src.dir" value="src" />
+ <property name="main-class" value="eu.equalparts.cardbase.cli.CardbaseCLI" />
+
+ <property name="test.build.dir" value="build/test" />
+ <property name="test.src.dir" value="test" />
+
+ <property name="build.dir" location="build" />
+ <property name="dist.dir" location="dist" />
+ <property name="lib.dir" value="lib" />
+ <property name="test.lib.dir" value="lib/junit" />
+
+ <property name="res.dir" value="res" />
+
+ <property name="jar.name" value="cardbase" />
+
+ <path id="classpath.base" >
+ <fileset dir="${basedir}/">
+ <include name="${res.dir}/*" />
+
+ <include name="${lib.dir}/*.jar" />
+ <exclude name="${lib.dir}/*sources.jar"/>
+ <exclude name="${lib.dir}/*javadoc.jar"/>
+ </fileset>
+ </path>
+
+ <path id="classpath.test">
+ <fileset dir="${basedir}/">
+ <include name="${lib.dir}/junit/*.jar" />
+ <exclude name="${lib.dir}/junit/*sources.jar"/>
+ <exclude name="${lib.dir}/junit/*javadoc.jar"/>
+ </fileset>
+ <pathelement location="${main.build.dir}"/>
+ <path refid="classpath.base" />
+ </path>
+
+ <target name="test" depends="run, clean" />
+
+ <target name="compile" depends="clean">
+ <mkdir dir="${main.build.dir}"/>
+ <javac srcdir="${main.src.dir}" destdir="${main.build.dir}" includeantruntime="false">
+ <classpath refid="classpath.base"/>
+ </javac>
+ <copy todir="${main.build.dir}">
+ <fileset dir="${res.dir}" excludes=""/>
+ </copy>
+ </target>
+
+ <target name="build" depends="compile">
+ <mkdir dir="${test.build.dir}"/>
+ <javac srcdir="${test.src.dir}" destdir="${test.build.dir}" includeantruntime="false">
+ <classpath refid="classpath.test"/>
+ </javac>
+ <copy todir="${test.build.dir}">
+ <fileset dir="${test.src.dir}" excludes="**.java"/>
+ </copy>
+ <echo message="Build done" />
+ </target>
+
+ <!-- Test and build all files -->
+ <!-- To run this: use "ant" (default) or "ant run" -->
+ <target name="run" depends="build">
+ <junit printsummary="on" haltonfailure="no">
+ <classpath>
+ <path refid="classpath.test" />
+ <pathelement location="${test.build.dir}"/>
+ </classpath>
+ <formatter type="brief" usefile="false" />
+ <batchtest>
+ <fileset dir="${test.src.dir}" includes="**/*Test*.java" />
+ </batchtest>
+ </junit>
+ </target>
+
+ <!-- delete all class files -->
+ <!-- To run this: use "ant clean" -->
+ <target name="clean">
+ <delete dir="${main.build.dir}" />
+ <delete dir="${test.build.dir}" />
+ <echo message="clean done" />
+ </target>
+
+ <!-- Create the jar and declare the ext libraries in manifest.mf file -->
+ <target name="jar" depends="compile" >
+ <mkdir dir="${dist.dir}" />
+
+ <jar jarfile="${dist.dir}/${jar.name}.jar" basedir="${main.build.dir}">
+ <zipgroupfileset dir="${lib.dir}" includes="*.jar" excludes="*sources.jar, *javadoc.jar" />
+ <manifest>
+ <attribute name="Main-Class" value="${main-class}" />
+ <attribute name="Class-Path" value="${classpath.base.name}" />
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- Produce a standalone, runnable jar -->
+ <target name="deploy" depends="compile, jar" />
+
+ <!-- Concatenate the jar to a pre-set header and chmod 755 it -->
+ <target name="shebang" depends="deploy" >
+ <concat destfile="${dist.dir}/${jar.name}" binary="yes">
+ <fileset dir="${build.dir}" includes="header"/>
+ <fileset dir="${dist.dir}" includes="${jar.name}.jar"/>
+ </concat>
+
+ <chmod file="${dist.dir}/${jar.name}" perm="755"/>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/lib/junit/hamcrest-core-1.3-sources.jar b/lib/junit/hamcrest-core-1.3-sources.jar
new file mode 100644
index 0000000..c3c110b
--- /dev/null
+++ b/lib/junit/hamcrest-core-1.3-sources.jar
Binary files differ
diff --git a/lib/junit/hamcrest-core-1.3.jar b/lib/junit/hamcrest-core-1.3.jar
new file mode 100644
index 0000000..9d5fe16
--- /dev/null
+++ b/lib/junit/hamcrest-core-1.3.jar
Binary files differ
diff --git a/lib/junit/junit-4.12-sources.jar b/lib/junit/junit-4.12-sources.jar
new file mode 100644
index 0000000..884f92f
--- /dev/null
+++ b/lib/junit/junit-4.12-sources.jar
Binary files differ
diff --git a/lib/junit/junit-4.12.jar b/lib/junit/junit-4.12.jar
new file mode 100644
index 0000000..3a7fc26
--- /dev/null
+++ b/lib/junit/junit-4.12.jar
Binary files differ