line-bot-sdk-java icon indicating copy to clipboard operation
line-bot-sdk-java copied to clipboard

[BUG] Could not find com.fasterxml.jackson.core:jackson-databind:.

Open youngjun0313 opened this issue 3 years ago • 1 comments
trafficstars

Bug Report

Describe the bug

I'm trying to upgrade the version from 4.7.0 to later of the line-bot-api-client, but it's not working. Could not find com.fasterxml.jackson.core:jackson-databind:. error is reported when adding dependency by gradle(version 7.4). I know that com.fasterxml.jackson.core:jackson-databind:. is the compile dependency of the line-bot-model which is compile dependency of the line-bot-api-client.

The following is the build.gradle file that I used for test.

plugins {
    id 'java'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.linecorp.bot:line-bot-api-client:4.8.0' // or later version
}

I know that gradle download the jar files of transitive dependencies either runtime or compile time dependencies. I don't know why gradle doesn't download com.fasterxml.jackson.core:jackson-databind:. so that it cannot find the classpath when compile time. This only happens when version is 4.8.0 or later.

I found that you used maven-publish plugin instead of maven plugin when publishing sdk to maven from version 4.8.0. Is this the reason why gradle didn't download the transitive dependencies? I'm not sure if this is my problem or external.

Screenshots image

Environment (please complete the following information):

  • OS: macOS Monterey 12.2.1
  • JDK: corretto-17
  • line-bot-api-client version: > 4.7.0
  • Gradle version: 4.7

youngjun0313 avatar Aug 11 '22 06:08 youngjun0313

Yes, it's a bug. It'll fix by #802

tokuhirom avatar Aug 12 '22 01:08 tokuhirom

I reproduced this issue. And it may caused by switching maven plugin to maven-publish plugin. https://github.com/line/line-bot-sdk-java/compare/4.7.0...4.8.0

tokuhirom avatar Aug 15 '22 02:08 tokuhirom

I released #802 as version 5.0.1. But it doesn't solve the problem. I'm trying #806

tokuhirom avatar Aug 15 '22 06:08 tokuhirom

The issue may fixed with 5.0.2 release. https://repo1.maven.org/maven2/com/linecorp/bot/line-bot-model/5.0.2/line-bot-model-5.0.2.pom

tokuhirom avatar Aug 15 '22 07:08 tokuhirom

5.0.2 release fixed this issue.

tokuhirom avatar Aug 16 '22 00:08 tokuhirom