Return-Path: Delivered-To: apmail-avalon-cvs-archive@www.apache.org Received: (qmail 29396 invoked from network); 14 Dec 2003 10:54:52 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Dec 2003 10:54:52 -0000 Received: (qmail 5383 invoked by uid 500); 14 Dec 2003 10:54:24 -0000 Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 5329 invoked by uid 500); 14 Dec 2003 10:54:24 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 5316 invoked from network); 14 Dec 2003 10:54:24 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 14 Dec 2003 10:54:24 -0000 Received: (qmail 29376 invoked by uid 1438); 14 Dec 2003 10:54:50 -0000 Date: 14 Dec 2003 10:54:50 -0000 Message-ID: <20031214105450.29375.qmail@minotaur.apache.org> From: mcconnell@apache.org To: avalon-cvs@apache.org Subject: cvs commit: avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl DefaultCriteria.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mcconnell 2003/12/14 02:54:50 Modified: merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl DefaultCriteria.java Log: Correct bug in directory resolution. Revision Changes Path 1.8 +11 -9 avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java Index: DefaultCriteria.java =================================================================== RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- DefaultCriteria.java 13 Dec 2003 18:25:54 -0000 1.7 +++ DefaultCriteria.java 14 Dec 2003 10:54:50 -0000 1.8 @@ -109,35 +109,35 @@ private static File getAvalonHomeDirectory() { - return getEnvironment( "AVALON_HOME", ".avalon" ); + return getEnvironment( "AVALON_HOME", "avalon.home", ".avalon" ); } private static File getMerlinHomeDirectory() { - return getEnvironment( "MERLIN_HOME", ".merlin" ); + return getEnvironment( "MERLIN_HOME", "merlin.home", ".merlin" ); } - private static File getEnvironment( String symbol, String path ) + private static File getEnvironment( String symbol, String key, String path ) { try { String home = - System.getProperty( - "merlin.home", - Env.getEnvVariable( "MERLIN_HOME" ) ); + System.getProperty( key, Env.getEnvVariable( symbol ) ); if( null != home ) return new File( home ).getCanonicalFile(); return new File( System.getProperty( "user.home" ) + File.separator - + ".merlin" ).getCanonicalFile(); + + path ).getCanonicalFile(); } catch( Throwable e ) { final String error = - "Internal error while attempting to access MERLIN_HOME environment variable."; + "Internal error while attempting to access symbol [" + + symbol + + "] environment variable."; final String message = ExceptionHelper.packException( error, e, true ); throw new RuntimeException( message ); @@ -279,6 +279,8 @@ Defaults defaults = new Defaults( Parameter.getKeys( super.getParameters() ), new String[0], finders ); + + printProperties( defaults, "defaults" ); // // add ${merlin.dir} to assist in synbol expansion then expand --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org