Uploaded image for project: 'Maven Resources Plugin'
  1. Maven Resources Plugin
  2. MRESOURCES-47

POM properties cannot be accessed within a filter file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.3
    • 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.

      Attachments

        Activity

          People

            maurotalevi Mauro Talevi
            william_ferguson_au@yahoo.com William Ferguson
            Votes:
            6 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: