Sounds like you might be better served by writing your own plugin to do the filtering, that way you can take the timestamps into consideration.
Also I hope you are putting the filtered java source into a sub-folder of ${basedir}/target -Stephen On 8 December 2010 22:49, Marshall Schor <m...@schor.com> wrote: > > > On 12/8/2010 4:40 PM, Anders Hammar wrote: > > I guess the dependency plugin can't really tell, as the filtering takes a > > value outside of the source file which could have changed since the last > > time the file was filtered. > > The price you pay for filtering I guess? > > I was wondering (since I know the "source" of the filtered values) if there > was > a Maven-way of telling it this information? > > Something like being able to declare: file xyz depends on files abc and > def, so > if abc and def are both older than xyz, don't bother updating xyz. > > -Marshall Schor > > /Anders > > > > On Wed, Dec 8, 2010 at 18:02, Marshall Schor <m...@schor.com> wrote: > > > >> 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-unsubscr...@maven.apache.org > >> For additional commands, e-mail: users-h...@maven.apache.org > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >