FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
314 stars 136 forks source link

More than one file was found with OS independent path 'META-INF/ASL2.0' #184

Closed Grabber closed 4 years ago

Grabber commented 5 years ago
More than one file was found with OS independent path 'META-INF/ASL2.0'
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> More than one file was found with OS independent path 'META-INF/ASL2.0'

build.prop

android {
    packagingOptions {
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
    }
}

dependencies {
    implementation 'com.fasterxml.jackson.core:jackson-annotations:2.10.0'
    implementation 'com.fasterxml.jackson.core:jackson-core:2.10.0'
    implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0'
    implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-avro:2.10.0'
}
cowtowncoder commented 5 years ago

I am not quite sure what the problem reported is. Yes, all Jackson components contain License information, which is the way to indicate license compatibility. Path is fixed, for obvious reasons. This is the way things are.

Grabber commented 4 years ago

@cowtowncoder, the issue is that packagingOptions has to be set at App level build.gradle and in my case I'm generating a library, if I just set packagingOptions at library level build.gradle it doesn't work.

cowtowncoder commented 4 years ago

I don't think there is much Jackson can do about this, although I am open to suggestions. Will close for now as "nothing we can do".

Alexandr-Ilyin commented 4 years ago

also can not build project after adding jackson as dependency

cowtowncoder commented 4 years ago

@Alexandr-Ilyin It is probably a problem with your build tools: they should not barf on such metadata. So if possible, make sure you are using latest versions of tooling available.