<commit_before># Customizing the application for your environment

Maven modify/filter some properties and xml files during compile/build. The default values for the placeholder values can be seen here:

[oskari-server/servlet-map/filter/filter-base.properties](../servlet-map/filter/filter-base.properties)

## Compile filter properties

To modify these compile-time defaults you can setup a profile in your maven global settings.xml:

Example ${MAVEN_HOME}/conf/settings.xml profile:

    <profile>
        <id>oskari-profile</id>
        <activation>
            <file>
                <exists>oskari-profile-trigger</exists>
            </file>
        </activation>
        <properties>
            <filter-path>/path/to/my/private/oskari-filter-profiles/${project.artifactId}</filter-path>
    		<filter-profile>my-local</filter-profile>
        </properties>
    </profile>

This will look for a file "my-local.properties" in directory /path/to/my/private/oskari-filter-profiles/map-servlet, and use the properties in that file during filtering of properties instead of the default "template.properties" found in map-servlet/filter directory. (For example if building using the "tomcat-profile" the "tomcat-template.properties" is used).

## Runtime properties

To override properties defined in `oskari-server/servlet-map/src/main/resources/oskari.properties` you can add an oskari-ext.properties file in your classpath. Any existing property will be overridden and any new ones will be available through PropertyUtil methods (for example PropertyUtil.get("propertyName")).<commit_msg>Updated a bit to make more sense<commit_after># Customizing the application for your environment

Maven modifies/filters some properties and xml files during compile/build. The default values for the placeholder values can be seen here:

[oskari-server/servlet-map/filter/filter-base.properties](../servlet-map/filter/filter-base.properties)

## Compile filter properties

To modify these compile-time defaults you can setup a profile in your maven global settings.xml:

Example ${MAVEN_HOME}/conf/settings.xml profile:

    <profile>
        <id>oskari-profile</id>
        <activation>
            <file>
                <exists>oskari-profile-trigger</exists>
            </file>
        </activation>
        <properties>
            <filter-path>/path/to/my/private/oskari-filter-profiles/${project.artifactId}</filter-path>
    		<filter-profile>my-local</filter-profile>
        </properties>
    </profile>

This will look for a file "my-local.properties" in directory /path/to/my/private/oskari-filter-profiles/map-servlet, and use the properties in that file during filtering of properties instead of the default "template.properties" found in map-servlet/filter directory. (For example if building using the "tomcat-profile" the "tomcat-template.properties" is used).

## Runtime properties

To override properties defined in `oskari-server/servlet-map/src/main/resources/oskari.properties` you can add an oskari-ext.properties file in your classpath. Any existing property will be overridden and any new ones will be available through PropertyUtil methods (for example PropertyUtil.get("propertyName")).
{'fraction_non_alphanumeric': 0.09476309226932668, 'fraction_numerical': 0.0, 'mean_word_length': 3.754074074074074, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5879333', 'n_tokens_mistral': 860, 'n_tokens_neox': 843, 'n_words': 281}