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

The war:war-resources goal should use filter when copying the resources

    Details

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

      Description

      The war:war-resources goal don not use the ant filter whern copying the resources to the target directory.
      here is the replacement goal as modified for using the filtering. I only added the (filtering="on") on the two
      ant:copy tags.

      <goal name="war:war-resources" prereqs="war:init"
      description="Copy webapp resources to target directory">
      <ant:mkdir dir="$

      {maven.war.webapp.dir}"/>
      <j:set var="webapp.build.webinf"
      value="${maven.war.webapp.dir}

      /WEB-INF"/>
      <ant:mkdir dir="$

      {webapp.build.webinf}"/>
      <j:if test="${webSourcesPresent == 'true'}">
      <ant:copy todir="${maven.war.webapp.dir}"
      filtering="on"
      preservelastmodified="true">
      <ant:fileset dir="${maven.war.src}"
      includes="${maven.war.src.includes}"
      excludes="${maven.war.src.excludes}">
      </ant:fileset>
      </ant:copy>
      </j:if>

      <util:available file="${maven.war.webxml}">
      <ant:copy file="${maven.war.webxml}"
      filtering="on"
      tofile="${webapp.build.webinf}

      /web.xml"
      overwrite="true" />
      </util:available>

      </goal>

        Issue Links

          Activity

          Hide
          Stéphane Nicoll added a comment -

          Could you please describe the use case?

          Show
          Stéphane Nicoll added a comment - Could you please describe the use case?
          Hide
          Jamie Bisotti added a comment -

          It seems pretty straight forward. When JAR resources are copied, the Ant
          <copy> has filter set to "on"; the WAR equivalent does not. Seems like it
          should; as there may be affected resources that need to be filtered. Does
          that make sense?

          Jamie

          Show
          Jamie Bisotti added a comment - It seems pretty straight forward. When JAR resources are copied, the Ant <copy> has filter set to "on"; the WAR equivalent does not. Seems like it should; as there may be affected resources that need to be filtered. Does that make sense? Jamie
          Hide
          Stéphane Nicoll added a comment -

          Done.

          Show
          Stéphane Nicoll added a comment - Done.

            People

            • Assignee:
              Stéphane Nicoll
              Reporter:
              Raphaël Piéroni
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified