Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2
-
None
-
None
-
Patch
Description
Before applying a filter, the maven-resources-plugin evaluates
1) POM structural elements such as ${project.version}
2) System properties such as ${my.system.property}
that are referred to within filter files.
However, it does not evaluate any POM (or profile) property such as ${my.pom.property} at the same time.
Consequently it is not possible to define filter tokens that use POM properties.
Without this patch we would either need to have many more POM properties or would have lots of fine grained and typically non-intuitive tokens distributed amongst our resources.
IMHO this patch will bring the resolution mechanism for filter files in line with property resolution mechanism in general.
I have attached a zipped project containing :
SomeResource.txt
my.filter
Look at SomeResource.txt after being processed with filtering. Note the unresolved tokens for ${projectProperty} and ${profileProperty} for the "filter resolution" cases. Ie the POM property values of the filter tokens were never evaluated.