Details
-
Wish
-
Status: Closed
-
Minor
-
Resolution: Auto Closed
-
2.5
-
None
-
None
Description
If one wants to enable resource filtering, the maven-resources-plugin currently requires one to explicitly enable it. This, in itself, is not a problem, as it prevents accidental filtering. Alas, the current means to enable filtering rely not only on manual configuration, but also force error-prone repetition:
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
Why should one be forced to repeat the fact that the resource directory is src/main/resources if one does not want to stray from this convention?
It would hence be great if the maven-resources-plugin would offer a way to enable filtering that is closer to the convention-side of convention over configuration. The maven-site-plugin, e.g., does just this: all files whose name ends in .vm are filtered <http://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html#Filtering>. IMHO, this would make a useful addition to the maven-resources-plugin as well. (Of course, it would need to be explicitly enabled in the plugin's configuration, to avoid the issue accidental filtering.)