com.perforce.maven.scm.provider
Class Metadata

java.lang.Object
  extended by com.perforce.maven.scm.provider.Metadata

public class Metadata
extends Object

Prints information from the JAR file's manifest.


Constructor Summary
Metadata()
           
 
Method Summary
static Manifest getManifest()
          Get the JAR Manifest associated with this class instance, if it exists.
static void main(String[] args)
          Public main method, used solely for allowing customers to print version and other metadata information from the enclosing JAR file's manifest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Metadata

public Metadata()
Method Detail

main

public static void main(String[] args)
Public main method, used solely for allowing customers to print version and other metadata information from the enclosing JAR file's manifest. This information is printed to stdout; errors are printed to stderr.

Parameters:
args - not used.

getManifest

public static Manifest getManifest()
                            throws Exception
Get the JAR Manifest associated with this class instance, if it exists. The interpretation of the attributes in this manifest is not defined here and will depend on how the jar was built; for a full list of normal Perforce release build attributes, contact support, but in general, most of the normal Maven build attributes will probably exist, as will Name.IMPLEMENTATION_TITLE and Name.IMPLEMENTATION_VERSION (but this is not guaranteed).

Returns:
non-null Manifest object if it exists and is retrievable.
Throws:
Exception - if the manifest can't be found or retrieved for any reason.


Copyright © 2003-2011 Perforce Software. All Rights Reserved.