From: Alistair Y. <ali...@sm...> - 2005-05-25 15:39:44
|
cmon, give me some credit - I don't hard code! bodingtonProperties is set via breq.getRealPath("/WEB-INF/bodington.properties") on windows it comes out with backslashes as it should, however, this is no normal system, this is bodington and the result has to be written as code into a java file: writer.println("bodingtonProperties = \"" + bodingtonProperties + "\";"); I could just do bodingtonProperties.replaceAll("\\", "\\\\"); the only reason I need bodingtonProperties is to get the language debug level as BuildingContext is incapable of updating bodington.properties - it reads it once then forgets it's there, so using BuildingContext.getProperty() doesn't work in a dynamic environment - unless I've missed something? the alternative is to store the debug level as a user setting but that's overkill. A debug level was specifically requested and bodington.properties was the cleanest way to do it. I hope you meant the hardback edition of the beano annual? Would you like to do the build file update for res.jar seeing you designed the process and are more familiar with it? Alistair On 25 May 2005, at 16:23, Alexis O'Connor wrote: > Alistair Young wrote: >> I have humbly committed an updated build.xml to jar up the res dir >> and bung it in WEB-INF/lib/res.jar >> bod is now i18n >> Alistair > > OK, time for Alistair to stuff a copy of the Beano annual down the > back of his shorts again ;-). > > Getting there with the build.xml. However, it would be good if the > res.jar followed the pattern of bodserver.jar. This would mean that > the resources lie in unpacked form under WEB-INF/classes (for the > 'deploy-local' target to take advantage of) and only get bundled into > a jar by 'create-war'. > > More importantly though, it still doesn't work on Windows :-(. (Stack > trace attached). An 'escaping backslash in strings' problem. Why are > you hardcoding the location of bodington.properties? Can you not get > hold of the properties via BuildingServer? > > > Alexis > Compilation messages... > -classpath > /C:/j2sdk1.4.2_08/jre/lib/ext/dnsns.jar;/C:/j2sdk1.4.2_08/jre/lib/ext/ > ldapsec.jar;/C:/j2sdk1.4.2_08/jre/lib/ext/localedata.jar;/C:/ > j2sdk1.4.2_08/jre/lib/ext/pg74.215.jdbc3.jar;/C:/j2sdk1.4.2_08/jre/ > lib/ext/sunjce_provider.jar;/C:/j2sdk1.4.2_08/lib/tools.jar;/C:/ > Program%20Files/Apache%20Software%20Foundation/Tomcat%205.0/bin/ > bootstrap.jar;C:/Program Files/Apache Software Foundation/Tomcat > 5.0/common/classes/;C:/Program Files/Apache Software Foundation/Tomcat > 5.0/common/endorsed/xercesImpl.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/common/endorsed/xml-apis.jar;C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/common/lib/ant-launcher.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/common/lib/ant.jar;C:/Program Files/Apache > Software Foundation/Tomcat > 5.0/common/lib/commons-collections-3.1.jar;C:/Program Files/Apache > Software Foundation/Tomcat > 5.0/common/lib/commons-dbcp-1.2.1.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/common/lib/commons-el.jar;C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/common/lib/commons-pool-1.2.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/common/lib/jasper-compiler.jar;C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/common/lib/jasper-runtime.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/common/lib/jsp-api.jar;C:/Program Files/Apache > Software Foundation/Tomcat 5.0/common/lib/naming-common.jar;C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/common/lib/naming-factory.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/common/lib/naming-java.jar;C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/common/lib/naming-resources.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/common/lib/servlet-api.jar;C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/common/lib/tools.jar;C:/Program Files/Apache Software > Foundation/Tomcat 5.0/shared/classes/;/C:/Program Files/Apache > Software Foundation/Tomcat > 5.0/webapps/bodington/WEB-INF/lib/activation.jar;/C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/webapps/bodington/WEB-INF/lib/bodserver.jar;/C:/Program > Files/Apache Software Foundation/Tomcat > 5.0/webapps/bodington/WEB-INF/lib/ldap.jar;/C:/Program Files/Apache > Software Foundation/Tomcat > 5.0/webapps/bodington/WEB-INF/lib/log4j.jar;/C:/Program Files/Apache > Software Foundation/Tomcat > 5.0/webapps/bodington/WEB-INF/lib/mail.jar;/C:/Program Files/Apache > Software Foundation/Tomcat 5.0/webapps/bodington/WEB-INF/lib/res.jar; > C:\Program Files\Apache Software Foundation\Tomcat > 5.0\webapps\bodington\WEB- > INF\template_classes\working\style_default_default\template_useroptions > _en.java:19: illegal escape character > bodingtonProperties = "C:\Program Files\Apache Software > Foundation\Tomcat 5.0\webapps\bodington\WEB-INF\bodington.properties"; > ^ > C:\Program Files\Apache Software Foundation\Tomcat > 5.0\webapps\bodington\WEB- > INF\template_classes\working\style_default_default\template_useroptions > _en.java:19: illegal escape character > bodingtonProperties = "C:\Program Files\Apache Software > Foundation\Tomcat 5.0\webapps\bodington\WEB-INF\bodington.properties"; > ^ > C:\Program Files\Apache Software Foundation\Tomcat > 5.0\webapps\bodington\WEB- > INF\template_classes\working\style_default_default\template_useroptions > _en.java:19: illegal escape character > bodingtonProperties = "C:\Program Files\Apache Software > Foundation\Tomcat 5.0\webapps\bodington\WEB-INF\bodington.properties"; > ^ > C:\Program Files\Apache Software Foundation\Tomcat > 5.0\webapps\bodington\WEB- > INF\template_classes\working\style_default_default\template_useroptions > _en.java:19: illegal escape character > bodingtonProperties = "C:\Program Files\Apache Software > Foundation\Tomcat 5.0\webapps\bodington\WEB-INF\bodington.properties"; > > ^ > C:\Program Files\Apache Software Foundation\Tomcat > 5.0\webapps\bodington\WEB- > INF\template_classes\working\style_default_default\template_useroptions > _en.java:19: illegal escape character > bodingtonProperties = "C:\Program Files\Apache Software > Foundation\Tomcat 5.0\webapps\bodington\WEB-INF\bodington.properties"; > > ^ > 5 errors > > Compilation exit code = 1 |