Maven 1.x War Plugin

plugin doesn't provide for easily way to filter files

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    6

Description

Since the war plugin does not use the project.xml file for any of its resources, there is not an easy way to filter files. If you are building an artifact that uses maven:copy-resources in one of its goals, filtering is simple. Just set filtering to true on the build resource in the POM, and add a simple preGoal which sets your filters maven.xml This is a lot more difficult when building a war because the files are copied and built into the war in the same goal.

There are some workarounds to this. You can copy the source directory for your webapp to a temporary directory under target and have that be maven.war.src. That requires a lot of verbose code in maven.xml for each webapp. A filtering attribute could be added to the ant:copy command that copies the maven.war.src directory, but then filters cannot be easily defined in the POM.

  1. plugin.jelly.patch
    18/Feb/04 9:27 AM
    1 kB
    Eric Hauser
  2. plugin.jelly.patch2
    18/Feb/04 1:08 PM
    0.6 kB
    Eric Hauser
  3. plugin.properties.patch
    18/Feb/04 9:27 AM
    0.6 kB
    Eric Hauser
  4. plugin.properties.patch2
    18/Feb/04 1:08 PM
    0.9 kB
    Eric Hauser
  5. properties.xml.patch
    18/Feb/04 9:27 AM
    0.7 kB
    Eric Hauser
  6. properties.xml.patch2
    18/Feb/04 1:09 PM
    0.6 kB
    Eric Hauser

Activity

Hide
Eric Hauser added a comment -

I added a couple patches which seems to me like a good solution. This allows users to easily include pom resources in their webapp, but by default it is turned off.

Show
Eric Hauser added a comment - I added a couple patches which seems to me like a good solution. This allows users to easily include pom resources in their webapp, but by default it is turned off.
Hide
Eric Hauser added a comment -

I also added a second group of patches that would just add filtering to the web.xml document instead of using resources from the pom.

Show
Eric Hauser added a comment - I also added a second group of patches that would just add filtering to the web.xml document instead of using resources from the pom.

People

Vote (3)
Watch (3)

Dates

  • Created:
    Updated:

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
1h
Remaining Estimate - 1 hour
Logged:
Not Specified
Time Spent - Not Specified