Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

included jackson dependency breaks dependencies of other plugins #1868

Open
smoldaner opened this issue Jan 21, 2025 · 0 comments
Open

included jackson dependency breaks dependencies of other plugins #1868

smoldaner opened this issue Jan 21, 2025 · 0 comments
Labels

Comments

@smoldaner
Copy link

What happened?

Since Version 2.0.0, the plugin (intellij-platform-gradle-plugin-2.2.1.jar) includes the jackson library (package com.fasterxml.jackson). This breaks jackson dependencies of other gradle plugins.

For example the org.owasp.dependencycheck plugin, which requires a jackson version > 2.16.1

Relevant log output or stack trace

Steps to reproduce

Add the org.owasp.dependencycheck to an intellij plugin build.gradle.kts (e.g. created the IntelliJ IDE Plugin Template):

plugins {
    id("java")
    id("org.jetbrains.kotlin.jvm") version "1.9.25"
    id("org.jetbrains.intellij.platform") version "2.2.1"
    id("org.owasp.dependencycheck") version "12.0.1"
}

group = "com.example"
version = "1.0-SNAPSHOT"

repositories {
    intellijPlatform {
        defaultRepositories()
        snapshots()
    }
    mavenCentral()
}

dependencies {
    intellijPlatform {
        intellijIdeaCommunity("2024.3.2")
    }
}

tasks {
    withType<JavaCompile> {
        sourceCompatibility = "17"
        targetCompatibility = "17"
    }
    withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
        kotlinOptions.jvmTarget = "17"
    }

    patchPluginXml {
        sinceBuild.set("241")
        untilBuild.set("243.*")
    }

    signPlugin {
        certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
        privateKey.set(System.getenv("PRIVATE_KEY"))
        password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
    }

    publishPlugin {
        token.set(System.getenv("PUBLISH_TOKEN"))
    }
}

Run the dependencyCheckAnalyze task. This will fail with

* What went wrong:
Execution failed for task ':dependencyCheckAnalyze'.
> Class com.fasterxml.jackson.annotation.JsonFormat$Feature does not have member field 'com.fasterxml.jackson.annotation.JsonFormat$Feature READ_DATE_TIMESTAMPS_AS_NANOSECONDS'

as the com.fasterxml.jackson.annotation.JsonFormat class is loaded from the intellij-platform-gradle-plugin jar

Gradle IntelliJ Plugin version

2.2.1

Gradle version

8.12

Operating System

Linux

Link to build, i.e. failing GitHub Action job

No response

@smoldaner smoldaner added the bug label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant