maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject avoiding overwriting newer file when using maven resources plugin copy-resources with filtering
Date Wed, 08 Dec 2010 17:02:24 GMT
The Maven resources plugin has a goal "copy-resources" which has a configuration
parameter "overwrite".  The default is "false" - meaning not to overwrite a
target file if not needed (if the target has  a later date than the source).

This setting is ignored, however, if the file is being filtered.

I'm using this to inject version info from the POM into a Java source file.  So
everytime this module is built, it always updates this file even though nothing
(usually) has changed.

Is there a better Maven way to do this?

-Marshall

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message