[jboss-as7-dev] Printing project version number during AS start
Max Rydahl Andersen
max.andersen at redhat.com
Thu Nov 3 04:53:46 EDT 2011
On Nov 2, 2011, at 23:40, David M. Lloyd wrote:
> I'd have to recommend against it. I've used the injection plugin quite
> a lot and my verdict is, Javassist mangles the class file too much and
> screws up the debug information, and makes certain agents actually crash
> upon reading the file,
+1 especially jacoco which uses ASM which gets confused since the injection doesn't
update the debug pointers.
And if you got other methods in that class use of a normal debugger will be screwed too.
> I've switched to a new scheme in JBoss Modules and if it works out, I'll
> use the same scheme for my other projects as well (see that project's
> Main class static initializers).
You use the get info from manifest approach, right ?
but that works for you because you aren't running inside the appserver :)
/max
>
> On 11/02/2011 01:12 PM, Anil Saldhana wrote:
>> I am following what DML has done for remoting3 (thx Kabir for the link).
>>
>> On 11/02/2011 08:34 AM, Marek Novotny wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Seam uses
>>>
>>> public static String getVersion()
>>> {
>>> Package pkg = Seam.class.getPackage();
>>> return pkg != null ? pkg.getImplementationVersion() : null;
>>> }
>>> This doesn't work on AS7 as I have noticed.
>>> https://issues.jboss.org/browse/JBSEAM-4830
>>>
>>> On 11/01/2011 06:45 PM, Ondrej Zizka wrote:
>>>> 1) Let maven set version in MANIFEST.MF
>>>> 2)
>>>> // Find VERSION from a package.
>>>> public static final String VERSION;
>>>> static{
>>>> String version = null;
>>>> try { version =
>>>> JawaBotApp.class.getPackage().getImplementationVersion(); } catch(
>>>> Throwable ex ){ log.warn("Couldn't get version."); }
>>>> if( version == null ) version = "";
>>>> VERSION = StringUtils.defaultString( version, "" );
>>>> }
>>>>
>>>>
>>>> Ondra
>>>>
>>>>
>>>>
>>>> On Tue, 2011-11-01 at 10:34 -0500, Anil Saldhana wrote:
>>>>> Hi all,
>>>>> printing something like the following:
>>>>> INFO: Infinispan version: Infinispan 'Ursus' 4.2.1.FINAL
>>>>>
>>>>> is very useful when debugging user's issues.
>>>>>
>>>>> 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.
>>>>>
>>>>> Jesper says:
>>>>> ===========
>>>>> (10:32:45 AM) jpederse: anilsaldhana: our Version.java is generated as
>>>>> part of the build - and the version identifiers substituted
>>>>> (10:33:32 AM) jpederse: anilsaldhana:
>>>>> 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>
>>>>> ===========
>>>>>
>>>>> Regards,
>>>>> Anil
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> jboss-as7-dev at lists.jboss.org<mailto:jboss-as7-dev at lists.jboss.org>
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> jboss-as7-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>
>>> - --
>>> Marek Novotny
>>> - --
>>> Seam Product Lead
>>>
>>> Red Hat Czech s.r.o.
>>> Purkynova 99
>>> 612 45 Brno
>>>
>>> Email: mnovotny at redhat.com
>>> Office phone: +420 532 294 287, ext. 82-62 087
>>> mobile: +420 608 509 230
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>>
>>> iEYEARECAAYFAk6xRuAACgkQU4HO8G8hNxXwoACfe2l/GYaV6yF7evpaWoGRt0V1
>>> N8cAniNuG2trzG1jcndbcVvHl6t+dSoj
>>> =LecU
>>> -----END PGP SIGNATURE-----
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
> --
> - DML
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
/max
http://about.me/maxandersen
More information about the jboss-as7-dev
mailing list