Fork me on GitHub

Filtering a source folder

The Templating Maven Plugin filter-sources goal lets you filter a dedicated source folder. In one pass, it filters that folder and adds the resulting filtered folder to the POM model as a source folder.

If, for example, you have some of your code where you would like to reference properties coming from the POM, you want to put those classes inside the sourceDirectory tag.

Please note that filtering the standard src/main/java folder is not supported.

                    Note the two following parameters are the default one. 
                    These are specified here just as a reminder. 
                    But as the Maven philosophy is strongly about conventions, 
                    it's better to just not specify them.