@@ -0,0 +1,2814 @@
+package org.apache.forrest;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.util.Properties;%0A%0Aimport org.apache.forrest.eclipse.ForrestPlugin;%0Aimport org.apache.forrest.eclipse.preference.ForrestPreferences;%0Aimport org.apache.log4j.Logger;%0A%0A/**%0A * A representation of te forrest properties.%0A * %0A */%0Apublic class ForrestProperties %7B%0A    /** Path to the root of the Forrest project */%0A    String projectPath;%0A%0A    /**%0A     * Logger for this class%0A     */%0A    private static final Logger logger = Logger%0A            .getLogger(ForrestProperties.class);%0A%0A    /**%0A     * Create a new instance for the supplied projectPath.%0A     * %0A     * @param projectPath -%0A     *            path to the root of the forrest proejct%0A     */%0A    public ForrestProperties(String path) %7B%0A        super();%0A        projectPath = path;%0A    %7D%0A%0A    /**%0A     * Retrieves the value of a property in the forrest.properties file%0A     * %0A     * @param path -%0A     *            path to the forrest.properties file%0A     * @param property -%0A     *            property to get the value from%0A     * %0A     */%0A    public String getProperty(String property) %7B%0A        File defaultFile = new File(getDefaultPropertiesPath());%0A        Properties defaultProps = new Properties();%0A        try %7B%0A            defaultProps.load(new FileInputStream(defaultFile));%0A        %7D catch (FileNotFoundException e) %7B%0A            logger.error(%22Unable to load default forrest properties%22, e);%0A        %7D catch (IOException e) %7B%0A            logger.error(%22Unable to load default forrest properties%22, e);%0A        %7D%0A%0A        File projectFile = new File(getProjectPropertiesPath());%0A        Properties projectProps = new Properties(defaultProps);%0A        try %7B%0A            projectProps.load(new FileInputStream(projectFile));%0A        %7D catch (FileNotFoundException e) %7B%0A            logger.error(%22Unable to load project forrest properties%22, e);%0A        %7D catch (IOException e) %7B%0A            logger.error(%22Unable to load project forrest properties%22, e);%0A        %7D%0A        return projectProps.getProperty(property);%0A    %7D%0A%0A    /**%0A     * Get the path to the projects forrest properties file.%0A     * %0A     * @return path to file.%0A     */%0A    private String getProjectPropertiesPath() %7B%0A        return projectPath + File.separator + %22forrest.properties%22;%0A    %7D%0A%0A    /**%0A     * Get the path to the default forrest properties file.%0A     * %0A     * @return path to file.%0A     */%0A    private String getDefaultPropertiesPath() %7B%0A        String forrestHome = ForrestPlugin.getDefault().getPluginPreferences()%0A                .getString(ForrestPreferences.FORREST_HOME);%0A        return forrestHome + File.separator + %22main%22 + File.separator + %22webapp%22 + File.separator + %22default-forrest.properties%22;%0A    %7D%0A%0A%7D%0A

add ForrestProperties class to facilitate easy maintenance