Maven 2.x Resources Plugin

when pom specifies multiple resource directories, the directories should be copied in the order they are in the pom

Details

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

Description

It should be possible to control the order in which resource directories are copied to target/classes, since multiple resource dirs could potentially contain files with the same names. The intutive thing would be to copy the resource directories in the order they are specified in the POM (i.e. last one wins). However, it appears the resources are currently copied in reverse order (i.e. first one wins).

Issue Links

Activity

Hide
Olivier Lamy added a comment -

If your resources have filtering to true : last one always wins.
If not : there is a test on file.lastModified (to.lastModified() < from.lastModified()) .

IMHO we should probably add a new flag "overwrite" (Overwrite existing files even if the destination files are newer.) in the mojo

Show
Olivier Lamy added a comment - If your resources have filtering to true : last one always wins. If not : there is a test on file.lastModified (to.lastModified() < from.lastModified()) . IMHO we should probably add a new flag "overwrite" (Overwrite existing files even if the destination files are newer.) in the mojo
Hide
Olivier Lamy added a comment -

fixed in rev 695036.
There is now a flag called overwrite in the mojo and is false by default (you have to change it manually to true)
IMHO this flag can be added in the Resource class but it's an other story

Show
Olivier Lamy added a comment - fixed in rev 695036. There is now a flag called overwrite in the mojo and is false by default (you have to change it manually to true) IMHO this flag can be added in the Resource class but it's an other story

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: