Skip to content

Dev mode gets incorrect classpath for (some) test-scoped extension dependencies #30317

@holly-cummins

Description

@holly-cummins

Describe the bug

See quarkiverse/quarkus-pact#28, which has a reproducer. An alternate reproducer is https://github.com/holly-cummins/quarkus-pact/tree/test-test-and-dev-modes (just re-enable the @Disabled tests).

#30238 fixes the issue for test mode, but the dev mode fix is more complex.

Expected behavior

Test behaviour in dev mode should be the same as normal mode.

Actual behavior

Dependencies need to be scoped with provided, runtime, or compile to be correctly resolved. This isn't true for all dependencies, but I haven't isolated exactly what the defining characteristic is (beyond providing a reproducer :) ) - it's perhaps that the dependency is an extension, or that the problematic dependencies involve kotlin, or that they're using the JUnit libraries so are in a different classloader.

How to Reproduce?

quarkiverse/quarkus-pact#28, has a reproducer. An alternate reproducer is https://github.com/holly-cummins/quarkus-pact/tree/test-test-and-dev-modes (just re-enable the @Disabled tests, and then run mvn clean install from the top level).

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

No response

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

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions