|
Thorsten Scherler made changes - 19/Sep/06 09:56 AM
Should be fixed now. Can you please verify and then close this issue.
TIA
Thorsten Scherler made changes - 19/Sep/06 10:43 AM
David Crossley made changes - 19/Sep/06 11:28 PM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This leads to the NullpointerException in ForrestConfUtils.aliasSkinProperties().
---------------------
String skinName = props.getProperty("project.skin");
if (skinName.equals("crust")) { <<<<------ skinName is 'null'
setSkinToUse(props, "krysalis-site");
--------------------
My suggestion is, to reinsert the code to import forrest.properties file in ForrestConfModule.java:
Index: E:/user/martins/devel/eclipse-ws/apache-forrest/main/java/org/apache/forrest/conf/ForrestConfModule.java
===================================================================
Index: E:/user/martins/devel/eclipse-ws/apache-forrest/main/java/org/apache/forrest/conf/ForrestConfModule.java
===================================================================
--- org/apache/forrest/conf/ForrestConfModule.java (revision 447107)
+++ org/apache/forrest/conf/ForrestConfModule.java (working copy)
@@ -175,6 +175,20 @@
filteringProperties = loadXMLPropertiesFromURI(filteringProperties,
forrestPropertiesStringURI);
+ // get forrest.properties and load the values
+ forrestPropertiesStringURI = projectHome + SystemUtils.FILE_SEPARATOR
+ + "forrest.properties";
+ filteringProperties = loadAntPropertiesFromURI(filteringProperties,
+ forrestPropertiesStringURI);
+
+ // get default-forrest.properties and load the values
+ String defaultForrestPropertiesStringURI = contextHome + SystemUtils.FILE_SEPARATOR
+ + "default-forrest.properties";
+ filteringProperties = loadAntPropertiesFromURI(filteringProperties,
+ defaultForrestPropertiesStringURI);
+
+
+
// Load plugin default properties
String strPluginList = filteringProperties
.getProperty("project.required.plugins");
@@ -309,5 +323,46 @@
private final void debug(String debugString) {
getLogger().debug(debugString);
}
+
+ /**
+ * @param antPropertiesStringURI
+ * @throws MalformedURLException
+ * @throws IOException
+ * @throws SourceNotFoundException
+ */
+ private AntProperties loadAntPropertiesFromURI(AntProperties precedingProperties,
+ String antPropertiesStringURI) throws MalformedURLException, IOException,
+ SourceNotFoundException {
+ Source source = null;
+ InputStream in = null;
+ try {
+ source = m_resolver.resolveURI(antPropertiesStringURI);
+ if (debugging())
+ debug("Searching for forrest.properties in" + source.getURI());
+ if (source.exists()){
+ in = source.getInputStream();
+ filteringProperties = new AntProperties(precedingProperties);
+ filteringProperties.load(in);
+
+ if (debugging())
+ debug("Loaded:" + antPropertiesStringURI + filteringProperties.toString());
+ }
+
+ } finally {
+ if (source != null) {
+ m_resolver.release(source);
+ }
+ if (in != null) {
+ try {
+ in.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ return filteringProperties;
+ }
+
+
}