Skip to content

Flyway auto-configuration does not work with Flyway 10 when using GraalVM #38923

Closed as not planned
@UbiquitousBear

Description

@UbiquitousBear

I've first seen this when trying to build a native SB image 3.2.1 with flyway-core:10.4.1. Flyway Autoconfigure NativeImageResourceProviderCustomizer (code link) creates a custom org.flywaydb.core.api.ResourceProvider using a org.flywaydb.core.internal.scanner.Scanner.

The constructor for Scanner has changed between version 9 and 10, whereby the former accepted more arguments.

The code:

Scanner<JavaMigration> scanner = new Scanner<>(JavaMigration.class,
					Arrays.asList(configuration.getLocations()), configuration.getClassLoader(),
					configuration.getEncoding(), configuration.isDetectEncoding(), false, new ResourceNameCache(),
					new LocationScannerCache(), configuration.isFailOnMissingLocations());

should be replaced with

Scanner<JavaMigration> scanner = new Scanner<>(
     JavaMigration.class,                   // Class<I> implementedInterface
     false,                                            // boolean stream
     new ResourceNameCache(),    // ResourceNameCache resourceNameCache
     new LocationScannerCache(), // LocationScannerCache locationScannerCache
     configuration                              // Configuration configuration [FluentConfiguration provided will do]					
);

I can make the change for this in SB, however, how should Flyway 9 be handled?

Metadata

Metadata

Assignees

Labels

status: supersededAn issue that has been superseded by anothertype: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions