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"> <project name="Personal Issue Tracker">
<property file="../version.properties"/>
<property file="project.properties"/> <property file="project.properties"/>
<property environment="env"/> <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"> <target name="init">
<fail <fail
unless="env.GROOVY_HOME" unless="env.GROOVY_HOME"
@@ -9,38 +27,59 @@
<echo message="GROOVY_HOME: ${env.GROOVY_HOME}"/> <echo message="GROOVY_HOME: ${env.GROOVY_HOME}"/>
</target> </target>
<path id="groovy.libs"> <target name="increment-build-number" depends="init">
<fileset dir="${env.GROOVY_HOME}/lib"> <!-- Check to see if the application version has changed.
<include name="**/*.jar"/> If it has, reset the build number to 0 -->
</fileset> <condition property="build.number.final"
</path> value="${build.number}"
else="0" >
<equals
arg1="${application.version}"
arg2="${expected.application.version}"/>
</condition>
<path id="groovy.cp"> <echo message="Version: ${application.version}"/>
<path refid="groovy.libs"/> <echo message="Build number: ${build.number.final}"/>
<fileset dir="${lib.dir}"/>
</path>
<taskdef name="groovyc" <!-- Write the actual application version and build number -->
classname="org.codehaus.groovy.ant.Groovyc" <propertyfile file="project.properties">
classpathref="groovy.libs"/> <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"> <target name="clean">
<delete dir="${build.dir}"/> <delete dir="${build.dir}"/>
</target> </target>
<target name="compile" depends="init"> <target name="compile" depends="init,increment-build-number">
<mkdir dir="${build.dir}/classes"/> <mkdir dir="${build.dir}/classes"/>
<groovyc <groovyc
srcdir="${src.dir}" srcdir="${src.dir}"
destdir="${build.dir}/classes" destdir="${build.dir}/classes"
classpath="${groovyc.cp}"/> classpathref="groovyc.classpath"/>
</target> </target>
<target name="build" depends="compile"> <target name="build" depends="compile">
<mkdir dir="${build.dir}/jar"/> <mkdir dir="${build.dir}/jar"/>
<jar <jar
destfile="${build.dir}/jar/${build.jar}" destfile="${build.dir}/jar/pit-${application.version}.${build.number.final}.jar"
basedir="${build.dir}/classes" basedir="${build.dir}/classes"
compress="on"/> compress="on"/>
</target> </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> </project>
+7 -4
View File
@@ -1,5 +1,8 @@
app.version=1.0 #Sat Feb 13 21:25:03 CST 2010
build.dir=build expected.application.version=1.0.0
build.jar=pit-${app.version}.jar build.number=5
lib.dir=../lib
src.dir=src 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 = [:] Map<String, Project> projects = [:]
Project(File dir, Filter filter = null) { Project(File dir, Filter filter = null) {
this.name = dir.name
dir.eachFile { child -> dir.eachFile { child ->
// add sub projects // add sub projects
@@ -62,7 +64,7 @@ class Project {
each(options.filter) { each(options.filter) {
if (it instanceof Project) { if (it instanceof Project) {
println "\n${options.offset}${it.name}" println "\n${options.offset}${it.name}"
println "${options.offset}${'-'.multiply(p.name.length())}" println "${options.offset}${'-'.multiply(it.name.length())}"
} else { } else {
println "${options.offset}${it.id}(${it.priority}): " + println "${options.offset}${it.id}(${it.priority}): " +
"${it.category} ${it.title}" "${it.category} ${it.title}"
+37 -7
View File
@@ -1,42 +1,72 @@
<project name="Personal Issue Tracker CLI"> <project name="Personal Issue Tracker CLI">
<property file="project.properties"/> <property file="project.properties"/>
<property environment="env" />
<path id="groovy.all.path"> <path id="groovy.libs">
<fileset dir="${groovy.home}/embeddable"> <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"/> <include name="**/*.jar"/>
</fileset> </fileset>
</path> </path>
<taskdef name="groovyc" <taskdef name="groovyc"
classname="org.codehaus.groovy.ant.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"> <target name="clean">
<delete dir="${build.dir}"/> <delete dir="${build.dir}"/>
</target> </target>
<target name="compile"> <target name="compile" depends="init">
<mkdir dir="${build.dir}/classes"/> <mkdir dir="${build.dir}/classes"/>
<groovyc <groovyc
srcdir="${src.dir}" srcdir="${src.dir}"
destdir="${build.dir}/classes" destdir="${build.dir}/classes"
classpath="${groovyc.cp}"/> classpathref="groovyc.classpath"/>
</target> </target>
<target name="build" depends="compile"> <target name="build" depends="compile">
<mkdir dir="${build.dir}/jar"/> <mkdir dir="${build.dir}/jar"/>
<unjar dest="${build.dir}/classes"> <unjar dest="${build.dir}/classes">
<path refid="groovy.cp"/> <path refid="groovy.libs"/>
</unjar> </unjar>
<jar <jar
destfile="${build.dir}/jar/${build.jar}" destfile="${build.dir}/jar/${build.jar}"
basedir="${build.dir}/classes" basedir="${build.dir}/classes"
comipress="on"> compress="on">
<manifest> <manifest>
<attribute name="Main-Class" value="${main.class}"/> <attribute name="Main-Class" value="${main.class}"/>
</manifest> </manifest>
</jar> </jar>
</target> </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> </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