Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add clean, publish-local and javadoc to build. cleanup directory stru…

…cture .
  • Loading branch information...
commit b067400570ad87b86d7119eaabcf9e585ca59642 1 parent 89dedb0
Cliff Moon moonpolysoft authored

Showing 1 changed file with 28 additions and 8 deletions. Show diff stats Hide diff stats

  1. +28 8 build.xml
36 build.xml
@@ -10,9 +10,8 @@
10 10 <property name="basedir" value="."/>
11 11 <property name="build.src" value="${basedir}/src"/>
12 12 <property name="build.src.java" value="${basedir}/src/java"/>
13   - <property name="build.lib" value="${basedir}/lib"/>
14 13 <property name="build.dir" value="${basedir}/build"/>
15   - <property name="build.dir.lib" value="${basedir}/build/lib"/>
  14 + <property name="build.dir.lib" value="${build.dir}/lib"/>
16 15 <property name="build.classes" value="${build.dir}/classes"/>
17 16 <property name="dist.dir" value="${build.dir}/dist"/>
18 17
@@ -23,15 +22,20 @@
23 22 <pathelement location="${build.dir}/ivy-${ivy.version}.jar"/>
24 23 </path>
25 24
26   - <target name="ivy-download" unless="ivy.jar.exists">
  25 + <target name="init">
  26 + <mkdir dir="${build.dir}"/>
  27 + <mkdir dir="${build.dir.lib}"/>
  28 + <mkdir dir="${build.classes}"/>
  29 + <mkdir dir="${dist.dir}"/>
  30 + </target>
  31 +
  32 + <target name="ivy-download" depends="init" unless="ivy.jar.exists">
27 33 <echo>Downloading Ivy...</echo>
28   - <mkdir dir="${build.dir}" />
29 34 <get src="${ivy.url}/${ivy.version}/ivy-${ivy.version}.jar"
30   - dest="${build.dir}/ivy-${ivy.version}.jar" usetimestamp="true" />
  35 + dest="${build.dir.lib}/ivy-${ivy.version}.jar" usetimestamp="true" />
31 36 </target>
32 37
33 38 <target name="ivy-init" depends="ivy-download" unless="ivy.initialized">
34   - <mkdir dir="${build.dir.lib}"/>
35 39 <taskdef resource="org/apache/ivy/ant/antlib.xml"
36 40 uri="antlib:org.apache.ivy.ant"
37 41 classpathref="autoivy.classpath"/>
@@ -54,7 +58,7 @@
54 58 </target>
55 59
56 60 <target name="compile" depends="ivy-retrieve-build" description="Compilation target">
57   - <javac srcdir="src" destdir="bin"/>
  61 + <javac srcdir="src" destdir="${build.classes}"/>
58 62 </target>
59 63
60 64 <target name="gen-pom" depends="ivy-init">
@@ -64,7 +68,7 @@
64 68 </target>
65 69
66 70 <target name="jar" description="jar target" depends="compile">
67   - <jar jarfile="${dist.dir}/high-scale-lib.jar" basedir="bin/" includes="org/**/*.class" />
  71 + <jar jarfile="${dist.dir}/high-scale-lib.jar" basedir="${build.classes}" includes="org/**/*.class" />
68 72 </target>
69 73
70 74 <target name="publish" description="publish jar to artifactory" depends="jar, gen-pom">
@@ -74,4 +78,20 @@
74 78 <artifact name="${ivy.module}" ext="pom" type="pom"/>
75 79 </ivy:publish>
76 80 </target>
  81 +
  82 + <target name="publish-local" description="publish jar to the local repo" depends="jar">
  83 + <ivy:publish resolver="local" overwrite="true" organisation="${organization}" module="${module}" revision="${version}">
  84 + <artifacts pattern="${dist.dir}/[artifact].[ext]"/>
  85 + </ivy:publish>
  86 + </target>
  87 +
  88 + <target name="clean" description="get rid of any build artifacts">
  89 + <delete dir="${dist.dir}" />
  90 + <delete dir="${build.dir}" />
  91 + <delete dir="doc" />
  92 + </target>
  93 +
  94 + <target name="javadoc" description="generate the docs">
  95 + <javadoc sourcepath="src" destdir="doc"/>
  96 + </target>
77 97 </project>

0 comments on commit b067400

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