eclipse-aas4j / aas4j

Eclipse AAS Model for Java
Apache License 2.0
39 stars 26 forks source link

Using the JSON serializer/deserializer in a Quarkus application does not work #97

Closed HansG89 closed 1 year ago

HansG89 commented 1 year ago

Hello folks,

I tried to migrate my existing quarkus application to use aas4j. I followed the example in BaSyx V2 , which is using Spring, with small adaptions to Quarkus. This is my my Jackson object mapper class, providing a CDI producer (quarkus docs).

package com.example;

import javax.inject.Singleton;

import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.deserialization.EnumDeserializer;
import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.serialization.EnumSerializer;
import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.util.ReflectionHelper;
import org.eclipse.digitaltwin.aas4j.v3.dataformat.json.ReflectionAnnotationIntrospector;
import org.jboss.logging.Logger;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.databind.module.SimpleAbstractTypeResolver;
import com.fasterxml.jackson.databind.module.SimpleModule;

import io.quarkus.jackson.ObjectMapperCustomizer;

import javax.enterprise.inject.Instance;
import javax.enterprise.inject.Produces;

public class AAS4JObjectMapper {

    protected JsonMapper mapper;
    protected SimpleAbstractTypeResolver typeResolver;

    private static final Logger LOGGER = Logger.getLogger(AAS4JObjectMapper.class);

    public AAS4JObjectMapper() {
        initTypeResolver();
    }

    protected JsonMapper buildMapper() {
        LOGGER.info("Registering object mapper for AAS4J");
        JsonMapper mapper = JsonMapper.builder().enable(SerializationFeature.INDENT_OUTPUT)
                .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
                .serializationInclusion(JsonInclude.Include.NON_NULL)
                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
                .addModules(buildEnumModule(), buildImplementationModule())
                .annotationIntrospector(new ReflectionAnnotationIntrospector())
                .build();
        ReflectionHelper.JSON_MIXINS.entrySet().forEach(x -> {
            LOGGER.info(x.getKey());
            mapper.addMixIn(x.getKey(), x.getValue());
        });
        return mapper;
    }

    // Replaces the CDI producer for ObjectMapper built into Quarkus
    @Singleton
    @Produces
    ObjectMapper objectMapper(Instance<ObjectMapperCustomizer> customizers) {
        ObjectMapper mapper = buildMapper();

        // Apply all ObjectMapperCustomizer beans (incl. Quarkus)
        for (ObjectMapperCustomizer customizer : customizers) {
            customizer.customize(mapper);
        }

        return mapper;
    }

    @SuppressWarnings("unchecked")
    private void initTypeResolver() {
        LOGGER.info("initTypeResolver");
        typeResolver = new SimpleAbstractTypeResolver();
        ReflectionHelper.DEFAULT_IMPLEMENTATIONS.stream()
                .forEach(x -> {
                    LOGGER.info(x.getImplementationType());
                    typeResolver.addMapping(x.getInterfaceType(), x.getImplementationType());
                });
    }

    protected SimpleModule buildEnumModule() {
        SimpleModule module = new SimpleModule();
        module.addSerializer(Enum.class, new EnumSerializer());
        ReflectionHelper.ENUMS.forEach(x -> module.addDeserializer(x, new EnumDeserializer<>(x)));
        return module;
    }

    protected SimpleModule buildImplementationModule() {
        SimpleModule module = new SimpleModule();
        module.setAbstractTypes(typeResolver);
        return module;
    }
}

The problem now is, that JSON_MIXINS, DEFAULT_IMPLEMENTATIONS and ENUMS inside the ReflectionHelperclass are empty. My quarkus application is not a native application, so it should not be necessary to use the @RegisterForReflection annotation.

I installed aas4j by simply adding it to my pom.xml

<dependency>
      <groupId>org.eclipse.digitaltwin.aas4j</groupId>
      <artifactId>dataformat-json</artifactId>
      <version>1.0.0-milestone-03</version>
</dependency>

This is the classpath tree of my application. As you can see at the bottom org.eclipse.digitaltwin.aas4j is included. But when I use ClassGraph to scan it for aas4j, it does not found anything.

➜ ./mvnw quarkus:dependency-tree

[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< com.example:test >------------------------
[INFO] Building test 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:2.16.5.Final:dependency-tree (default-cli) @ test ---
[INFO] Quarkus application PROD mode build dependency tree:
[INFO] com.example:test:pom:1.0.0-SNAPSHOT
[INFO] ├─ io.quarkus:quarkus-resteasy-reactive-jackson-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-resteasy-reactive-jackson-common-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-jackson-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-jackson-spi:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.quarkus:quarkus-jackson:jar:2.16.5.Final (compile)
[INFO] │  │  │     ├─ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.14.2 (compile)
[INFO] │  │  │     ├─ com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.14.2 (compile)
[INFO] │  │  │     └─ com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.14.2 (compile)
[INFO] │  │  └─ io.quarkus:quarkus-resteasy-reactive-jackson-common:jar:2.16.5.Final (compile)
[INFO] │  └─ io.quarkus:quarkus-resteasy-reactive-jackson:jar:2.16.5.Final (compile)
[INFO] ├─ io.quarkus:quarkus-rest-client-reactive-jackson-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-rest-client-reactive-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-rest-client-reactive:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-jaxrs-client-reactive:jar:2.16.5.Final (compile)
[INFO] │  │  │  │  └─ io.quarkus.resteasy.reactive:resteasy-reactive-client:jar:2.16.5.Final (compile)
[INFO] │  │  │  │     └─ io.vertx:vertx-web-client:jar:4.3.7 (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-smallrye-stork:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-rest-client-config:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.smallrye.stork:stork-api:jar:1.4.2 (compile)
[INFO] │  │  │  ├─ io.smallrye.stork:stork-core:jar:1.4.2 (compile)
[INFO] │  │  │  └─ org.eclipse.microprofile.rest.client:microprofile-rest-client-api:jar:2.0 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-jaxrs-client-reactive-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.quarkus.resteasy.reactive:resteasy-reactive-client-processor:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-smallrye-stork-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  └─ io.quarkus:quarkus-rest-client-config-deployment:jar:2.16.5.Final (compile)
[INFO] │  └─ io.quarkus:quarkus-rest-client-reactive-jackson:jar:2.16.5.Final (compile)
[INFO] │     └─ io.quarkus.resteasy.reactive:resteasy-reactive-jackson:jar:2.16.5.Final (compile)
[INFO] │        ├─ org.jboss.logging:commons-logging-jboss-logging:jar:1.0.0.Final (compile)
[INFO] │        └─ org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec:jar:2.0.0.Final (compile)
[INFO] ├─ io.quarkus:quarkus-arc-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-core-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ org.aesh:readline:jar:2.2 (compile)
[INFO] │  │  │  └─ org.fusesource.jansi:jansi:jar:1.18 (compile)
[INFO] │  │  ├─ org.aesh:aesh:jar:2.7 (compile)
[INFO] │  │  ├─ org.apache.commons:commons-lang3:jar:3.12.0 (compile)
[INFO] │  │  ├─ org.wildfly.common:wildfly-common:jar:1.5.4.Final-format-001 (compile)
[INFO] │  │  ├─ io.quarkus.gizmo:gizmo:jar:1.6.0.Final (compile)
[INFO] │  │  │  └─ org.ow2.asm:asm-util:jar:9.4 (compile)
[INFO] │  │  │     └─ org.ow2.asm:asm-analysis:jar:9.4 (compile)
[INFO] │  │  ├─ io.smallrye:jandex:jar:3.0.5 (compile)
[INFO] │  │  ├─ org.ow2.asm:asm:jar:9.4 (compile)
[INFO] │  │  ├─ org.ow2.asm:asm-commons:jar:9.4 (compile)
[INFO] │  │  │  └─ org.ow2.asm:asm-tree:jar:9.4 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-development-mode-spi:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-class-change-agent:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-bootstrap-core:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-bootstrap-app-model:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.smallrye.common:smallrye-common-io:jar:1.13.2 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-devtools-utilities:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.5 (runtime)
[INFO] │  │  ├─ io.quarkus:quarkus-core:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ jakarta.inject:jakarta.inject-api:jar:1.0 (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-ide-launcher:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.smallrye.config:smallrye-config:jar:2.13.3 (compile)
[INFO] │  │  │  │  └─ io.smallrye.config:smallrye-config-core:jar:2.13.3 (compile)
[INFO] │  │  │  │     ├─ io.smallrye.common:smallrye-common-expression:jar:1.13.2 (compile)
[INFO] │  │  │  │     │  └─ io.smallrye.common:smallrye-common-function:jar:1.13.2 (compile)
[INFO] │  │  │  │     ├─ io.smallrye.common:smallrye-common-classloader:jar:1.13.2 (compile)
[INFO] │  │  │  │     └─ io.smallrye.config:smallrye-config-common:jar:2.13.3 (compile)
[INFO] │  │  │  ├─ org.jboss.logmanager:jboss-logmanager-embedded:jar:1.0.11 (compile)
[INFO] │  │  │  ├─ org.jboss.logging:jboss-logging-annotations:jar:2.2.1.Final (compile)
[INFO] │  │  │  ├─ org.jboss.threads:jboss-threads:jar:3.4.3.Final (compile)
[INFO] │  │  │  ├─ org.jboss.slf4j:slf4j-jboss-logmanager:jar:1.2.0.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-bootstrap-runner:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.quarkus:quarkus-fs-util:jar:0.0.9 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-builder:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ org.graalvm.sdk:graal-sdk:jar:22.3.0 (compile)
[INFO] │  │  ├─ org.junit.platform:junit-platform-launcher:jar:1.9.2 (compile)
[INFO] │  │  │  ├─ org.junit.platform:junit-platform-engine:jar:1.9.2 (compile)
[INFO] │  │  │  │  ├─ org.opentest4j:opentest4j:jar:1.2.0 (compile)
[INFO] │  │  │  │  └─ org.junit.platform:junit-platform-commons:jar:1.9.2 (compile)
[INFO] │  │  │  └─ org.apiguardian:apiguardian-api:jar:1.1.2 (compile)
[INFO] │  │  └─ org.junit.jupiter:junit-jupiter:jar:5.9.2 (compile)
[INFO] │  │     ├─ org.junit.jupiter:junit-jupiter-api:jar:5.9.2 (compile)
[INFO] │  │     ├─ org.junit.jupiter:junit-jupiter-params:jar:5.9.2 (compile)
[INFO] │  │     └─ org.junit.jupiter:junit-jupiter-engine:jar:5.9.2 (runtime)
[INFO] │  ├─ io.quarkus:quarkus-smallrye-context-propagation-spi:jar:2.16.5.Final (compile)
[INFO] │  │  └─ org.eclipse.microprofile.context-propagation:microprofile-context-propagation-api:jar:1.2 (compile)
[INFO] │  ├─ io.quarkus:quarkus-vertx-http-dev-console-spi:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-vertx-http-dev-console-runtime-spi:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus.arc:arc:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ jakarta.transaction:jakarta.transaction-api:jar:1.3.3 (compile)
[INFO] │  │  │  └─ io.smallrye.reactive:mutiny:jar:1.9.0 (compile)
[INFO] │  │  │     ├─ org.reactivestreams:reactive-streams:jar:1.0.3 (compile)
[INFO] │  │  │     └─ io.smallrye.common:smallrye-common-annotation:jar:1.13.2 (compile)
[INFO] │  │  └─ io.vertx:vertx-web:jar:4.3.7 (compile)
[INFO] │  │     ├─ io.vertx:vertx-web-common:jar:4.3.7 (compile)
[INFO] │  │     ├─ io.vertx:vertx-auth-common:jar:4.3.7 (compile)
[INFO] │  │     ├─ io.vertx:vertx-bridge-common:jar:4.3.7 (compile)
[INFO] │  │     └─ io.vertx:vertx-core:jar:4.3.7 (compile)
[INFO] │  │        ├─ io.netty:netty-common:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-buffer:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-transport:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-handler:jar:4.1.86.Final (compile)
[INFO] │  │        │  ├─ io.netty:netty-transport-native-unix-common:jar:4.1.86.Final (compile)
[INFO] │  │        │  └─ io.netty:netty-codec:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-handler-proxy:jar:4.1.86.Final (compile)
[INFO] │  │        │  └─ io.netty:netty-codec-socks:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-codec-http:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-codec-http2:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-resolver:jar:4.1.86.Final (compile)
[INFO] │  │        ├─ io.netty:netty-resolver-dns:jar:4.1.86.Final (compile)
[INFO] │  │        │  └─ io.netty:netty-codec-dns:jar:4.1.86.Final (compile)
[INFO] │  │        └─ com.fasterxml.jackson.core:jackson-core:jar:2.14.2 (compile)
[INFO] │  ├─ io.quarkus:quarkus-arc:jar:2.16.5.Final (compile)
[INFO] │  └─ io.quarkus.arc:arc-processor:jar:2.16.5.Final (compile)
[INFO] │     ├─ jakarta.enterprise:jakarta.enterprise.cdi-api:jar:2.0.2 (compile)
[INFO] │     │  ├─ jakarta.el:jakarta.el-api:jar:3.0.3 (compile)
[INFO] │     │  └─ jakarta.interceptor:jakarta.interceptor-api:jar:1.2.5 (compile)
[INFO] │     ├─ org.jboss.logging:jboss-logging:jar:3.5.0.Final (compile)
[INFO] │     └─ jakarta.annotation:jakarta.annotation-api:jar:1.3.5 (compile)
[INFO] ├─ io.quarkus:quarkus-resteasy-reactive-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus.resteasy.reactive:resteasy-reactive-processor:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus.resteasy.reactive:resteasy-reactive:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.quarkus.resteasy.reactive:resteasy-reactive-common:jar:2.16.5.Final (compile)
[INFO] │  │  │     └─ io.quarkus.resteasy.reactive:resteasy-reactive-common-types:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus.resteasy.reactive:resteasy-reactive-common-processor:jar:2.16.5.Final (compile)
[INFO] │  │  └─ org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec:jar:2.0.1.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-vertx-http-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-vertx-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-netty-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  │  │  └─ io.quarkus:quarkus-netty:jar:2.16.5.Final (compile)
[INFO] │  │  │  │     └─ com.aayushatharva.brotli4j:brotli4j:jar:1.8.0 (compile)
[INFO] │  │  │  │        └─ com.aayushatharva.brotli4j:native-osx-aarch64:jar:1.8.0 (compile)
[INFO] │  │  │  └─ io.quarkus:quarkus-vertx:jar:2.16.5.Final (compile)
[INFO] │  │  │     ├─ io.netty:netty-codec-haproxy:jar:4.1.86.Final (compile)
[INFO] │  │  │     ├─ io.quarkus:quarkus-vertx-latebound-mdc-provider:jar:2.16.5.Final (compile)
[INFO] │  │  │     └─ io.smallrye:smallrye-fault-tolerance-vertx:jar:5.6.0 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-vertx-http:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-security-runtime-spi:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.quarkus:quarkus-credentials:jar:2.16.5.Final (compile)
[INFO] │  │  │  ├─ io.smallrye.common:smallrye-common-vertx-context:jar:1.13.2 (compile)
[INFO] │  │  │  │  └─ io.smallrye.common:smallrye-common-constraint:jar:1.13.2 (compile)
[INFO] │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-web:jar:2.30.1 (compile)
[INFO] │  │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-web-common:jar:2.30.1 (compile)
[INFO] │  │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-auth-common:jar:2.30.1 (compile)
[INFO] │  │  │  │  ├─ io.smallrye.reactive:smallrye-mutiny-vertx-bridge-common:jar:2.30.1 (compile)
[INFO] │  │  │  │  └─ io.smallrye.reactive:smallrye-mutiny-vertx-uri-template:jar:2.30.1 (compile)
[INFO] │  │  │  │     └─ io.vertx:vertx-uri-template:jar:4.3.7 (compile)
[INFO] │  │  │  └─ io.github.crac:org-crac:jar:0.1.3 (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-vertx-http-deployment-spi:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-mutiny-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.quarkus:quarkus-smallrye-context-propagation-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-kubernetes-spi:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus.qute:qute-core:jar:2.16.5.Final (compile)
[INFO] │  │  └─ org.yaml:snakeyaml:jar:1.33 (compile)
[INFO] │  ├─ io.quarkus:quarkus-resteasy-reactive:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-resteasy-reactive-common:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.quarkus:quarkus-mutiny:jar:2.16.5.Final (compile)
[INFO] │  │  │     ├─ io.quarkus:quarkus-smallrye-context-propagation:jar:2.16.5.Final (compile)
[INFO] │  │  │     │  └─ io.smallrye:smallrye-context-propagation:jar:1.2.2 (compile)
[INFO] │  │  │     │     ├─ io.smallrye:smallrye-context-propagation-api:jar:1.2.2 (compile)
[INFO] │  │  │     │     └─ io.smallrye:smallrye-context-propagation-storage:jar:1.2.2 (compile)
[INFO] │  │  │     └─ io.smallrye.reactive:mutiny-smallrye-context-propagation:jar:1.9.0 (compile)
[INFO] │  │  ├─ io.quarkus.resteasy.reactive:resteasy-reactive-vertx:jar:2.16.5.Final (compile)
[INFO] │  │  │  └─ io.smallrye.reactive:smallrye-mutiny-vertx-core:jar:2.30.1 (compile)
[INFO] │  │  │     ├─ io.smallrye.reactive:smallrye-mutiny-vertx-runtime:jar:2.30.1 (compile)
[INFO] │  │  │     └─ io.smallrye.reactive:vertx-mutiny-generator:jar:2.30.1 (compile)
[INFO] │  │  │        └─ io.vertx:vertx-codegen:jar:4.3.7 (compile)
[INFO] │  │  └─ io.quarkus:quarkus-jsonp:jar:2.16.5.Final (compile)
[INFO] │  │     └─ org.glassfish:jakarta.json:jar:1.1.6 (compile)
[INFO] │  ├─ io.quarkus:quarkus-resteasy-reactive-server-spi-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  └─ io.quarkus:quarkus-resteasy-reactive-spi-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-jaxrs-spi-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-security-spi:jar:2.16.5.Final (compile)
[INFO] │  │  └─ io.quarkus.security:quarkus-security:jar:1.1.4.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-jsonp-deployment:jar:2.16.5.Final (compile)
[INFO] │  └─ io.quarkus:quarkus-resteasy-reactive-common-deployment:jar:2.16.5.Final (compile)
[INFO] ├─ io.quarkus:quarkus-smallrye-openapi-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-smallrye-openapi-spi:jar:2.16.5.Final (compile)
[INFO] │  │  └─ io.smallrye:smallrye-open-api-core:jar:3.1.1 (compile)
[INFO] │  │     ├─ org.eclipse.microprofile.openapi:microprofile-openapi-api:jar:2.0.1 (compile)
[INFO] │  │     ├─ org.eclipse.microprofile.config:microprofile-config-api:jar:2.0.1 (compile)
[INFO] │  │     └─ com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.14.2 (compile)
[INFO] │  ├─ io.quarkus:quarkus-resteasy-server-common-spi:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-resteasy-common-spi:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-smallrye-openapi-common-deployment:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.quarkus:quarkus-swagger-ui-deployment:jar:2.16.5.Final (compile)
[INFO] │  │  ├─ io.quarkus:quarkus-swagger-ui:jar:2.16.5.Final (compile)
[INFO] │  │  └─ io.smallrye:smallrye-open-api-ui:jar:3.1.1 (compile)
[INFO] │  ├─ io.quarkus:quarkus-smallrye-openapi:jar:2.16.5.Final (compile)
[INFO] │  ├─ io.smallrye:smallrye-open-api-jaxrs:jar:3.1.1 (compile)
[INFO] │  ├─ io.smallrye:smallrye-open-api-spring:jar:3.1.1 (compile)
[INFO] │  └─ io.smallrye:smallrye-open-api-vertx:jar:3.1.1 (compile)
[INFO] ├─ org.eclipse.digitaltwin.aas4j:dataformat-json:jar:1.0.0-milestone-03 (compile)
[INFO] │  ├─ org.eclipse.digitaltwin.aas4j:dataformat-core:jar:1.0.0-milestone-03 (compile)
[INFO] │  │  ├─ org.eclipse.digitaltwin.aas4j:model:jar:1.0.0-milestone-03 (compile)
[INFO] │  │  └─ com.google.guava:guava:jar:31.1-jre (compile)
[INFO] │  │     ├─ com.google.guava:failureaccess:jar:1.0.1 (compile)
[INFO] │  │     ├─ org.checkerframework:checker-qual:jar:3.29.0 (compile)
[INFO] │  │     ├─ com.google.errorprone:error_prone_annotations:jar:2.17.0 (compile)
[INFO] │  │     └─ com.google.j2objc:j2objc-annotations:jar:1.3 (compile)
[INFO] │  ├─ com.fasterxml.jackson.core:jackson-annotations:jar:2.14.2 (compile)
[INFO] │  ├─ com.fasterxml.jackson.core:jackson-databind:jar:2.14.2 (compile)
[INFO] │  ├─ com.networknt:json-schema-validator:jar:1.0.56 (compile)
[INFO] │  ├─ io.github.classgraph:classgraph:jar:4.8.109 (compile)
[INFO] │  ├─ org.slf4j:slf4j-api:jar:1.7.36 (compile)
[INFO] │  └─ org.slf4j:slf4j-simple:jar:1.7.31 (compile)
[INFO] └─ org.jsoup:jsoup:jar:1.15.3 (compile)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.304 s
[INFO] Finished at: 2023-04-25T16:16:58+02:00
[INFO] ------------------------------------------------------------------------

Am I missing something here?

HansG89 commented 1 year ago

Digging deeper into this I finally found the root cause of the problem. There was a bug in ClassGraph that caused the issue with Quarkus. Beginning from version 4.8.139 of ClassGraph I'm able to get it working.

Is it possible to bump the version of ClassPath to a more recent one? Thank you!

FrankSchnicke commented 1 year ago

This was fixed and is included in the latest release