Moving toward more standard project layout.
This commit is contained in:
@@ -8,8 +8,10 @@
|
|||||||
|
|
||||||
<!-- various directories used when building things -->
|
<!-- various directories used when building things -->
|
||||||
<property name="src.dir" value="src/java"/>
|
<property name="src.dir" value="src/java"/>
|
||||||
|
<property name="test.dir" value="src/test/java"/>
|
||||||
<property name="deploy.dir" value="dist"/>
|
<property name="deploy.dir" value="dist"/>
|
||||||
<property name="classes.dir" value="${deploy.dir}/classes"/>
|
<property name="classes.dir" value="${deploy.dir}/classes"/>
|
||||||
|
<property name="tclasses.dir" value="${deploy.dir}/test-classes"/>
|
||||||
<property name="javadoc.dir" value="${deploy.dir}/docs"/>
|
<property name="javadoc.dir" value="${deploy.dir}/docs"/>
|
||||||
<property name="libs.dir" value="lib"/>
|
<property name="libs.dir" value="lib"/>
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@
|
|||||||
<mkdir dir="${deploy.dir}"/>
|
<mkdir dir="${deploy.dir}"/>
|
||||||
<mkdir dir="${deploy.dir}/lib"/>
|
<mkdir dir="${deploy.dir}/lib"/>
|
||||||
<mkdir dir="${classes.dir}"/>
|
<mkdir dir="${classes.dir}"/>
|
||||||
|
<mkdir dir="${tclasses.dir}"/>
|
||||||
<mkdir dir="${javadoc.dir}"/>
|
<mkdir dir="${javadoc.dir}"/>
|
||||||
<copy todir="${classes.dir}">
|
<copy todir="${classes.dir}">
|
||||||
<fileset dir="${src.dir}" includes="**/*.tmpl"/>
|
<fileset dir="${src.dir}" includes="**/*.tmpl"/>
|
||||||
@@ -67,8 +70,10 @@
|
|||||||
<taskdef name="grecord" classname="com.samskivert.depot.tools.GenRecordTask"
|
<taskdef name="grecord" classname="com.samskivert.depot.tools.GenRecordTask"
|
||||||
classpathref="classpath"/>
|
classpathref="classpath"/>
|
||||||
<!-- make sure the record class files are all compiled -->
|
<!-- make sure the record class files are all compiled -->
|
||||||
<javac srcdir="src/java" destdir="${classes.dir}"
|
<javac destdir="${classes.dir}"
|
||||||
debug="on" optimize="${build.optimize}" deprecation="on">
|
debug="on" optimize="${build.optimize}" deprecation="on">
|
||||||
|
<src name="${src.dir}"/>
|
||||||
|
<src name="${test.dir}"/>
|
||||||
<classpath refid="classpath"/>
|
<classpath refid="classpath"/>
|
||||||
<include name="**/*Record.java"/>
|
<include name="**/*Record.java"/>
|
||||||
</javac>
|
</javac>
|
||||||
@@ -105,6 +110,18 @@
|
|||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="test-compile" depends="compile" description="Compiles test classes.">
|
||||||
|
<javac srcdir="${test.dir}" destdir="${tclasses.dir}" includeAntRuntime="false"
|
||||||
|
debug="on" optimize="${build.optimize}" source="1.5" target="1.5" encoding="utf-8">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${classes.dir}"/>
|
||||||
|
<path refid="classpath"/>
|
||||||
|
</classpath>
|
||||||
|
<compilerarg value="-Xlint"/>
|
||||||
|
<compilerarg value="-Xlint:-serial"/>
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
<!-- build the javadoc documentation -->
|
<!-- build the javadoc documentation -->
|
||||||
<target name="javadoc" depends="prepare,compute-builds"
|
<target name="javadoc" depends="prepare,compute-builds"
|
||||||
description="Generates javadoc documentation.">
|
description="Generates javadoc documentation.">
|
||||||
@@ -125,11 +142,11 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- a target for rebuilding everything -->
|
<!-- a target for rebuilding everything -->
|
||||||
<target name="all" depends="clean,prepare,compile,javadoc,dist"
|
<target name="all" depends="clean,compile,javadoc,dist"
|
||||||
description="Cleans and rebuilds everything including documentation."/>
|
description="Cleans and rebuilds everything including documentation."/>
|
||||||
|
|
||||||
<!-- runs our unit tests -->
|
<!-- runs our unit tests -->
|
||||||
<target name="tests" depends="prepare,compile" description="Runs the unit tests.">
|
<target name="tests" depends="test-compile" description="Runs the unit tests.">
|
||||||
<!-- allows passing -Dtest=NamePrefix to restrict to subset of tests -->
|
<!-- allows passing -Dtest=NamePrefix to restrict to subset of tests -->
|
||||||
<property name="test" value=""/>
|
<property name="test" value=""/>
|
||||||
<taskdef name="unit" classpathref="classpath"
|
<taskdef name="unit" classpathref="classpath"
|
||||||
@@ -137,14 +154,15 @@
|
|||||||
<unit printsummary="off" haltonfailure="yes" fork="${junit.fork}">
|
<unit printsummary="off" haltonfailure="yes" fork="${junit.fork}">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${classes.dir}"/>
|
<pathelement location="${classes.dir}"/>
|
||||||
|
<pathelement location="${tclasses.dir}"/>
|
||||||
<pathelement location="${basedir}"/> <!-- for rsrc/ -->
|
<pathelement location="${basedir}"/> <!-- for rsrc/ -->
|
||||||
<fileset dir="${deploy.dir}/lib" includes="*.jar"/>
|
<fileset dir="${deploy.dir}/lib" includes="*.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
<sysproperty key="com.samskivert.depot.debug" value="${debug}"/>
|
<sysproperty key="com.samskivert.depot.debug" value="${debug}"/>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<batchtest>
|
<batchtest>
|
||||||
<fileset dir="${src.dir}">
|
<fileset dir="${test.dir}">
|
||||||
<include name="**/tests/**/${test}*Test.java"/>
|
<include name="**/${test}*Test.java"/>
|
||||||
<exclude name="com/samskivert/depot/EHCacheAdapter.java" unless="ehcache.present"/>
|
<exclude name="com/samskivert/depot/EHCacheAdapter.java" unless="ehcache.present"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
|
|||||||
+1
-3
@@ -18,15 +18,13 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
import java.sql.Time;
|
import java.sql.Time;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.samskivert.depot.Key;
|
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
import com.samskivert.depot.expression.ColumnExp;
|
import com.samskivert.depot.expression.ColumnExp;
|
||||||
import com.samskivert.depot.annotation.Column;
|
import com.samskivert.depot.annotation.Column;
|
||||||
import com.samskivert.depot.annotation.Id;
|
import com.samskivert.depot.annotation.Id;
|
||||||
+1
-5
@@ -18,17 +18,13 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import com.samskivert.depot.DepotRepository;
|
|
||||||
import com.samskivert.depot.PersistenceContext;
|
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the handling of our various supported field types.
|
* Tests the handling of our various supported field types.
|
||||||
*/
|
*/
|
||||||
+1
-2
@@ -18,7 +18,7 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
@@ -27,7 +27,6 @@ import static org.junit.Assert.*;
|
|||||||
|
|
||||||
import com.samskivert.util.ByteEnum;
|
import com.samskivert.util.ByteEnum;
|
||||||
|
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
import com.samskivert.depot.impl.FieldMarshaller;
|
import com.samskivert.depot.impl.FieldMarshaller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
+2
-4
@@ -18,16 +18,14 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import com.samskivert.depot.Key;
|
|
||||||
import com.samskivert.depot.expression.ColumnExp;
|
import com.samskivert.depot.expression.ColumnExp;
|
||||||
import com.samskivert.depot.impl.DepotUtil;
|
import com.samskivert.depot.impl.DepotUtil;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests some super basic {@link Key} stuff.
|
* Tests some super basic {@link Key} stuff.
|
||||||
*/
|
*/
|
||||||
+1
-3
@@ -18,10 +18,8 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import com.samskivert.depot.Key;
|
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
import com.samskivert.depot.expression.ColumnExp;
|
import com.samskivert.depot.expression.ColumnExp;
|
||||||
import com.samskivert.depot.annotation.Id;
|
import com.samskivert.depot.annotation.Id;
|
||||||
|
|
||||||
+4
-8
@@ -18,23 +18,19 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.samskivert.util.RandomUtil;
|
import com.samskivert.util.RandomUtil;
|
||||||
|
|
||||||
import com.samskivert.depot.Exps;
|
|
||||||
import com.samskivert.depot.Key;
|
|
||||||
import com.samskivert.depot.KeySet;
|
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
import com.samskivert.depot.annotation.Computed;
|
|
||||||
import com.samskivert.depot.clause.Where;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import com.samskivert.depot.annotation.Computed;
|
||||||
|
import com.samskivert.depot.clause.Where;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests queries.
|
* Tests queries.
|
||||||
*/
|
*/
|
||||||
+1
-3
@@ -18,7 +18,7 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
@@ -28,8 +28,6 @@ import java.util.Properties;
|
|||||||
import com.samskivert.jdbc.StaticConnectionProvider;
|
import com.samskivert.jdbc.StaticConnectionProvider;
|
||||||
import com.samskivert.util.Calendars;
|
import com.samskivert.util.Calendars;
|
||||||
|
|
||||||
import com.samskivert.depot.PersistenceContext;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+1
-2
@@ -18,7 +18,7 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -28,7 +28,6 @@ import java.util.Map;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
import com.samskivert.depot.CacheAdapter;
|
|
||||||
import com.samskivert.util.Tuple;
|
import com.samskivert.util.Tuple;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+3
-5
@@ -18,20 +18,18 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
import com.samskivert.depot.Key;
|
import com.samskivert.util.StringUtil;
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
import com.samskivert.depot.annotation.Entity;
|
import com.samskivert.depot.annotation.Entity;
|
||||||
import com.samskivert.depot.annotation.Id;
|
import com.samskivert.depot.annotation.Id;
|
||||||
import com.samskivert.depot.annotation.Index;
|
import com.samskivert.depot.annotation.Index;
|
||||||
import com.samskivert.depot.expression.ColumnExp;
|
import com.samskivert.depot.expression.ColumnExp;
|
||||||
|
|
||||||
import com.samskivert.util.StringUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A test persistent object.
|
* A test persistent object.
|
||||||
*/
|
*/
|
||||||
+1
-5
@@ -18,14 +18,10 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.samskivert.depot.DepotRepository;
|
|
||||||
import com.samskivert.depot.PersistenceContext;
|
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A test tool for the Depot repository services.
|
* A test tool for the Depot repository services.
|
||||||
*/
|
*/
|
||||||
+1
-6
@@ -18,7 +18,7 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
@@ -37,11 +37,6 @@ import com.samskivert.util.ByteEnum;
|
|||||||
import com.samskivert.depot.Key;
|
import com.samskivert.depot.Key;
|
||||||
import com.samskivert.depot.expression.ColumnExp;
|
import com.samskivert.depot.expression.ColumnExp;
|
||||||
|
|
||||||
import com.samskivert.depot.DepotRepository;
|
|
||||||
import com.samskivert.depot.PersistenceContext;
|
|
||||||
import com.samskivert.depot.PersistentRecord;
|
|
||||||
import com.samskivert.depot.Transformer;
|
|
||||||
import com.samskivert.depot.Transformers;
|
|
||||||
import com.samskivert.depot.annotation.Column;
|
import com.samskivert.depot.annotation.Column;
|
||||||
import com.samskivert.depot.annotation.Id;
|
import com.samskivert.depot.annotation.Id;
|
||||||
import com.samskivert.depot.annotation.Transform;
|
import com.samskivert.depot.annotation.Transform;
|
||||||
+1
-3
@@ -18,7 +18,7 @@
|
|||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
package com.samskivert.depot.tests;
|
package com.samskivert.depot;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -30,8 +30,6 @@ import com.google.common.collect.Sets;
|
|||||||
|
|
||||||
import com.samskivert.util.ByteEnum;
|
import com.samskivert.util.ByteEnum;
|
||||||
|
|
||||||
import com.samskivert.depot.Transformers;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the stock transformers.
|
* Tests the stock transformers.
|
||||||
*/
|
*/
|
||||||
Reference in New Issue
Block a user