01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19:
20: package org.apache.axis2;
21:
22: import org.apache.axis2.i18n.Messages;
23:
24: /**
25: * Little utility to get the version and build date of the axis2.jar.
26: * <p/>
27: * The messages referenced here are automatically kept up-to-date by the
28: * build.xml.
29: */
30: public class Version {
31: /**
32: * Get the version of this AXIS.
33: *
34: * @return the version of this axis2
35: */
36: public static String getVersion() {
37: return Messages.getMessage("axisVersion") + "\n"
38: + Messages.getMessage("builtOn");
39: }
40:
41: /**
42: * Returns the Axis Version number and build date.
43: * <p/>
44: * Example output: 1.1 Jul 08, 2003 (09:00:12 EDT)
45: *
46: * @return the full version of this axis2
47: */
48: public static String getVersionText() {
49: return Messages.getMessage("axisVersionRaw");
50: }
51:
52: /**
53: * Entry point.
54: * <p/>
55: * Calling this with no arguments returns the version of the client-side
56: * axis2.jar.
57: */
58: public static void main(String[] args) {
59: System.out.println(getVersion());
60: }
61: }
|