Maven 1.x War Plugin
  1. Maven 1.x War Plugin
  2. MPWAR-65

Problems with maven.war.property.expansion

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When you use the maven.war.property.expansion=true, all resources in your webapps folder are all modified. This is fine, but some binary files (for example image) are broken in the process. I would propose that 2 variable are added, apon which the filter set can be further specified.

      maven.war.property.expansion.includes
      maven.war.property.expansion.excludes

      In this way specific files may have the expansion applied to them or avoid any meddling.

      Also, note that the special treatment of web.xml conflicts with the maven.war.property.expansion.
      The web.xml is copied and filtered during the main copy step (including expansion). Then later
      it is copied again, without expansion, overwritting the original file. This can be worked around by
      setting maven.war.webxml=nonexistentfile or by having maven.war.webxml.overwrite=false
      The expansion code should be added to the second stage as well.

        Issue Links

          Activity

          Hide
          Stéphane Nicoll added a comment -

          For the first part it's not that easy since the filter is applied to the whole copy operation. We might need two copy operation then.

          Show
          Stéphane Nicoll added a comment - For the first part it's not that easy since the filter is applied to the whole copy operation. We might need two copy operation then.
          Hide
          Stéphane Nicoll added a comment -

          Added maven.war.expansion.excludes property to exclude files during a property expansion copy (Fixes corruption of binary files). Applied property expansion to web.xml handling for consistency. Introduced the maven.war.src.filtering property to control whether filtering is enabled or not when copying webapp resources.

          Show
          Stéphane Nicoll added a comment - Added maven.war.expansion.excludes property to exclude files during a property expansion copy (Fixes corruption of binary files). Applied property expansion to web.xml handling for consistency. Introduced the maven.war.src.filtering property to control whether filtering is enabled or not when copying webapp resources.

            People

            • Assignee:
              Stéphane Nicoll
              Reporter:
              Caleb Lyness
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: