POM properties cannot be accessed within a filter file
------------------------------------------------------

                 Key: MRESOURCES-47
                 URL: http://jira.codehaus.org/browse/MRESOURCES-47
             Project: Maven 2.x Resources Plugin
          Issue Type: Bug
    Affects Versions: 2.2
            Reporter: William Ferguson
             Fix For: 2.3
         Attachments: project.zip

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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to