Sorry, just thought of one more thing. I guess additionally/alternatively a
'merge' would exclude duplicate names/content and include duplicates
names/different content. (this might be a reasonable default for Gradle 2.0)



On Wed, Jun 26, 2013 at 9:16 AM, Kyle Mahan <kyle.ma...@gmail.com> wrote:

> Adding another DuplicatesStrategy (and differentiating it from the current
> 'exclude' strategy) seems reasonable to me.
>
> The two strategies currently are:
>
> include -- the default, includes duplicate files (by name only) in copy
> operations... with a deprecation warning for Copy operations that include
> several files with the same name
> exclude -- takes only the first file with a given name. Ignores duplicates
> regardless of content.
>
> and there are plans to add explicit 'warn' and 'fail' strategies as well.
>
> The new behavior could skip files with the same name and content (either
> based on original path or checksum?) and fail (warn?) if duplicate files
> are encountered with the same name but different content.
>
> As far as naming, I think I would suggest changing 'exclude' to the new
> behavior and renaming the current one to something like
> 'excludeByNameOnly'. The new merge behavior should be safer in all cases
> and should probably be the one most people reach for first, so giving it
> the simpler name makes sense to me.
>
>
>
> On Wed, Jun 26, 2013 at 6:12 AM, Luke Daley <luke.da...@gradleware.com>wrote:
>
>> Coming from this post:
>> http://forums.gradle.org/gradle/topics/gradle_doing_weird_things_duplicating_files_on_jar
>>
>> I wonder if with the new duplicate archive entry stuff we should offer an
>> option to just silently “merge” identical entries (in terms of final path
>> and content). One complication is that this is not mutually exclusive to
>> the other strategies.
>>
>> --
>> Luke Daley
>> Principal Engineer, Gradleware
>> http://gradleware.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>

Reply via email to