Skip to content

Commit

Permalink
added building sources zip
Browse files Browse the repository at this point in the history
  • Loading branch information
bugy committed Apr 16, 2014
1 parent 1747a95 commit 7dca9a2
Showing 1 changed file with 40 additions and 35 deletions.
75 changes: 40 additions & 35 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
<project name="jdbf" default="jar" basedir=".">

<description>jdbf - Java library to write/read DBF files</description>

<property name="src.dir" location="${basedir}/src" />
<property name="build.dir" location="${basedir}/build" />
<property name="src.generated.dir" location="${build.dir}/java_generated_${version.tag}" />
<property name="classes.dir" location="${build.dir}/classes"/>
<property name="dist.dir" location="${build.dir}/dist"/>
<property name="jar.filename" location="${dist.dir}/jdbf.jar"/>

<path id="main.classpath">
<pathelement path="${classes.dir}" />
</path>

<target name="mkdirs">
<mkdir dir="${build.dir}" />
<mkdir dir="${classes.dir}" />
<mkdir dir="${dist.dir}" />
</target>

<target name="clean">
<delete dir="${build.dir}" />
</target>

<target name="compile" description="compile the source" depends="clean,mkdirs">
<javac destdir="${classes.dir}" debug="true">
<src path="${src.dir}"/>
<classpath refid="main.classpath" />
</javac>
</target>

<target name="jar" description="Create JAR file" depends="compile">
<jar destfile="${jar.filename}" basedir="${classes.dir}"/>
</target>


<description>jdbf - Java library to write/read DBF files</description>

<property name="src.dir" location="${basedir}/src"/>
<property name="build.dir" location="${basedir}/build"/>
<property name="src.generated.dir" location="${build.dir}/java_generated_${version.tag}"/>
<property name="classes.dir" location="${build.dir}/classes"/>
<property name="dist.dir" location="${build.dir}/dist"/>
<property name="jar-name" value="jdbf"/>
<property name="jar.filename" value="${jar-name}.jar"/>
<property name="src-zip.filename" value="${jar-name}-src.zip"/>

<path id="main.classpath">
<pathelement path="${classes.dir}"/>
</path>

<target name="mkdirs">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>

<target name="clean">
<delete dir="${build.dir}"/>
</target>

<target name="compile" description="compile the source" depends="clean,mkdirs">
<javac destdir="${classes.dir}" debug="true">
<src path="${src.dir}"/>
<classpath refid="main.classpath"/>
</javac>
</target>

<target name="jar" description="Create JAR file" depends="compile">
<jar destfile="${dist.dir}/${jar.filename}" basedir="${classes.dir}"/>

<zip zipfile="${dist.dir}/${src-zip.filename}" basedir="${basedir}/src"
compress="true"/>
</target>

</project>

0 comments on commit 7dca9a2

Please sign in to comment.