Re: runtime inspection of release info

2003-10-23 Thread Ewan Harrow
This looks to be fixed now in the recently released 1.4.2_02

 --- Ewan Harrow <[EMAIL PROTECTED]> wrote: > This is a known bug with
1.4.2 see
> http://developer.java.sun.com/developer/bugParade/bugs/4893051.html
> 
> 
>  --- Marc Portier <[EMAIL PROTECTED]> wrote: > Sonnek,
> > 
> > worked here immediately
> > I did make sure I was running the class from the jar (and not from 
> > target/classes in the classpath)
> > 
> > afraid I haven't got more ideas here and now..
> > -marc=
> > 
> > Sonnek, Ryan wrote:
> > 
> > > Sorry about the OT question, but how did you extract the
> > > implementation-version info?  Running in winxp, suns' sdk 1.4.2,
> I
> > get null
> > > whenever I try to get the info.  Maven built the manifest
> > correctly, but my
> > > app can't get the info.  Here's what I've tried:
> > > 
> > > //these two give me null for the implementation version
> > > MyClass.class.getPackage().getImplementationVersion();
> > > this.getClass().getPackage().getImplementationVersion();
> > > 
> > > //this gives me a NPE on the getPackage() call.
> > > Package.getPackage("maven version
> > info").getImplementationVersion();
> > > 
> > > 
> > > I've gone through several forums enteries, but haven't got code
> > working so
> > > far.  Appreciate any help or direction!
> > > 
> > > Ryan
> > > 
> > > -Original Message-
> > > From: Marc Portier [mailto:[EMAIL PROTECTED] 
> > > Sent: Wednesday, October 15, 2003 6:37 AM
> > > To: Maven Users List
> > > Subject: Re: runtime inspection of release info
> > > 
> > > wow, thx Mike, was indeed what I was looking for.
> > > looks like another one of the well kept secrets of java.lang.*
> :-)
> > > 
> > > -marc=
> > > 
> > > Mike Gilbert wrote:
> > > 
> > > 
> > >>Hi Marc,
> > >>
> > >>have a look at
> > >>
> > > 
> > >
> >
>
http://java.sun.com/products/jdk/1.2/docs/guide/versioning/spec/VersioningSp
> > > 
> > >>ecification.html#PackageVersioning
> > >>
> > >>and
> > >>
> > >>http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Package.html
> > >>
> > >>
> > >>
> > >>
> > >>>-Original Message-
> > >>>From: Marc Portier [mailto:[EMAIL PROTECTED]
> > >>>Sent: Wednesday, October 15, 2003 8:04 AM
> > >>>To: 'Maven Users List'
> > >>>Subject: runtime inspection of release info
> > >>>
> > >>>
> > >>>Hi all,
> > >>>
> > >>>I want to achieve the following:
> > >>>- have an easy mechanism for applications to be able to inspect
> > their
> > >>>own release information at runtime... (think about:
> > >>>help/about dialogs
> > >>>or log statements showing some release info)
> > >>>
> > >>>(the info to gather would be the kind of stuf inside the
> > >>>manifest.mf file)
> > >>>
> > >>>
> > >>>I was thinking of the following approach:
> > >>>- generate just before compilation a class
> > >>>myproject.package.ReleaseInfo
> > >>>that holds the info hardcoded
> > >>>
> > >>>
> > >>>before delving into it deaper I was hoping one of you could tell
> > me:
> > >>>1/ it's already done (couldn't find it)
> > >>>2/ euh, a number of reasons not to get to do it ;-)
> > >>>3/ sensible suggestions towards just doing it
> > >>>
> > >>>regards and thx
> > >>>-marc=
> > >>>--
> > >>>Marc Portierhttp://outerthought.org/
> > >>>Outerthought - Open Source, Java & XML Competence Support Center
> > >>>Read my weblog at  http://radio.weblogs.com/0116284/
> > >>>[EMAIL PROTECTED]  [EMAIL PROTECTED]
> > >>>
> > >>>
> >
>
>>>-
> > >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >>>For additional commands, e-mail: [EMAIL PROTECTED]
> > >>>
> >

Re: runtime inspection of release info

2003-10-16 Thread Ewan Harrow
This is a known bug with 1.4.2 see
http://developer.java.sun.com/developer/bugParade/bugs/4893051.html


 --- Marc Portier <[EMAIL PROTECTED]> wrote: > Sonnek,
> 
> worked here immediately
> I did make sure I was running the class from the jar (and not from 
> target/classes in the classpath)
> 
> afraid I haven't got more ideas here and now..
> -marc=
> 
> Sonnek, Ryan wrote:
> 
> > Sorry about the OT question, but how did you extract the
> > implementation-version info?  Running in winxp, suns' sdk 1.4.2, I
> get null
> > whenever I try to get the info.  Maven built the manifest
> correctly, but my
> > app can't get the info.  Here's what I've tried:
> > 
> > //these two give me null for the implementation version
> > MyClass.class.getPackage().getImplementationVersion();
> > this.getClass().getPackage().getImplementationVersion();
> > 
> > //this gives me a NPE on the getPackage() call.
> > Package.getPackage("maven version
> info").getImplementationVersion();
> > 
> > 
> > I've gone through several forums enteries, but haven't got code
> working so
> > far.  Appreciate any help or direction!
> > 
> > Ryan
> > 
> > -Original Message-
> > From: Marc Portier [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, October 15, 2003 6:37 AM
> > To: Maven Users List
> > Subject: Re: runtime inspection of release info
> > 
> > wow, thx Mike, was indeed what I was looking for.
> > looks like another one of the well kept secrets of java.lang.* :-)
> > 
> > -marc=
> > 
> > Mike Gilbert wrote:
> > 
> > 
> >>Hi Marc,
> >>
> >>have a look at
> >>
> > 
> >
>
http://java.sun.com/products/jdk/1.2/docs/guide/versioning/spec/VersioningSp
> > 
> >>ecification.html#PackageVersioning
> >>
> >>and
> >>
> >>http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Package.html
> >>
> >>
> >>
> >>
> >>>-Original Message-
> >>>From: Marc Portier [mailto:[EMAIL PROTECTED]
> >>>Sent: Wednesday, October 15, 2003 8:04 AM
> >>>To: 'Maven Users List'
> >>>Subject: runtime inspection of release info
> >>>
> >>>
> >>>Hi all,
> >>>
> >>>I want to achieve the following:
> >>>- have an easy mechanism for applications to be able to inspect
> their
> >>>own release information at runtime... (think about:
> >>>help/about dialogs
> >>>or log statements showing some release info)
> >>>
> >>>(the info to gather would be the kind of stuf inside the
> >>>manifest.mf file)
> >>>
> >>>
> >>>I was thinking of the following approach:
> >>>- generate just before compilation a class
> >>>myproject.package.ReleaseInfo
> >>>that holds the info hardcoded
> >>>
> >>>
> >>>before delving into it deaper I was hoping one of you could tell
> me:
> >>>1/ it's already done (couldn't find it)
> >>>2/ euh, a number of reasons not to get to do it ;-)
> >>>3/ sensible suggestions towards just doing it
> >>>
> >>>regards and thx
> >>>-marc=
> >>>--
> >>>Marc Portierhttp://outerthought.org/
> >>>Outerthought - Open Source, Java & XML Competence Support Center
> >>>Read my weblog at  http://radio.weblogs.com/0116284/
> >>>[EMAIL PROTECTED]  [EMAIL PROTECTED]
> >>>
> >>>
>
>>>-
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>---
> >>>Incoming mail is certified Virus Free.
> >>>Checked by AVG anti-virus system (http://www.grisoft.com).
> >>>Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
> >>>
> >>
> >>
> >>---
> >>Outgoing mail is certified Virus Free.
> >>Checked by AVG anti-virus system (http://www.grisoft.com).
> >>Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
> >>
> >>
> >>
>
>>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> > 
> > 
> 
> -- 
> Marc Portierhttp://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at  http://radio.weblogs.com/0116284/
> [EMAIL PROTECTED]  [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  

=
Ewan Harrow [EMAIL PROTECTED]
+44 (0) 7092 108950 http://www.ewanharrow.com


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: runtime inspection of release info

2003-10-15 Thread Marc Portier
Sonnek,

worked here immediately
I did make sure I was running the class from the jar (and not from 
target/classes in the classpath)

afraid I haven't got more ideas here and now..
-marc=
Sonnek, Ryan wrote:

Sorry about the OT question, but how did you extract the
implementation-version info?  Running in winxp, suns' sdk 1.4.2, I get null
whenever I try to get the info.  Maven built the manifest correctly, but my
app can't get the info.  Here's what I've tried:
//these two give me null for the implementation version
MyClass.class.getPackage().getImplementationVersion();
this.getClass().getPackage().getImplementationVersion();
//this gives me a NPE on the getPackage() call.
Package.getPackage("maven version info").getImplementationVersion();
I've gone through several forums enteries, but haven't got code working so
far.  Appreciate any help or direction!
Ryan

-Original Message-
From: Marc Portier [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 15, 2003 6:37 AM
To: Maven Users List
Subject: Re: runtime inspection of release info

wow, thx Mike, was indeed what I was looking for.
looks like another one of the well kept secrets of java.lang.* :-)
-marc=

Mike Gilbert wrote:


Hi Marc,

have a look at

http://java.sun.com/products/jdk/1.2/docs/guide/versioning/spec/VersioningSp

ecification.html#PackageVersioning

and

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Package.html




-Original Message-
From: Marc Portier [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 8:04 AM
To: 'Maven Users List'
Subject: runtime inspection of release info
Hi all,

I want to achieve the following:
- have an easy mechanism for applications to be able to inspect their
own release information at runtime... (think about:
help/about dialogs
or log statements showing some release info)
(the info to gather would be the kind of stuf inside the
manifest.mf file)
I was thinking of the following approach:
- generate just before compilation a class
myproject.package.ReleaseInfo
that holds the info hardcoded
before delving into it deaper I was hoping one of you could tell me:
1/ it's already done (couldn't find it)
2/ euh, a number of reasons not to get to do it ;-)
3/ sensible suggestions towards just doing it
regards and thx
-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at  http://radio.weblogs.com/0116284/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at  http://radio.weblogs.com/0116284/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: runtime inspection of release info

2003-10-15 Thread Sonnek, Ryan
Sorry about the OT question, but how did you extract the
implementation-version info?  Running in winxp, suns' sdk 1.4.2, I get null
whenever I try to get the info.  Maven built the manifest correctly, but my
app can't get the info.  Here's what I've tried:

//these two give me null for the implementation version
MyClass.class.getPackage().getImplementationVersion();
this.getClass().getPackage().getImplementationVersion();

//this gives me a NPE on the getPackage() call.
Package.getPackage("maven version info").getImplementationVersion();


I've gone through several forums enteries, but haven't got code working so
far.  Appreciate any help or direction!

Ryan

-Original Message-
From: Marc Portier [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 15, 2003 6:37 AM
To: Maven Users List
Subject: Re: runtime inspection of release info

wow, thx Mike, was indeed what I was looking for.
looks like another one of the well kept secrets of java.lang.* :-)

-marc=

Mike Gilbert wrote:

> Hi Marc,
> 
> have a look at
>
http://java.sun.com/products/jdk/1.2/docs/guide/versioning/spec/VersioningSp
> ecification.html#PackageVersioning
> 
> and
> 
> http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Package.html
> 
> 
> 
>>-Original Message-
>>From: Marc Portier [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, October 15, 2003 8:04 AM
>>To: 'Maven Users List'
>>Subject: runtime inspection of release info
>>
>>
>>Hi all,
>>
>>I want to achieve the following:
>>- have an easy mechanism for applications to be able to inspect their
>>own release information at runtime... (think about:
>>help/about dialogs
>>or log statements showing some release info)
>>
>>(the info to gather would be the kind of stuf inside the
>>manifest.mf file)
>>
>>
>>I was thinking of the following approach:
>>- generate just before compilation a class
>>myproject.package.ReleaseInfo
>>that holds the info hardcoded
>>
>>
>>before delving into it deaper I was hoping one of you could tell me:
>>1/ it's already done (couldn't find it)
>>2/ euh, a number of reasons not to get to do it ;-)
>>3/ sensible suggestions towards just doing it
>>
>>regards and thx
>>-marc=
>>--
>>Marc Portierhttp://outerthought.org/
>>Outerthought - Open Source, Java & XML Competence Support Center
>>Read my weblog at  http://radio.weblogs.com/0116284/
>>[EMAIL PROTECTED]  [EMAIL PROTECTED]
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>---
>>Incoming mail is certified Virus Free.
>>Checked by AVG anti-virus system (http://www.grisoft.com).
>>Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
>>
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at  http://radio.weblogs.com/0116284/
[EMAIL PROTECTED]  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: runtime inspection of release info

2003-10-15 Thread Jason van Zyl
On Wed, 2003-10-15 at 03:04, Marc Portier wrote:
> Hi all,
> 
> I want to achieve the following:
> - have an easy mechanism for applications to be able to inspect their 
> own release information at runtime... (think about: help/about dialogs 
> or log statements showing some release info)
> 
> (the info to gather would be the kind of stuf inside the manifest.mf file)
> 
> 
> I was thinking of the following approach:
> - generate just before compilation a class myproject.package.ReleaseInfo 
> that holds the info hardcoded

What about simply packing the POM with your application and using some
of the classes in Maven to turn the XML POM into a Project class which
you can then use inside your application to display information related
to the project?

> 
> before delving into it deaper I was hoping one of you could tell me:
> 1/ it's already done (couldn't find it)
> 2/ euh, a number of reasons not to get to do it ;-)
> 3/ sensible suggestions towards just doing it
> 
> regards and thx
> -marc=
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: runtime inspection of release info

2003-10-15 Thread Marc Portier
wow, thx Mike, was indeed what I was looking for.
looks like another one of the well kept secrets of java.lang.* :-)
-marc=

Mike Gilbert wrote:

Hi Marc,

have a look at
http://java.sun.com/products/jdk/1.2/docs/guide/versioning/spec/VersioningSp
ecification.html#PackageVersioning
and

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Package.html



-Original Message-
From: Marc Portier [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 8:04 AM
To: 'Maven Users List'
Subject: runtime inspection of release info
Hi all,

I want to achieve the following:
- have an easy mechanism for applications to be able to inspect their
own release information at runtime... (think about:
help/about dialogs
or log statements showing some release info)
(the info to gather would be the kind of stuf inside the
manifest.mf file)
I was thinking of the following approach:
- generate just before compilation a class
myproject.package.ReleaseInfo
that holds the info hardcoded
before delving into it deaper I was hoping one of you could tell me:
1/ it's already done (couldn't find it)
2/ euh, a number of reasons not to get to do it ;-)
3/ sensible suggestions towards just doing it
regards and thx
-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at  http://radio.weblogs.com/0116284/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at  http://radio.weblogs.com/0116284/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: runtime inspection of release info

2003-10-15 Thread Mike Gilbert
Hi Marc,

have a look at
http://java.sun.com/products/jdk/1.2/docs/guide/versioning/spec/VersioningSp
ecification.html#PackageVersioning

and

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Package.html


> -Original Message-
> From: Marc Portier [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 15, 2003 8:04 AM
> To: 'Maven Users List'
> Subject: runtime inspection of release info
>
>
> Hi all,
>
> I want to achieve the following:
> - have an easy mechanism for applications to be able to inspect their
> own release information at runtime... (think about:
> help/about dialogs
> or log statements showing some release info)
>
> (the info to gather would be the kind of stuf inside the
> manifest.mf file)
>
>
> I was thinking of the following approach:
> - generate just before compilation a class
> myproject.package.ReleaseInfo
> that holds the info hardcoded
>
>
> before delving into it deaper I was hoping one of you could tell me:
> 1/ it's already done (couldn't find it)
> 2/ euh, a number of reasons not to get to do it ;-)
> 3/ sensible suggestions towards just doing it
>
> regards and thx
> -marc=
> --
> Marc Portierhttp://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at  http://radio.weblogs.com/0116284/
> [EMAIL PROTECTED]  [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



runtime inspection of release info

2003-10-15 Thread Marc Portier
Hi all,

I want to achieve the following:
- have an easy mechanism for applications to be able to inspect their 
own release information at runtime... (think about: help/about dialogs 
or log statements showing some release info)

(the info to gather would be the kind of stuf inside the manifest.mf file)

I was thinking of the following approach:
- generate just before compilation a class myproject.package.ReleaseInfo 
that holds the info hardcoded

before delving into it deaper I was hoping one of you could tell me:
1/ it's already done (couldn't find it)
2/ euh, a number of reasons not to get to do it ;-)
3/ sensible suggestions towards just doing it
regards and thx
-marc=
--
Marc Portierhttp://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at  http://radio.weblogs.com/0116284/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]