Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-30 Thread Robert Scholte
The main different is the moment you know you have to write the file. If there's zero interpolation/filtering, then there's no need to write the file. As soon as you detect interpolation/filtering you can start overwriting the original file. The challenge is probably to fit this concept in the

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-30 Thread Rob Oxspring
> On 30 Apr 2020, at 07:38, Robert Scholte wrote: > > I prefer to see an in memory solution. Well if it’s reasonable to assume that filtered files are always small then we could use replace the temporary file in my solution with an in memory buffer... but I’m not sure that’s what you’re

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-30 Thread Robert Scholte
I prefer to see an in memory solution. Key should be to detect if filtering is applied, which is done in the  MultiDelimiterInterpolatorFilterReaderLineEnding[1] Once a value has been interpolated, you must rewrite the file, otherwise you shouldn't. I hope this is a push in the right direction

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-29 Thread Robert Oxspring
> On 29 Apr 2020, at 14:43, Tobias wrote: > > Hi, > > I just came across this issue the other day, too. A mvn install after a > mvn clean install, i.e. nothing has to be compiled, results in a jar > being created for one module which takes one minute. This is due to > filtered resources

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-29 Thread Tobias
Hi, I just came across this issue the other day, too. A mvn install after a mvn clean install, i.e. nothing has to be compiled, results in a jar being created for one module which takes one minute. This is due to filtered resources being overwriten though this is not necessary. This happens for

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Graham Leggett
On 25 Apr 2020, at 17:12, Robert Oxspring wrote: >> I tend to think it does not need any hash but just a lastUpdated >> track (the most recent file invalidating previous cache, it is enough and >> faster than any hash computation) > > I’m not totally sure of this. Filtering, for example, is

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Romain Manni-Bucau
Le sam. 25 avr. 2020 à 18:38, Robert Oxspring a écrit : > > > On 25 Apr 2020, at 16:31, Romain Manni-Bucau > wrote: > > > > Le sam. 25 avr. 2020 à 17:12, Robert Oxspring > a > > écrit : > > > >> > >>> On 25 Apr 2020, at 15:37, Romain Manni-Bucau > >> wrote: > >>> > >>> Hi Robert, two

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Robert Oxspring
> On 25 Apr 2020, at 16:31, Romain Manni-Bucau wrote: > > Le sam. 25 avr. 2020 à 17:12, Robert Oxspring a > écrit : > >> >>> On 25 Apr 2020, at 15:37, Romain Manni-Bucau >> wrote: >>> >>> Hi Robert, two thoughts maybe >>> >>> 1. all that work (thinking also of assembly one) should

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Romain Manni-Bucau
Le sam. 25 avr. 2020 à 17:12, Robert Oxspring a écrit : > > > On 25 Apr 2020, at 15:37, Romain Manni-Bucau > wrote: > > > > Hi Robert, two thoughts maybe > > > > 1. all that work (thinking also of assembly one) should probably end up > by > > enriching > > >

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Robert Oxspring
> On 25 Apr 2020, at 15:37, Romain Manni-Bucau wrote: > > Hi Robert, two thoughts maybe > > 1. all that work (thinking also of assembly one) should probably end up by > enriching >

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Karl Heinz Marbaise
Hi, On 25.04.20 16:25, Robert Oxspring wrote: Hi “mvn clean install” is definitely normal for small projects like maven plugins because it’s a cheap way of guaranteeing your build is up to date. What does install guarantee which verify does not? For developers working on larger projects

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Romain Manni-Bucau
Hi Robert, two thoughts maybe 1. all that work (thinking also of assembly one) should probably end up by enriching https://github.com/apache/maven-shared-incremental/blob/master/src/main/java/org/apache/maven/shared/incremental/IncrementalBuildHelper.java model and impl. I tend to think it does

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Robert Oxspring
Hi “mvn clean install” is definitely normal for small projects like maven plugins because it’s a cheap way of guaranteeing your build is up to date. For developers working on larger projects “mvn clean install” is typically avoided wherever possible as it forces everything to be rebuilt even

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Karl Heinz Marbaise
Hi, On 25.04.20 00:58, Robert Oxspring wrote: Hi all, When copying resources with filtering on, files are always overwritten even when the filters have not changed. I’d like to change this such that repeated filtering copies do not modify the destination file. I’ve prepared a change to

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Karl Heinz Marbaise
Hi, On 25.04.20 15:36, Slawomir Jaranowski wrote: Hi, Can you describe your case and what you want to achieve. By default all files created during maven running are write to target directory. And in most case target directory is cleaned before new build starting. Usual maven is running by:

Re: Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-25 Thread Slawomir Jaranowski
Hi, Can you describe your case and what you want to achieve. By default all files created during maven running are write to target directory. And in most case target directory is cleaned before new build starting. Usual maven is running by: mvn clean install. sob., 25 kwi 2020 o 00:59 Robert

Maven Filtering Plugin should avoid overwriting even when filtering

2020-04-24 Thread Robert Oxspring
Hi all, When copying resources with filtering on, files are always overwritten even when the filters have not changed. I’d like to change this such that repeated filtering copies do not modify the destination file. I’ve prepared a change to write the filtered content to a temporary file and