org.apache.tapestry5
Class VersionUtils

java.lang.Object
  extended by org.apache.tapestry5.VersionUtils

public class VersionUtils
extends Object

Utility methods related to managing framework version numbers.


Constructor Summary
VersionUtils()
           
 
Method Summary
static String readVersionNumber(String resourcePath)
          Reads a version number from a properties file on the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionUtils

public VersionUtils()
Method Detail

readVersionNumber

public static String readVersionNumber(String resourcePath)
Reads a version number from a properties file on the classpath. These files are generally created by Maven. For example, tapestry-core's properties file is META-INF/maven/org.apache.tapestry/tapestry-core/pom.properties. The Maven generated properties files include the artifact id and group id as well as the version.

The resource is located using the Thread's context class loader.

Parameters:
resourcePath - the complete path to the resource, including a leading slash.
Returns:
the version number read from the properties file, or "UNKNOWN" if the version number is not present or the file can not be opened


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.