Hi all,

I've seen in a few examples and posts that the way to configure tapestry from a properties file is to use contributeSymbolSource. I would like to configure tapestry firstly from a properties file and secondly hard-set a couple of values from AppModule.

I am doing the following:

public static void contributeSymbolSource(OrderedConfiguration<SymbolProvider> providers)
    {
providers.add("tapestryConfiguration", new ClasspathResourceSymbolProvider("tapestry.properties")); providers.add("applicationConfiguration", new ClasspathResourceSymbolProvider("application.properties"));
    }

public static void contributeApplicationDefaults(MappedConfiguration<String, Object> configuration)
    {
        configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
    }

public static void contributeFactoryDefaults(MappedConfiguration<String, Object> configuration)
    {
configuration.override(SymbolConstants.APPLICATION_VERSION, MAJOR_VERSION + "." + MINOR_VERSION); configuration.override(SymbolConstants.COMPRESS_WHITESPACE, "false"); configuration.override(SymbolConstants.MINIFICATION_ENABLED, "false");
    }

I have triple checked that the content of 'tapestry.properties' on the classpath is:

tapestry.production-mode=false
tapestry.file-check-interval=10 s

This is the value of the files in 'target/classes' as well as 'target/[project]/WEB-INF/classes'.

However, when I print out the symbol values on one of my pages I get:

tapestry.production-mode: true
tapestry.compress-whitespace: false
tapestry.combine-scripts: true
tapestry.compact-json: true
tapestry.enable-minification: false
tapestry.file-check-interval: 1 s

The obvious conclusion would be that the SybolProvider is not being used/loaded, however I do not see any exceptions in the logs.

And then, after a number of restarts deleting the 'target' directory each time, the correct settings are read.

Is there anything obviously wrong with what I'm doing, or some cache I need to be deleting?

Thanks, Paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to