hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Bloch <bl...@laszlosystems.com>
Subject ant file for converting src from commons-logging to log4j for 2.0.1
Date Mon, 30 Aug 2004 07:23:10 GMT
Attached is an ant build file that can be plopped into your basedir for 
httpclient.  (I tested it with the 2.0.1 src distro rather than a cvs 
dir.)

% ant -buildfile commons-logging-to-log4j.xml -projecthelp
Buildfile: commons-logging-to-log4j.xml
Main targets:

  convert                     convert source from commons-logging to 

                              log4j apis
  install-log4j-properties    copy log4j properties to classes dir
  make-src-backup             make src.orig directory
  revert                      Put original java source code back
  uninstall-log4j-properties  remove log4j properties from classes dir


With some massaging, these targets could probably be renamed and merged 
into build.xml and maintained there (and probably belong there).  Also, 
in my envirionment, I used a build.properties that has 
${commons-logging.jar} pointing to a copy of log4j.jar.  If I were going 
to maintain this inside the commons-httpclient/build.*, I'd rename the 
commons-logging.jar property to ${logging-jar}, too, so things would 
make a little more sense.

I ran the tests and it seems to basically work.  I can now, happily say 
'bubbye' to commons-logging.

Enjoy
-Eric

Mime
View raw message