<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#ffffff">
1) Let maven set version in MANIFEST.MF<BR>
2)<BR>
&nbsp;&nbsp;&nbsp; // Find VERSION from a package.<BR>
&nbsp;&nbsp;&nbsp; public static final String VERSION;<BR>
&nbsp;&nbsp;&nbsp; static{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String version = null;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try { version = JawaBotApp.class.getPackage().getImplementationVersion(); } catch( Throwable ex ){ log.warn(&quot;Couldn't get version.&quot;);&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( version == null ) version = &quot;&quot;;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VERSION = StringUtils.defaultString( version, &quot;&quot; );<BR>
&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp; <BR>
<BR>
Ondra<BR>
<BR>
<BR>
<BR>
On Tue, 2011-11-01 at 10:34 -0500, Anil Saldhana wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    Hi all,<BR>
    &nbsp; printing something like the following:<BR>
    INFO: Infinispan version: Infinispan 'Ursus' 4.2.1.FINAL<BR>
    <BR>
    is very useful when debugging user's issues.<BR>
    <BR>
    I am interested in how project's do this.&nbsp; I can create a Version.java but if maven releases do not change the value, then it is pointless.<BR>
    <BR>
    Jesper says:<BR>
    ===========<BR>
    <FONT SIZE="2"><FONT COLOR="#af7f00">(10:32:45 AM) </FONT></FONT>jpederse: anilsaldhana: our Version.java is generated as part of the build - and the version identifiers substituted<BR>
    <FONT SIZE="2"><FONT COLOR="#af7f00">(10:33:32 AM) </FONT></FONT>jpederse: anilsaldhana: <A HREF="http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/Version.java.in?revision=108434&amp;view=markup">http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/Version.java.in?revision=108434&amp;view=markup</A><BR>
    ===========<BR>
    <BR>
    Regards,<BR>
    Anil
<PRE>
_______________________________________________
jboss-as7-dev mailing list
<A HREF="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</A>
<A HREF="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>