Skip to content

Flyway: Java-migrations picked up everywhere #28554

Open

Description

Describe the bug

When working with Java-migrations with quarkus-flyway, every class in the classpath extending org.flywaydb.core.api.migration.JavaMigration is picked up, independent of what is configured in quarkus.flyway.locations.

As far as I can see, FlywayProcessor just searches for implementors of JavaMigration without considering quarkus.flyway.locations.

Expected behavior

Java-Migrations should only be picked up if they are in a classpath defined in quarkus.flyway.locations.

Actual behavior

All the Java-migrations found everywhere are picked up for migration.

How to Reproduce?

Reproducer: flyway-classpath-reproducer.zip

Steps to reproduce:

  1. Start app
  2. Java-migration is executed (see message in sysout)

Output of uname -a or ver

Microsoft Windows [Version 10.0.19044.1889]

Output of java -version

openjdk version "17.0.4.1" 2022-08-12 LTS OpenJDK Runtime Environment Corretto-17.0.4.9.1 (build 17.0.4.1+9-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.4.9.1 (build 17.0.4.1+9-LTS, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.2.Final

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

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions