In pom.xml I have defined :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>xml</nonFilteredFileExtension>
</nonFilteredFileExtensions>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
and
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
Now the problem is all xml files are not filtered. Is there any possible way to filter single xml file?
Something like this works fine for me:
This documentation helps me: Apache Maven - Filtering
I don't know why Gabor's solution did not work, but I managed to solve this way:
Firstly I removed nonFilteredFileExtension tag:
Then modified my resources this way:
Now my single xml file is filtered and other is leaved untouched by filter.
For the resource tag you can used includes and excludes. Just define simply a mask, which fits your single file only. See http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
Sample: