2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2020

03/04/2003: Best Practice; Ant; Always Have a Versions Task

This task is designed to display the version of every software application used during the build process. It will mainly be used when sending a debugging report to vendors.

However, it could also be useful when creating archival information. Here is my implementation of a VERSIONS task:

<target name="versions">
	<!-- DOS version -->
	<exec executable="cmd.exe"><arg line="/c ver" /></exec>
	<!-- ANT version -->
	<echo>${ant.version}</echo>
	<!-- SolarMetric's KODO version -->
	<java classname="com.solarmetric.kodo.conf.JDOVersion" fork="yes">
		<classpath>
			<pathelement location="${kodo.jdo.classfile}" />
			<pathelement location="${kodo.impl.home.dir}\lib\jdo1_0.jar" />
			<pathelement location="${kodo.impl.home.dir}\lib\serp.jar" />
			<pathelement location="${kodo.impl.home.dir}\lib\jta-spec1_0_1.jar" />
			<pathelement location="${kodo.impl.home.dir}\lib\jca1.0.jar" />
		</classpath>
	</java>
</target>

When I run ant versions, here is the resulting output:

Buildfile: build.xml

versions:

     [exec] Microsoft Windows XP [Version 5.1.2600]
     [echo] Apache Ant version 1.5 compiled on July 9 2002
     [java] Kodo JDO Enterprise Edition version 2.3.1
     [java] version id: kodojdo-2.3.1-20020821-1709

     [java] os.name: Windows XP
     [java] os.version: 5.1
     [java] os.arch: x86

     [java] java.version: 1.4.0_01
     [java] java.vendor: Sun Microsystems Inc.

     [java] java.class.path:
     [java]     D:\java\jdo\impl\kodo-jdo-2.3.1\lib\kodo-jdoee.jar
     [java]     D:\java\jdo\impl\kodo-jdo-2.3.1\lib\jdo1_0.jar
     [java]     D:\java\jdo\impl\kodo-jdo-2.3.1\lib\serp.jar
     [java]     D:\java\jdo\impl\kodo-jdo-2.3.1\lib\jta-spec1_0_1.jar
     [java]     D:\java\jdo\impl\kodo-jdo-2.3.1\lib\jca1.0.jar

     [java] user.dir: D:\java\WORKSP~1\REFERE~1

03/04/2003: A Reference Data Framework Using Java Data Objects (JDO)

This paper describes one of the packages developed during a consultancy engagement between Ogilvie Partners Ltd and Eclectic Consulting in Arlington, VA, during July 2002. Our joint aim in publishing our results is to add to the evolving body of knowledge about the application of JDO to real-world projects.

The MS Word version of the document can be found at Reference Data Framework.

The source code that supports the framework can be found at reference_data_framework.zip.

Abstract - This paper describes one of the packages developed during a consultancy engagement between Ogilvie Partners Ltd and Eclectic Consulting in Arlington, VA, during July 2002. Our joint aim in publishing our results is to add to the evolving body of knowledge about the application of JDO to real-world projects.

Every application requires some form of reference data to be persisted and managed. Projects tend to treat the topic in different ways which results in duplication of design and implementation effort. As part of a much larger design effort we faced this issue and attempted to write a generic framework that could be reused across different projects.