Re: [commons-lang] elegant way to get version information from jar-filename

2007-06-22 Thread Kris Nuttycombe

I take it from your comment that you're still stuck using Java 1.3 or
earlier and hence can't use java.util.regex?

Kris

On 6/22/07, Wabner, Thomas (EXT) <[EMAIL PROTECTED]> wrote:


Hi Jörg,

Many thanks for your answer!

There should not basic support for this in c-l, but with the
StringUtils/Charset and so on, I found it very complicated to achieve such
problem ;-) ... with a regular expression it is easy ... so lets stop the
discussion here ( I have currently a dependency to c-l and don't want to
have another to regexp libs).

- Thomas Wabner


-Original Message-
From: Jörg Schaible [mailto:[EMAIL PROTECTED]
Sent: Freitag, 22. Juni 2007 15:34
To: Jakarta Commons Users List
Subject: RE: [commons-lang] elegant way to get version information from
jar-filename

Hi Thomas,

Wabner, Thomas (EXT) wrote on Friday, June 22, 2007 2:52 PM:

> Hi,
>
>
>
> I cannot find a "nice" way to get the version information from a jar
> filename with the help from commons-lang.
>
>
>
> I have a filename like commons-lang-2.1-SNAPSHOT.jar and will have
> follow information's:
>
>
>
> Basename: "commons-lang"
>
> Versionstr: "2.1-SNAPSHOT"
>
>
>
> Any suggestions are very welcome ;-)

Why should there be support in c-l? This is a pure Maven convention. Look
into the manifest. At least Maven-generated jars have proper values and your
chance to get proper info from other jars increases also.

- Jörg

-
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]





--
Some days you're the magician, some days you're the apprentice.


RE: [commons-lang] elegant way to get version information from jar-filename

2007-06-22 Thread Matt Benson

--- Jörg Schaible <[EMAIL PROTECTED]>
wrote:

> Hi Thomas,
> 
> Wabner, Thomas (EXT) wrote on Friday, June 22, 2007
> 2:52 PM:
> 
> > Hi,
> > 
> > 
> > 
> > I cannot find a "nice" way to get the version
> information from a jar
> > filename with the help from commons-lang.
> > 
> > 
> > 
> > I have a filename like
> commons-lang-2.1-SNAPSHOT.jar and will have
> > follow information's: 
> > 
> > 
> > 
> > Basename: "commons-lang"
> > 
> > Versionstr: "2.1-SNAPSHOT"
> > 
> > 
> > 
> > Any suggestions are very welcome ;-)
> 
> Why should there be support in c-l? This is a pure
> Maven convention. Look into the manifest. At least
> Maven-generated jars have proper values and your
> chance to get proper info from other jars increases
> also.
> 

Awhile back I posted on commons-dev a link to some
code I extracted from Ant to support pulling version
info for a class loaded from a jar.  It might or might
not be suitable for inclusion within the commons but I
never got much feedback from it:

http://people.apache.org/~mbenson/sharedfiles/ImplementationVersion.tar.gz

-Matt

> - Jörg
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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



RE: [commons-lang] elegant way to get version information from jar-filename

2007-06-22 Thread Wabner, Thomas (EXT)
Hi Jörg,

Many thanks for your answer! 

There should not basic support for this in c-l, but with the 
StringUtils/Charset and so on, I found it very complicated to achieve such 
problem ;-) ... with a regular expression it is easy ... so lets stop the 
discussion here ( I have currently a dependency to c-l and don't want to have 
another to regexp libs).

- Thomas Wabner


-Original Message-
From: Jörg Schaible [mailto:[EMAIL PROTECTED] 
Sent: Freitag, 22. Juni 2007 15:34
To: Jakarta Commons Users List
Subject: RE: [commons-lang] elegant way to get version information from 
jar-filename

Hi Thomas,

Wabner, Thomas (EXT) wrote on Friday, June 22, 2007 2:52 PM:

> Hi,
> 
> 
> 
> I cannot find a "nice" way to get the version information from a jar
> filename with the help from commons-lang.
> 
> 
> 
> I have a filename like commons-lang-2.1-SNAPSHOT.jar and will have
> follow information's: 
> 
> 
> 
> Basename: "commons-lang"
> 
> Versionstr: "2.1-SNAPSHOT"
> 
> 
> 
> Any suggestions are very welcome ;-)

Why should there be support in c-l? This is a pure Maven convention. Look into 
the manifest. At least Maven-generated jars have proper values and your chance 
to get proper info from other jars increases also.

- Jörg

-
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: [commons-lang] elegant way to get version information from jar-filename

2007-06-22 Thread Jörg Schaible
Hi Thomas,

Wabner, Thomas (EXT) wrote on Friday, June 22, 2007 2:52 PM:

> Hi,
> 
> 
> 
> I cannot find a "nice" way to get the version information from a jar
> filename with the help from commons-lang.
> 
> 
> 
> I have a filename like commons-lang-2.1-SNAPSHOT.jar and will have
> follow information's: 
> 
> 
> 
> Basename: "commons-lang"
> 
> Versionstr: "2.1-SNAPSHOT"
> 
> 
> 
> Any suggestions are very welcome ;-)

Why should there be support in c-l? This is a pure Maven convention. Look into 
the manifest. At least Maven-generated jars have proper values and your chance 
to get proper info from other jars increases also.

- Jörg

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