KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > logicalcobwebs > proxool > Version


1 /*
2  * This software is released under a licence similar to the Apache Software Licence.
3  * See org.logicalcobwebs.proxool.package.html for details.
4  * The latest version is available at http://proxool.sourceforge.net
5  */

6 package org.logicalcobwebs.proxool;
7
8 import org.apache.commons.logging.Log;
9 import org.apache.commons.logging.LogFactory;
10
11 /**
12  * Tells you the version. You can tell what sort of release it is
13  * from the version. For instance:
14  *
15  * 1.0.0 (1 January)
16  * A proper released binary file at version 1.0.
17  *
18  * 1.0.0+
19  * Built from the source based on version 1.0 (but there is no
20  * way of knowing whether the source has been altered).
21  *
22  * 1.0.1 (2 January)
23  * A bug fix release built on January 2nd.
24  *
25  * @version $Revision: 1.20 $, $Date: 2006/01/18 14:40:02 $
26  * @author bill
27  * @author $Author: billhorsman $ (current maintainer)
28  * @since Proxool 0.6
29  */

30 public class Version {
31
32     private static final Log LOG = LogFactory.getLog(Version.class);
33
34     /**
35      * This is changed by the Ant script when you build from the
36      * source code.
37      */

38     private static final String JavaDoc VERSION = null;
39
40     private static final String JavaDoc BUILD_DATE = null;
41
42     private static final String JavaDoc CVS = "0.9.0RC3+";
43
44     public static String JavaDoc getVersion() {
45         StringBuffer JavaDoc version = new StringBuffer JavaDoc();
46
47         if (VERSION != null) {
48             version.append(VERSION);
49         } else {
50             /**
51              * This means that we haven't used the Ant script so this
52              * is just our best guess at the version.
53              */

54             version.append(CVS);
55         }
56
57         if (BUILD_DATE != null) {
58             version.append(" (");
59             version.append(BUILD_DATE);
60             version.append(")");
61         }
62
63         return version.toString();
64     }
65
66     /**
67      * Convenient way of verifying version
68      * @param args none required (any sent are ignored)
69      */

70     public static void main(String JavaDoc[] args) {
71         LOG.info("Version " + getVersion());
72     }
73
74 }
75
76 /*
77  Revision history:
78  $Log: Version.java,v $
79  Revision 1.20 2006/01/18 14:40:02 billhorsman
80  Unbundled Jakarta's Commons Logging.
81
82  Revision 1.19 2005/09/26 21:47:46 billhorsman
83  no message
84
85  Revision 1.18 2003/12/13 12:21:54 billhorsman
86  Release 0.8.3
87
88  Revision 1.17 2003/11/05 00:19:48 billhorsman
89  new revision
90
91  Revision 1.16 2003/10/27 13:13:58 billhorsman
92  new version
93
94  Revision 1.15 2003/10/26 15:23:30 billhorsman
95  0.8.0
96
97  Revision 1.14 2003/10/01 19:31:26 billhorsman
98  0.8.0RC2
99
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  */
Popular Tags