On Tue, 26 Feb 2002, Diane Holt wrote: > Rather than go into the specific things I needed it to do, a more recent > use-case is this thing of people wanting to say (eg.) 'ant prod' and have > it basically be the equivalent of 'ant -Dtarget=prod'. I posted a sample > .antrc to handle that, but, again, it's not really the kind of thing you'd > want to require everyone to put a copy of in their home dir. So adding > processing of a (eg.) $ANT_HOME/etc/.antrc in addition to a $HOME/.antrc > would make things like that much more appealing and doable. > > Anyone see any problems with it? I'd say, process the one in $ANT_HOME > first, then the one in $HOME (to allow for personalized overrides), yes?
I'm not sure - I completely agree with the idea of having some 'per user' and 'per installation' config, and changing 'ant prod' to 'ant -Dtarget=prod' would be very usefull. However I think it should be done in the java side, not in sh/bat. I would go in a oposing direction, and 'deprecate' .antrc and replace it with a platform independent file and logic in java. ( by 'deprecate' I mean providing and recommending the alternative, of course :-) BTW, I'm not sure if ant already has something like that, but there's a method in tomcat that will look into the CLASSPATH and 'guess' TOMCAT_HOME ( this is intended as a java replacement for the .sh code that sets tomcat home from $0 ). That makes 'java -jar .../tomcat.jar' equivalent with tomcat.sh. Costin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
