Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ant build that downloads dependencies from ibiblio.org

git-svn-id: https://threeten.svn.sourceforge.net/svnroot/threeten/trunk/jsr-310-ri@20 291d795c-afe8-5c46-8ee5-bf9dd72e1864
  • Loading branch information...
commit 1b987a2a34a6f97be27fafb41f46b24d11130979 1 parent be0c43c
@fabiokung fabiokung authored
Showing with 120 additions and 0 deletions.
  1. +14 −0 build.properties
  2. +106 −0 build.xml
View
14 build.properties
@@ -0,0 +1,14 @@
+build.main = build/main
+build.codegen = build/codegen
+build.test = build/test
+
+src.main = src/main/java
+src.codegen = src/codegen/java
+src.test = src/test/java
+
+lib.test = lib/test
+lib.main = lib/main
+
+dist = dist
+
+maven.ibiblio.url = http://www.ibiblio.org/maven2
View
106 build.xml
@@ -0,0 +1,106 @@
+<!--
+ @author Fabio Kung (fabio.kung@gmail.com)
+-->
+<project name="jsr-310-ri">
+ <description>
+ Reference Implementation for the JSR 310 - Date and Time API
+ </description>
+
+ <property file="build.properties" />
+
+ <macrodef name="get-dependency">
+ <attribute name="group" />
+ <attribute name="artifact" />
+ <attribute name="version" />
+ <attribute name="variant" default="" />
+ <attribute name="dest" />
+ <sequential>
+ <get
+ src="${maven.ibiblio.url}/@{group}/@{artifact}/@{version}/@{artifact}-@{version}@{variant}.jar"
+ dest="@{dest}/@{artifact}-@{version}@{variant}.jar"
+ verbose="true"
+ usetimestamp="true" />
+ </sequential>
+ </macrodef>
+
+ <path id="codegen.path">
+ <pathelement location="${build.codegen}" />
+ <fileset dir="lib/main">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <path id="main.path">
+ <pathelement location="${build.main}" />
+ <fileset dir="lib/main">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <path id="test.path">
+ <path refid="main.path" />
+ <pathelement location="${build.test}" />
+ <fileset dir="lib/test">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <target name="resolve-deps">
+ <mkdir dir="${lib.main}" />
+ <mkdir dir="${lib.test}" />
+
+ <get-dependency group="velocity" artifact="velocity" version="1.5" dest="${lib.main}" />
+ <get-dependency group="commons-collections" artifact="commons-collections" version="3.1" dest="${lib.main}" />
+ <get-dependency group="commons-lang" artifact="commons-lang" version="2.1" dest="${lib.main}" />
+ <get-dependency group="oro" artifact="oro" version="2.0.8" dest="${lib.main}" />
+
+ <get-dependency group="org/testng" artifact="testng" version="5.1" variant="-jdk15" dest="${lib.test}" />
+ </target>
+
+ <target name="init" depends="resolve-deps">
+ <tstamp />
+ </target>
+
+ <target name="compile" depends="init" description="compile the source">
+ <mkdir dir="${build.main}" />
+ <javac srcdir="${src.main}" destdir="${build.main}" classpathref="main.path" />
+ </target>
+
+ <target name="compile-codegen">
+ <mkdir dir="${build.codegen}" />
+ <javac srcdir="${src.codegen}" destdir="${build.codegen}" classpathref="codegen.path" />
+ <copy todir="${build.codegen}">
+ <fileset dir="${src.codegen}">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="compile-tests" depends="compile" description="compile the tests">
+ <mkdir dir="${build.test}" />
+ <javac srcdir="${src.test}" destdir="${build.test}" classpathref="test.path" />
+ </target>
+
+ <target name="test" depends="compile-tests" description="run the tests">
+ <taskdef resource="testngtasks" classpathref="test.path" />
+ <testng classpathref="test.path" outputDir="${build.test}" sourceDir="${src.test}" haltonfailure="true" verbose="2">
+ <classfileset dir="${build.test}" includes="**/Test*.class" />
+ </testng>
+ </target>
+
+ <target name="dist" depends="test" description="generate the distribution">
+ <mkdir dir="${dist}" />
+
+ <jar jarfile="${dist}/${ant.project.name}-${DSTAMP}.jar" basedir="${build.main}" />
+ </target>
+
+ <target name="clean" description="clean up">
+ <delete dir="${build.main}" />
+ <delete dir="${build.test}" />
+ <delete dir="${dist}" />
+ </target>
+
+ <target name="codegen" depends="compile-codegen">
+ <java classname="jsr310.codegen.CodeGen" classpathref="codegen.path" />
+ </target>
+</project>

0 comments on commit 1b987a2

Please sign in to comment.
Something went wrong with that request. Please try again.