What worked for me is to add include tag in order to specify exactly what I want to filter.
It seems the resource plugin has problems going through the whole src/main/resource folder, probably due to some specific files inside.
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>application.yml</include>
</includes>
</resource>
</resources>