Return-Path: Delivered-To: apmail-forrest-svn-archive@www.apache.org Received: (qmail 12943 invoked from network); 3 Apr 2006 23:19:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Apr 2006 23:19:14 -0000 Received: (qmail 95026 invoked by uid 500); 3 Apr 2006 23:19:12 -0000 Delivered-To: apmail-forrest-svn-archive@forrest.apache.org Received: (qmail 94986 invoked by uid 500); 3 Apr 2006 23:19:11 -0000 Mailing-List: contact svn-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Forrest Developers List" List-Id: Delivered-To: mailing list svn@forrest.apache.org Received: (qmail 94975 invoked by uid 99); 3 Apr 2006 23:19:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Apr 2006 16:19:11 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 03 Apr 2006 16:19:11 -0700 Received: (qmail 12843 invoked by uid 65534); 3 Apr 2006 23:18:50 -0000 Message-ID: <20060403231850.12840.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r391173 - /forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Date: Mon, 03 Apr 2006 23:18:49 -0000 To: svn@forrest.apache.org From: thorsten@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: thorsten Date: Mon Apr 3 16:18:47 2006 New Revision: 391173 URL: http://svn.apache.org/viewcvs?rev=391173&view=rev Log: Extracting helper method. Modified: forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Modified: forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java URL: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java?rev=391173&r1=391172&r2=391173&view=diff ============================================================================== --- forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java (original) +++ forrest/trunk/main/java/org/apache/forrest/conf/ForrestConfModule.java Mon Apr 3 16:18:47 2006 @@ -115,16 +115,8 @@ public void initialize() throws Exception { - forrestHome = ForrestConfUtils.getForrestHome(); - projectHome = ForrestConfUtils.getProjectHome(); - contextHome = ForrestConfUtils.getContextHome(); - - filteringProperties = new AntProperties(); - - // add forrest.home and project.home to properties - filteringProperties.setProperty("forrest.home", forrestHome); - filteringProperties.setProperty("project.home", projectHome); - filteringProperties.setProperty("context.home", contextHome); + // add all homes important to forrest to the properties + setHomes(); // NOTE: the first values set get precedence, as in AntProperties @@ -208,6 +200,25 @@ if (debugging()) debug("Loaded project forrest.properties:" + filteringProperties); } + + /** + * Sets all forrest related home locations such as + * - forrestHome + * - projectHome + * - contextHome + * @throws Exception + */ + private void setHomes() throws Exception { + forrestHome = ForrestConfUtils.getForrestHome(); + projectHome = ForrestConfUtils.getProjectHome(); + contextHome = ForrestConfUtils.getContextHome(); + + filteringProperties = new AntProperties(); + + filteringProperties.setProperty("forrest.home", forrestHome); + filteringProperties.setProperty("project.home", projectHome); + filteringProperties.setProperty("context.home", contextHome); + } /** * Override any properties for which a system property exists