org.seasar.aptina.commons.util
クラス VersionUtils

java.lang.Object
  上位を拡張 org.seasar.aptina.commons.util.VersionUtils

public class VersionUtils
extends Object

バージョンを扱うユーティリティです.

作成者:
koichik

メソッドの概要
static String getVersion(String groupId, String artifactId)
          Maven が作成した Jar に含まれている pom.properties からプロダクトのバージョンを返します.
static String getVersion(String groupId, String artifactId, String defaultValue)
          Maven が作成した Jar に含まれている pom.properties からプロダクトのバージョンを返します.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

getVersion

public static String getVersion(String groupId,
                                String artifactId)
Maven が作成した Jar に含まれている pom.properties からプロダクトのバージョンを返します.

バージョンを取得できなかった場合は null を返します.

パラメータ:
groupId - グループ ID
artifactId - アーティファクト ID
戻り値:
バージョンまたは null

getVersion

public static String getVersion(String groupId,
                                String artifactId,
                                String defaultValue)
Maven が作成した Jar に含まれている pom.properties からプロダクトのバージョンを返します.

バージョンを取得できなかった場合はデフォルト値を返します.

パラメータ:
groupId - グループ ID
artifactId - アーティファクト ID
defaultValue - バージョンを取得できなかった場合のデフォルト値
戻り値:
バージョンまたはデフォルト値


Copyright © 2009-2010 The Seasar Foundation. All Rights Reserved.