<!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>
// Find VERSION from a package.<BR>
public static final String VERSION;<BR>
static{<BR>
String version = null;<BR>
try { version = JawaBotApp.class.getPackage().getImplementationVersion(); } catch( Throwable ex ){ log.warn("Couldn't get version."); }<BR>
if( version == null ) version = "";<BR>
VERSION = StringUtils.defaultString( version, "" );<BR>
}<BR>
<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>
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. 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&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&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>