Maven resource filtering not working - because of spring boot dependency
<p>In a maven project I trying to replace some tokens using maven resource filtering but it does not work. I have some other projects which works but does not work in this single project not sure what is wrong.</p>

<p>The property files is in location /src/main/resources/my.properties</p>

<p>I tried different maven commands as below but does not work. </p>

<pre><code>mvn clean install
mvn clean install resources:resources
</code></pre>

<p><strong>my.properties</strong></p>

<pre><code>### Spring boot properties
jdbc.url=${jdbc.url}
ldap.domain=${ldap_domain}
ldap.url=${ldap_url}
</code></pre>

<p><strong>pom.xml</strong></p>

<pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.jai&lt;/groupId&gt;
    &lt;artifactId&gt;client&lt;/artifactId&gt;
    &lt;version&gt;0.0.6-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;client&lt;/name&gt;
    &lt;description&gt;client web application&lt;/description&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;

    &lt;parent&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
        &lt;version&gt;1.3.2.RELEASE&lt;/version&gt;
        &lt;relativePath /&gt;
    &lt;/parent&gt;


    &lt;dependencies&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
            &lt;artifactId&gt;spring-security-ldap&lt;/artifactId&gt;
        &lt;/dependency&gt;

    &lt;/dependencies&gt;

    &lt;build&gt;
        &lt;finalName&gt;client&lt;/finalName&gt;

        &lt;resources&gt;
            &lt;resource&gt;
                &lt;directory&gt;src/main/resources&lt;/directory&gt;
                &lt;filtering&gt;true&lt;/filtering&gt;
            &lt;/resource&gt;
        &lt;/resources&gt;

        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
            &lt;/plugin&gt;

            &lt;plugin&gt;
                &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                &lt;configuration&gt;
                    &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
                    &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;

            &lt;plugin&gt;
                &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                &lt;executions&gt;
                    &lt;execution&gt;
                        &lt;id&gt;exec-bower-install&lt;/id&gt;
                        &lt;phase&gt;generate-sources&lt;/phase&gt;
                        &lt;configuration&gt;
                            &lt;executable&gt;bower&lt;/executable&gt;
                            &lt;arguments&gt;
                                &lt;argument&gt;install&lt;/argument&gt;
                            &lt;/arguments&gt;
                        &lt;/configuration&gt;
                        &lt;goals&gt;
                            &lt;goal&gt;exec&lt;/goal&gt;
                        &lt;/goals&gt;
                    &lt;/execution&gt;
                &lt;/executions&gt;
            &lt;/plugin&gt;

        &lt;/plugins&gt;

    &lt;/build&gt;


    &lt;profiles&gt;
        &lt;!-- localhost environment --&gt;
        &lt;profile&gt;
            &lt;id&gt;local&lt;/id&gt;

            &lt;activation&gt;
                &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
            &lt;/activation&gt;

            &lt;properties&gt;

                &lt;ldap_domain&gt;mydomain.local&lt;/ldap_domain&gt;
                &lt;ldap_url&gt;ldap://server:389&lt;/ldap_url&gt;
                &lt;jdbc.url&gt;testttttttttttttttttttttt&lt;/jdbc.url&gt;

            &lt;/properties&gt;
        &lt;/profile&gt;

        &lt;/profiles&gt;

&lt;/project&gt;
</code></pre>

<p><strong>Update:-</strong></p>

<p>I figured out this problem is caused due to the spring boot dependency.
If I comment the <code>&lt;parent&gt;</code> section and other spring boot dependencies, then it works fine and able to replace the token. But still not sure how to fix this by keeping spring boot.</p>