quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

The LOCAL class has a scope annotation but it must be ignored per the CDI rules

Open gbourant opened this issue 7 months ago • 4 comments

Describe the bug

If you run the HelloResourceTest it throws the following error: [error]: Build step io.quarkus.arc.deployment.ArcProcessor#generateResources threw an exception: jakarta.enterprise.inject.spi.DeploymentException: java.lang.IllegalStateException: The LOCAL class gr.AnotherTest$1Rest has a scope annotation but it must be ignored per the CDI rules.

I tried Include/Exclude Jakarta REST classes and quarkus.arc.exclude-types but it did not work. (not sure how to apply quarkus.arc.exclude-types for local classes.)

@QuarkusTest
class HelloResourceTest {
    @Test
    void testHelloEndpoint() {
    }
}
public class AnotherTest {

    @Test
    public void test(){
        {
            @ApplicationScoped
            class Rest   {}
        }
    }

    @Test
    public void test2(){
        {
            class Rest  io.quarkiverse.renarde.Controller {}
        }
    }
}

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

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

No response

Additional information

No response

gbourant avatar Jun 30 '24 11:06 gbourant