neilcsmith-net opened a new issue, #453:
URL: https://github.com/apache/maven-resources-plugin/issues/453

   ### Affected version
   
   3.4.0
   
   ### Bug description
   
   This is based on an issue reported by a NetBeans platform developer (and PMC 
member).  When resources plugin is upgraded to `3.4.0`, a project was seen to 
fail if calling eg. `mvn test` subsequently to a clean build.  In certain 
circumstances, a copied resource is altered later in the build.  With `3.4.0` 
the original resource is copied back over the top, but the additional step (in 
this case a resource bundle in annotation processing during compilation) is not 
triggered, leaving an invalid and broken build.
   
   The `overwrite` flag is documented as "Overwrite existing files _even if the 
destination files are newer_." (emphasis mine).  This implies that the default 
behaviour should still be to not overwrite a newer destination file.  Any 
NetBeans platform build with Maven is potentially relying on this behaviour, 
that the destination file is not overwritten if it has been changed by a later 
stage of the build.  The change that introduced this seems to suggest that flag 
would also be deprecated, but it doesn't seem to be??  Is there another way of 
ensuring existing destination files are not overwritten?
   
   I realise that overwriting existing resources in an annotation processor is 
something of a grey area.  Unfortunately, it's something we're probably stuck 
with.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to