Maven 1.x War Plugin

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
  • Component/s: None
  • 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
Stephane Nicoll added a comment -

Could you please describe the use case?

Show
Stephane 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
Stephane Nicoll added a comment -

Done.

Show
Stephane Nicoll added a comment - Done.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

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