Finished 1.0.0 of libpit. Other housekeeping performed as well.

Moved issue for the PIT project to top-level.
Created top-level versioning properties and project properties for pit-cli
This commit is contained in:
Jonathan Bernard committed 2010-02-13 21:30:31 -06:00
1 parent f3f30237b2
commit bb56b706f8
21 files changed
+116 -56

No files matched your search

-29
View File
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="Common Build Versioning" >
<property name="cbv-basedir" value="${basedir}" />
<property name="cbv-property-file" value="project.properties"/>
<target name="-cbv-init">
<property file="${cbv-basedir}/${cbv-property-file}" />
</target>
<target name="-pre-set-version" />
<target name="-do-set-version">
<input message="Current version is ${application.version}. Enter new version: " addproperty="new-version"/>
<propertyfile file="${cbv-basedir}/${cbv-property-file}">
<entry key="application.version" value="${new-version}" />
<entry key="build.number" value="0" />
</propertyfile>
<property file="${cbv-basedir}/${cbv-property-file}" />
</target>
<target name="-post-set-version" />
<target name="set-version" depends="-cbv-init,-pre-set-version,-do-set-version,-post-set-version"/>
<target name="increment-build-number">
<propertyfile file="${cbv-basedir}/${cbv-property-file}">
<entry key="build.number" operation="+" type="int" default="0"/>
</propertyfile>
<property file="${cbv-basedir}/${cbv-property-file}" />
</target>
</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5
View File
@@ -0,0 +1,5 @@
Add Apache Ivy to the build process.
====================================
Add the neccesary structure to leverage an existing Ivy repository and to
generate artifacts for a local repository.
+2
View File
@@ -0,0 +1,2 @@
Create a build system
=====================
+54 -15
View File
@@ -1,7 +1,25 @@
<project name="Personal Issue Tracker">
<property file="../version.properties"/>
<property file="project.properties"/>
<property environment="env"/>
<path id="groovy.libs">
<fileset dir="${env.GROOVY_HOME}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="groovyc.classpath">
<path refid="groovy.libs"/>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef name="groovyc"
classname="org.codehaus.groovy.ant.Groovyc"
classpathref="groovy.libs"/>
<target name="init">
<fail
unless="env.GROOVY_HOME"
@@ -9,38 +27,59 @@
<echo message="GROOVY_HOME: ${env.GROOVY_HOME}"/>
</target>
<path id="groovy.libs">
<fileset dir="${env.GROOVY_HOME}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="increment-build-number" depends="init">
<!-- Check to see if the application version has changed.
If it has, reset the build number to 0 -->
<condition property="build.number.final"
value="${build.number}"
else="0" >
<equals
arg1="${application.version}"
arg2="${expected.application.version}"/>
</condition>
<path id="groovy.cp">
<path refid="groovy.libs"/>
<fileset dir="${lib.dir}"/>
</path>
<echo message="Version: ${application.version}"/>
<echo message="Build number: ${build.number.final}"/>
<taskdef name="groovyc"
classname="org.codehaus.groovy.ant.Groovyc"
classpathref="groovy.libs"/>
<!-- Write the actual application version and build number -->
<propertyfile file="project.properties">
<entry key="build.number" value="${build.number.final}"/>
<entry
key="expected.application.version"
value="${application.version}"/>
</propertyfile>
<!-- increment build number -->
<propertyfile file="project.properties">
<entry key="build.number" operation="+" type="int" default="0"/>
</propertyfile>
<property file="project.properties"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile" depends="init">
<target name="compile" depends="init,increment-build-number">
<mkdir dir="${build.dir}/classes"/>
<groovyc
srcdir="${src.dir}"
destdir="${build.dir}/classes"
classpath="${groovyc.cp}"/>
classpathref="groovyc.classpath"/>
</target>
<target name="build" depends="compile">
<mkdir dir="${build.dir}/jar"/>
<jar
destfile="${build.dir}/jar/${build.jar}"
destfile="${build.dir}/jar/pit-${application.version}.${build.number.final}.jar"
basedir="${build.dir}/classes"
compress="on"/>
</target>
<target name="release" depends="build">
<delete dir="${release.dir}"/>
<mkdir dir="${release.dir}"/>
<copy file="${build.dir}/jar/pit-${application.version}.${build.number.final}.jar"
tofile="${release.dir}/${release.jar}"/>
</target>
</project>
+7 -4
View File
@@ -1,5 +1,8 @@
app.version=1.0
build.dir=build
build.jar=pit-${app.version}.jar
lib.dir=../lib
#Sat Feb 13 21:25:03 CST 2010
expected.application.version=1.0.0
build.number=5
src.dir=src
release.dir=release
build.dir=build
lib.dir=lib
release.jar=pit-${application.version}.jar
Binary file not shown.
+3 -1
View File
@@ -7,6 +7,8 @@ class Project {
Map<String, Project> projects = [:]
Project(File dir, Filter filter = null) {
this.name = dir.name
dir.eachFile { child ->
// add sub projects
@@ -62,7 +64,7 @@ class Project {
each(options.filter) {
if (it instanceof Project) {
println "\n${options.offset}${it.name}"
println "${options.offset}${'-'.multiply(p.name.length())}"
println "${options.offset}${'-'.multiply(it.name.length())}"
} else {
println "${options.offset}${it.id}(${it.priority}): " +
"${it.category} ${it.title}"
+37 -7
View File
@@ -1,42 +1,72 @@
<project name="Personal Issue Tracker CLI">
<property file="project.properties"/>
<property environment="env" />
<path id="groovy.all.path">
<fileset dir="${groovy.home}/embeddable">
<path id="groovy.libs">
<fileset dir="${env.GROOVY_HOME}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="groovyc.classpath">
<path refid="groovy.libs"/>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef name="groovyc"
classname="org.codehaus.groovy.ant.Groovyc"
classpathref="groovy.all.path"/>
classpathref="groovy.libs"/>
<target name="init">
<fail
unless="env.GROOVY_HOME"
message="GROOVY_HOME environment variable is not set."/>
<echo message="GROOVY_HOME: ${env.GROOVY_HOME}"/>
<fail message="Could not find PIT ${application.version} library.">
<condition>
<not>
<available
file="${lib.dir}/pit-${application.version}.jar"/>
</not>
</condition>
</fail>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile">
<target name="compile" depends="init">
<mkdir dir="${build.dir}/classes"/>
<groovyc
srcdir="${src.dir}"
destdir="${build.dir}/classes"
classpath="${groovyc.cp}"/>
classpathref="groovyc.classpath"/>
</target>
<target name="build" depends="compile">
<mkdir dir="${build.dir}/jar"/>
<unjar dest="${build.dir}/classes">
<path refid="groovy.cp"/>
<path refid="groovy.libs"/>
</unjar>
<jar
destfile="${build.dir}/jar/${build.jar}"
basedir="${build.dir}/classes"
comipress="on">
compress="on">
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="release" depends="build">
<delete dir="${release.dir}"/>
<mkdir dir="${release.dir}"/>
<copy file="${build.dir}/jar/${build.jar}"
todir="${release.dir"/>
</target>
</project>
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
application.version=1.0
build.dir=build
build.jar=pit-cli-${application.version}.jar
lib.dir=lib
main.class=com.jdbernard.pit.PersonalIssueTrackerCLI
release.dir=release
src.dir=src
+1
View File
@@ -0,0 +1 @@
application.version=1.0.0