quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.82k stars 2.69k forks source link

Unknown enum constant org.osgi.annotation.bundle.Requirement.Resolution.OPTIONAL #32332

Closed kucharzyk closed 1 year ago

kucharzyk commented 1 year ago

Describe the bug

Quarkus 3.0.0.CR1 is showing the following warning during compilation:

[WARNING] unknown enum constant org.osgi.annotation.bundle.Requirement.Resolution.OPTIONAL
  reason: class file for org.osgi.annotation.bundle.Requirement$Resolution not found

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

  1. Use code.quarkus.io to create new project with Quarkus 3.0.0.CR1 using default settings
  2. Add the following service
package org.acme;

import jakarta.enterprise.context.ApplicationScoped;
import org.eclipse.microprofile.config.inject.ConfigProperty;

@ApplicationScoped
public class SampleService {

    private final String issuer;

    public SampleService(@ConfigProperty(name = "mp.jwt.verify.issuer") String issuer) {
        this.issuer = issuer;
    }
}

It's important to use microprofile ConfigProperty annotation

  1. mvn clean package

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.0.0.CR1

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

kucharzyk commented 1 year ago

Looks like it's the problem with microprofile-config

https://github.com/eclipse/microprofile-config/pull/732#issuecomment-1482128111

geoand commented 1 year ago

I think we've seen this before, right @radcortez?

DCCSKrezovic commented 1 year ago

Just found https://github.com/quarkusio/quarkus/issues/19970. Subscribing here ...

wjglerum commented 1 year ago

I commented here last weekend on the same issue https://github.com/quarkusio/quarkus/issues/30037

radcortez commented 1 year ago

Unfortunately, the fix didn't make it into the released version of the Jakarta artifact. We need a new release of MP Config API.