Skip to content

warning: File for type 'org.example.ExampleJsonComponent' created in the last round will not be subject to annotation processing. #449

@kamalhm

Description

@kamalhm

Got this warning when building with Jsonb

Main.class

package org.example;

import io.avaje.jex.Jex;
import io.avaje.jsonb.Json;

public class Main {
    @Json
    record Something(String name, int value) {
    }

    static void main() {
        Jex.create()
                .get("/", ctx -> ctx.json(new Something("John", 123)))
                .error(
                        IllegalStateException.class,
                        (ctx, exception) -> ctx.status(500).text(exception.getMessage()))
                .port(8080)
                .start();

    }
}

build.gradle.kts

plugins {
    id("java")
}

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

repositories {
    mavenCentral()
}

dependencies {
    implementation("io.avaje:avaje-jex:3.3")
    implementation("io.avaje:avaje-jsonb:3.8")
    annotationProcessor("io.avaje:avaje-jsonb-generator:3.8")

    testImplementation(platform("org.junit:junit-bom:5.10.0"))
    testImplementation("org.junit.jupiter:junit-jupiter")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

tasks.test {
    useJUnitPlatform()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions