yohoho no longer cares if depot is built with 1.6, so build with that since we're using 1.6's Connection.createArrayOf in PostgreSQL4Builder. Sneak a ooo-buildification in with the compiler version bump.

This commit is contained in:
Charlie Groves
2011-03-23 20:42:00 +00:00
parent 1be9961245
commit 1a2967b31f
9 changed files with 69 additions and 63 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
+4 -4
View File
@@ -1,6 +1,6 @@
#Thu Dec 09 14:25:47 PST 2010
#Wed Mar 23 12:51:22 PDT 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.6
+36
View File
@@ -0,0 +1,36 @@
<project name="bootstrap" default="-extract-ooo-build">
<!--
Pulls in ooo-build from our maven repository to make our base build system available.
From http://ooo-maven.googlecode.com/hg/etc/bootstrap.xml
To use, copy this file into your project's directory and add
<property name="ooo-build.vers" value="1.3"/>
<ant antfile="bootstrap.xml"/>
<import file="${user.home}/.m2/ooo-build/${ooo-build.vers}/ooo-build.xml"/>
to the top level of your build.xml. Then you can depend on -init-ooo in your lowest level
target and pick up all the standard ooo ant tasks and macros.
-->
<property name="maven.dir" value="${user.home}/.m2"/>
<property name="ooo-build.path"
value="com/threerings/ooo-build/${ooo-build.vers}"/>
<property name="ooo-build.jar"
value="ooo-build-${ooo-build.vers}.jar"/>
<property name="ooo-build.local.dir" value="${maven.dir}/repository/${ooo-build.path}"/>
<property name="ooo-build.local.file" value="${ooo-build.local.dir}/${ooo-build.jar}"/>
<condition property="ooo-build.exists"><available file="${ooo-build.local.file}"/></condition>
<target name="-download-ooo-build" unless="ooo-build.exists">
<mkdir dir="${ooo-build.local.dir}"/>
<get src="http://ooo-maven.googlecode.com/hg/repository/${ooo-build.path}/${ooo-build.jar}"
dest="${ooo-build.local.file}" usetimestamp="true"/>
</target>
<property name="ooo-build.dir" value="${maven.dir}/ooo-build/${ooo-build.vers}"/>
<condition property="extracted.exists"><available file="${ooo-build.dir}/ooo-build.xml"/></condition>
<target name="-extract-ooo-build" depends="-download-ooo-build" unless="extracted.exists">
<mkdir dir="${ooo-build.dir}"/>
<unjar src="${ooo-build.local.file}" dest="${ooo-build.dir}"/>
</target>
</project>
+22 -53
View File
@@ -8,48 +8,34 @@
<property name="tclasses.dir" value="${deploy.dir}/test-classes"/>
<property name="javadoc.dir" value="${deploy.dir}/docs"/>
<property name="maven-ant.vers" value="2.1.1"/>
<property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
<property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
<property name="maven-ant.url"
value="http://mirrors.ibiblio.org/pub/mirrors/apache/maven/binaries"/>
<condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>
<target name="-download-maven-ant" unless="maven-ant.exists">
<mkdir dir="${maven-ant.dir}"/>
<get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
dest="${maven-ant.jar}" usetimestamp="true"/>
</target>
<property name="ooo-build.vers" value="2.1"/>
<ant antfile="bootstrap.xml"/>
<import file="${user.home}/.m2/ooo-build/${ooo-build.vers}/ooo-build.xml"/>
<target name="-init-maven-ant" depends="-download-maven-ant">
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
<artifact:pom id="pom" file="pom.xml"/>
<artifact:dependencies pathId="classpath" pomRefId="pom"/>
<path id="test.classpath">
<path refid="classpath"/>
<target name="-prepare" depends="-init-contrib">
<mkdir dir="${deploy.dir}"/>
<mavendep pom="pom.xml" scope="compile"/>
<mavendep pom="pom.xml" id="test" scope="test"/>
<path id="built.path">
<path refid="test.path"/>
<pathelement location="${classes.dir}"/>
<pathelement location="${tclasses.dir}"/>
</path>
</target>
<target name="-prepare" depends="-init-maven-ant">
<mkdir dir="${deploy.dir}"/>
</target>
<target name="genrecord" depends="-prepare"
description="Generates fields for persistent record classes.">
<taskdef name="grecord" classname="com.samskivert.depot.tools.GenRecordTask"
classpathref="test.classpath"/>
classpathref="built.path"/>
<!-- make sure the record class files are all compiled -->
<javac destdir="${classes.dir}" includeAntRuntime="false"
debug="on" optimize="${build.optimize}" deprecation="on">
<src path="${src.dir}"/>
<src path="${test.dir}"/>
<classpath refid="classpath"/>
<ooojavac destdir="${classes.dir}" classpathref="pom.xml.path" srcdir="${src.dir}">
<include name="**/*Record.java"/>
</javac>
</ooojavac>
<ooojavac destdir="${tclasses.dir}" classpathref="pom.xml.path" srcdir="${test.dir}">
<include name="**/*Record.java"/>
</ooojavac>
<!-- now update the source files -->
<grecord classpathref="test.classpath">
<grecord classpathref="built.path">
<fileset dir="${src.dir}" includes="**/*Record.java"/>
<fileset dir="${test.dir}" includes="**/*Record.java"/>
</grecord>
@@ -71,21 +57,10 @@
<copy todir="${classes.dir}">
<fileset dir="src/main/resources" includes="**/*.tmpl"/>
</copy>
<javac srcdir="${src.dir}" destdir="${classes.dir}" includeAntRuntime="false"
debug="on" optimize="${build.optimize}" source="1.5" target="1.5" encoding="utf-8">
<classpath refid="classpath"/>
<compilerarg value="-Xlint"/>
<compilerarg value="-Xlint:-serial"/>
<compilerarg value="-Xlint:rawtypes"/>
</javac>
<ooojavac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="pom.xml.path"/>
<mkdir dir="${tclasses.dir}"/>
<javac srcdir="${test.dir}" destdir="${tclasses.dir}" includeAntRuntime="false"
debug="on" optimize="${build.optimize}" source="1.5" target="1.5" encoding="utf-8">
<classpath refid="test.classpath"/>
<compilerarg value="-Xlint"/>
<compilerarg value="-Xlint:-serial"/>
</javac>
<ooojavac srcdir="${test.dir}" destdir="${tclasses.dir}" classpathref="built.path"/>
</target>
<target name="javadoc" depends="-prepare" description="Generates javadoc documentation.">
@@ -110,11 +85,11 @@
<target name="tests" depends="compile" description="Runs the unit tests.">
<!-- allows passing -Dtest=NamePrefix to restrict to subset of tests -->
<property name="test" value=""/>
<taskdef name="unit" classpathref="classpath"
<taskdef name="unit" classpathref="test.path"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
<mkdir dir="${deploy.dir}/test-reports"/>
<unit printsummary="off" haltonfailure="yes" fork="${junit.fork}">
<classpath refid="test.classpath"/>
<classpath refid="built.path"/>
<sysproperty key="com.samskivert.depot.debug" value="${debug}"/>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
@@ -128,14 +103,8 @@
<jar destfile="${deploy.dir}/${ant.project.name}.jar" basedir="${classes.dir}"/>
</target>
<property name="maven.deploy.repo" value="file://${user.home}/.m2/repository"/>
<target name="maven-deploy" depends="dist,tests"
<target name="maven-deploy" depends="dist"
description="Deploys our build artifacts to a Maven repository.">
<jar basedir="${src.dir}" destfile="${deploy.dir}/${ant.project.name}-sources.jar"/>
<artifact:deploy file="${deploy.dir}/${ant.project.name}.jar" uniqueVersion="false">
<remoteRepository url="${maven.deploy.repo}"/>
<pom refid="pom"/>
<attach file="${deploy.dir}/${ant.project.name}-sources.jar" classifier="sources"/>
</artifact:deploy>
<mavendeploy file="${deploy.dir}/${ant.project.name}.jar" pom="pom.xml" srcdir="${src.dir}"/>
</target>
</project>
+2 -2
View File
@@ -86,8 +86,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
<fork>true</fork>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
@@ -575,6 +575,7 @@ public class Query<T extends PersistentRecord>
_pclass = pclass;
}
@Override
protected Query<T> clone ()
{
try {
@@ -111,7 +111,7 @@ public abstract class Projector<T extends PersistentRecord,R>
Class<T> ptype, final Class<V> resultType, SQLExpression<?>... selexps)
{
return new Projector<T, V>(ptype, selexps) {
public V createObject (Object[] results) {
@Override public V createObject (Object[] results) {
try {
return _ctor.newInstance(results);
} catch (InstantiationException e) {
@@ -69,7 +69,7 @@ public class MigrationTest extends TestBase
protected void executeSQL (PersistenceContext ctx, final String sql)
{
ctx.invoke(new Modifier.Simple() {
protected String createQuery (DatabaseLiaison liaison) {
@Override protected String createQuery (DatabaseLiaison liaison) {
return sql;
}
});
@@ -216,7 +216,7 @@ public class ProjectionTest extends TestBase
this.id = id;
this.name = name;
}
public String toString() {
@Override public String toString() {
return id + " " + name;
}
}