-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
synapticloop
committed
Aug 30, 2015
1 parent
62ed04b
commit f56efb5
Showing
39 changed files
with
1,069 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="build-test" default="help-instructions"> | ||
<import file="build-common.xml" /> | ||
<import file="build-javac.xml" /> | ||
|
||
<!-- cobertura classpath --> | ||
<path id="cobertura.classpath"> | ||
<fileset dir="${test.lib.dir}"> | ||
<include name="**/*.jar" /> | ||
</fileset> | ||
</path> | ||
|
||
<!-- junit classpath --> | ||
<path id="test.classpath"> | ||
<pathelement location="${build.classes.dir}" /> | ||
<pathelement location="${build.test.dir}" /> | ||
<fileset dir="${test.lib.dir}"> | ||
<include name="*.jar" /> | ||
</fileset> | ||
<fileset dir="${compile.lib.dir}"> | ||
<include name="*.jar" /> | ||
</fileset> | ||
<fileset dir="${runtime.lib.dir}"> | ||
<include name="*.jar" /> | ||
</fileset> | ||
<fileset dir="${util.lib.dir}"> | ||
<include name="*.jar" /> | ||
</fileset> | ||
</path> | ||
|
||
<target name="compile-test" depends="compile"> | ||
<mkdir dir="${build.test.dir}" /> | ||
<javac srcdir="${src.test.dir}" destdir="${build.test.dir}" classpathref="test.classpath" debug="on" target="1.6" source="1.6" includeantruntime="false" /> | ||
</target> | ||
|
||
<!-- | ||
run the junit tests and generate the cobertura reports | ||
--> | ||
<target name="cobertura" depends="compile-test" description="[build-test] Compile, run and provide coverage for the junit tests"> | ||
<!-- define the cobertura task --> | ||
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" /> | ||
|
||
<mkdir dir="${cobertura.reports.dir}/xml" /> | ||
<mkdir dir="${cobertura.reports.dir}/html" /> | ||
|
||
<delete file="cobertura.ser" /> | ||
|
||
<cobertura-instrument todir="${build.instrumented.dir}"> | ||
<ignore regex="org.apache.log4j.*" /> | ||
<fileset dir="${build.classes.dir}"> | ||
<include name="**/*.class" /> | ||
<exclude name="**/*Test.class" /> | ||
</fileset> | ||
</cobertura-instrument> | ||
|
||
<mkdir dir="${junit.reports.dir}/xml" /> | ||
<mkdir dir="${junit.reports.dir}/html" /> | ||
|
||
<junit fork="yes" printsummary="yes" haltonfailure="no" failureproperty="junit.failure" showoutput="true"> | ||
<classpath location="${build.instrumented.dir}" /> | ||
<classpath refid="cobertura.classpath" /> | ||
<classpath refid="test.classpath" /> | ||
|
||
<batchtest fork="yes" todir="${junit.reports.dir}/xml" > | ||
<fileset dir="${build.test.dir}"> | ||
<include name="**/*Test.class" /> | ||
</fileset> | ||
</batchtest> | ||
<formatter type="xml" /> | ||
</junit> | ||
|
||
<junitreport todir="${junit.reports.dir}/xml"> | ||
<fileset dir="${junit.reports.dir}/xml"> | ||
<include name="TEST-*.xml" /> | ||
</fileset> | ||
<report todir="${junit.reports.dir}/html" /> | ||
</junitreport> | ||
|
||
<cobertura-report format="xml" destdir="${cobertura.reports.dir}/xml" > | ||
<fileset dir="${src.java.dir}"> | ||
<include name="**/*.java" /> | ||
</fileset> | ||
</cobertura-report> | ||
|
||
<cobertura-report format="html" destdir="${cobertura.reports.dir}/html" > | ||
<fileset dir="${src.java.dir}"> | ||
<include name="**/*.java" /> | ||
</fileset> | ||
</cobertura-report> | ||
<fail if="${junit.failure}" message="JUnit Tests Failed!" /> | ||
</target> | ||
|
||
<!-- | ||
run the junit tests only | ||
--> | ||
<target name="junit" depends="compile-test" description="[build-test] Compile and run the junit tests only"> | ||
<mkdir dir="${junit.reports.dir}/xml" /> | ||
<mkdir dir="${junit.reports.dir}/html" /> | ||
|
||
<junit fork="yes" printsummary="yes" haltonfailure="no" failureproperty="junit.failure" showoutput="true"> | ||
<classpath refid="test.classpath" /> | ||
|
||
<batchtest fork="yes" todir="${junit.reports.dir}/xml" > | ||
<fileset dir="${build.test.dir}"> | ||
<include name="**/*Test.class" /> | ||
</fileset> | ||
</batchtest> | ||
<formatter type="xml" /> | ||
</junit> | ||
|
||
<junitreport todir="${junit.reports.dir}/xml"> | ||
<fileset dir="${junit.reports.dir}/xml"> | ||
<include name="TEST-*.xml" /> | ||
</fileset> | ||
<report todir="${junit.reports.dir}/html" /> | ||
</junitreport> | ||
<fail if="${junit.failure}" message="JUnit Tests Failed!" /> | ||
</target> | ||
|
||
<!-- | ||
Compile all of the source files, instrument them by cobertura and jar them | ||
up | ||
--> | ||
<target name="jar-instrumented" depends="compile" description="[build-test] Compile and build the instrumented classes"> | ||
<!-- define the cobertura task --> | ||
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" /> | ||
|
||
<cobertura-instrument todir="${build.instrumented.dir}"> | ||
<fileset dir="${build.classes.dir}"> | ||
<include name="**/*.class" /> | ||
<exclude name="**/*Test.class" /> | ||
</fileset> | ||
</cobertura-instrument> | ||
|
||
<!-- | ||
Now jar up the instrumented classes, properties and all of the rest of | ||
the information | ||
--> | ||
<jar destfile="${dist.dir}/${ant.project.name}-instrumented.jar"> | ||
<fileset dir="${build.instrumented.dir}"> | ||
<include name="**/*.class" /> | ||
</fileset> | ||
<fileset dir="${build.classes.dir}"> | ||
<exclude name="**/*.class" /> | ||
</fileset> | ||
</jar> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Common Build file with common routines | ||
--> | ||
<project name="build-common" basedir="." default="help-instructions"> | ||
<!-- | ||
First thing that we have to do is to download the ant contributions jar file | ||
which should probably come from sourceforge, rather than the prodman hudson | ||
server | ||
--> | ||
<property name="util.lib.dir" location="lib/util" /> | ||
<property name="compile.lib.dir" location="lib/compile" /> | ||
<property name="runtime.lib.dir" location="lib/runtime" /> | ||
<property name="test.lib.dir" location="lib/test" /> | ||
|
||
<mkdir dir="${util.lib.dir}" /> | ||
<mkdir dir="${compile.lib.dir}" /> | ||
<mkdir dir="${runtime.lib.dir}" /> | ||
|
||
<property name="src.java.dir" location="src/main/java" /> | ||
<property name="src.test.dir" value="src/test/java" /> | ||
|
||
<property name="build.dir" value="build" /> | ||
<property name="build.test.dir" location="build/test" /> | ||
<property name="build.classes.dir" value="build/classes" /> | ||
|
||
<property name="dist.dir" value="dist" /> | ||
|
||
<property name="junit.reports.dir" value="build/reports/junit"/> | ||
<property name="cobertura.reports.dir" value="build/reports/cobertura"/> | ||
|
||
<property name="build.instrumented.dir" value="build/classes-instrumented"/> | ||
|
||
<import file="build-javac.xml" /> | ||
|
||
<target name="dist" depends="clean,init,compile,jar" description="[build-common] Build the distributable" /> | ||
|
||
<target name="jar" depends="compile" description="[build-common] Jar the code"> | ||
<mkdir dir="${dist.dir}" /> | ||
<jar destfile="${dist.dir}/${ant.project.name}.jar"> | ||
<fileset dir="${build.classes.dir}"> | ||
<include name="**/*.*" /> | ||
</fileset> | ||
</jar> | ||
</target> | ||
|
||
<target name="init" description="[build-common] Clean the build and distribution directories"> | ||
<mkdir dir="${build.dir}" /> | ||
<mkdir dir="${dist.dir}" /> | ||
</target> | ||
|
||
<target name="clean" description="[build-common] Clean the build and distribution directories"> | ||
<delete dir="${build.dir}" /> | ||
<delete dir="${dist.dir}" /> | ||
</target> | ||
|
||
<target name="help-instructions"> | ||
<echo> | ||
! ! ! I M P O R T A N T ! ! ! | ||
|
||
This file is not designed to be invoked directly, however it is included and | ||
invoked by each of the individual projects. | ||
</echo> | ||
</target> | ||
|
||
<target name="help"> | ||
<echo> | ||
type: | ||
ant -p | ||
|
||
For a complete list of available targets | ||
</echo> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="build-javac" default="help-instructions"> | ||
<import file="build-common.xml" /> | ||
|
||
<path id="lib.path.compile"> | ||
<!-- | ||
Do a fileset so that it doesn't fall over if the runtime/compile directory | ||
doesn't exist | ||
--> | ||
<fileset dir="${compile.lib.dir}"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
<fileset dir="${runtime.lib.dir}"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
</path> | ||
|
||
<target name="compile" description="[build-javac] Compile the source files"> | ||
<mkdir dir="${build.dir}" /> | ||
<mkdir dir="${build.classes.dir}" /> | ||
<javac srcdir="${src.java.dir}" destdir="${build.classes.dir}" classpathref="lib.path.compile" debug="on" includeantruntime="false" /> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...2zero/base/manager/ConnectionManager.java → ...base/manager/mysql/ConnectionManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.