hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [HttpClient][PATCH] Version detection
Date Sun, 01 Jul 2007 18:11:53 GMT
On Sun, 2007-07-01 at 15:33 +0100, sebb wrote:
> On 01/07/07, Roland Weber <ossfwot@dubioso.net> wrote:
> > Hi Oleg,
> >
> > > I certainly do not mind using a properties file. It could also include
> > > SVN revision and some other useful bits. My only reservation is if we go
> > > this route we may well also just read the default parameters out of a
> > > properties file (something we decided to not do for HttpClient 3.x)
> >
> > I've always considered the version info as a debug-only, internal
> > functionality. That's why I was a bit surprised to see you using
> > it for parameterizing the interceptor. Of course it makes sense,
> > at least until we know how to pre-process Java source files.
> 
> Just in case it helps, JMeter uses Ant to edit the version details:
> 
> <replaceregexp file="${src.core}/org/apache/jmeter/util/JMeterVersion.java"
>     	match="VERSION = &quot;.*?&quot;"
> 	replace="VERSION = &quot;${jmeter.version}&quot;"/>
> 
> You might(should?) be able to use <ant:replaceregexp ...> in the maven build.
> 

Yes, this is an option. Calling Ant targets from Maven is (should be)
dead simple.

> I expect you are already aware of this, but if you do use a final Java
> string to hold the version information, make sure that it is private
> and accessed via a method. Otherwise classes that use the string may
> need to be recompiled to pick up any changes (Java may copy the string
> into the referencing class).
> 

I personally was not. Thanks for the hint. We do use accessor methods to
obtain the release version and revision, so we are safe I suppose.

Cheers

Oleg

> > I still have to think about this...
> >
> > cheers,
> >  Roland
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message