001: /*
002: * This software is released under a licence similar to the Apache Software Licence.
003: * See org.logicalcobwebs.proxool.package.html for details.
004: * The latest version is available at http://proxool.sourceforge.net
005: */
006: package org.logicalcobwebs.proxool;
007:
008: import org.apache.commons.logging.Log;
009: import org.apache.commons.logging.LogFactory;
010:
011: /**
012: * Tells you the version. You can tell what sort of release it is
013: * from the version. For instance:
014: *
015: * 1.0.0 (1 January)
016: * A proper released binary file at version 1.0.
017: *
018: * 1.0.0+
019: * Built from the source based on version 1.0 (but there is no
020: * way of knowing whether the source has been altered).
021: *
022: * 1.0.1 (2 January)
023: * A bug fix release built on January 2nd.
024: *
025: * @version $Revision: 1.20 $, $Date: 2006/01/18 14:40:02 $
026: * @author bill
027: * @author $Author: billhorsman $ (current maintainer)
028: * @since Proxool 0.6
029: */
030: public class Version {
031:
032: private static final Log LOG = LogFactory.getLog(Version.class);
033:
034: /**
035: * This is changed by the Ant script when you build from the
036: * source code.
037: */
038: private static final String VERSION = null;
039:
040: private static final String BUILD_DATE = null;
041:
042: private static final String CVS = "0.9.0RC3+";
043:
044: public static String getVersion() {
045: StringBuffer version = new StringBuffer();
046:
047: if (VERSION != null) {
048: version.append(VERSION);
049: } else {
050: /**
051: * This means that we haven't used the Ant script so this
052: * is just our best guess at the version.
053: */
054: version.append(CVS);
055: }
056:
057: if (BUILD_DATE != null) {
058: version.append(" (");
059: version.append(BUILD_DATE);
060: version.append(")");
061: }
062:
063: return version.toString();
064: }
065:
066: /**
067: * Convenient way of verifying version
068: * @param args none required (any sent are ignored)
069: */
070: public static void main(String[] args) {
071: LOG.info("Version " + getVersion());
072: }
073:
074: }
075:
076: /*
077: Revision history:
078: $Log: Version.java,v $
079: Revision 1.20 2006/01/18 14:40:02 billhorsman
080: Unbundled Jakarta's Commons Logging.
081:
082: Revision 1.19 2005/09/26 21:47:46 billhorsman
083: no message
084:
085: Revision 1.18 2003/12/13 12:21:54 billhorsman
086: Release 0.8.3
087:
088: Revision 1.17 2003/11/05 00:19:48 billhorsman
089: new revision
090:
091: Revision 1.16 2003/10/27 13:13:58 billhorsman
092: new version
093:
094: Revision 1.15 2003/10/26 15:23:30 billhorsman
095: 0.8.0
096:
097: Revision 1.14 2003/10/01 19:31:26 billhorsman
098: 0.8.0RC2
099:
100: Revision 1.13 2003/09/11 11:17:52 billhorsman
101: *** empty log message ***
102:
103: Revision 1.12 2003/08/30 11:43:32 billhorsman
104: Update for next release.
105:
106: Revision 1.11 2003/07/23 06:54:48 billhorsman
107: draft JNDI changes (shouldn't effect normal operation)
108:
109: Revision 1.10 2003/06/18 10:04:47 billhorsman
110: versioning
111:
112: Revision 1.9 2003/03/12 15:59:53 billhorsman
113: *** empty log message ***
114:
115: Revision 1.8 2003/03/03 11:11:58 billhorsman
116: fixed licence
117:
118: Revision 1.7 2003/02/21 15:19:09 billhorsman
119: update version
120:
121: Revision 1.6 2003/02/12 00:50:34 billhorsman
122: change the CVS version to be x.y+ (a bit more informative)
123:
124: Revision 1.5 2003/02/06 17:41:05 billhorsman
125: now uses imported logging
126:
127: Revision 1.4 2003/01/21 10:56:40 billhorsman
128: new version approach
129:
130: Revision 1.3 2003/01/16 11:45:02 billhorsman
131: changed format from x.y+ to x.y.*
132:
133: Revision 1.2 2003/01/16 11:22:00 billhorsman
134: new version
135:
136: Revision 1.1 2003/01/14 23:50:59 billhorsman
137: keeps track of version
138:
139: */
|