简体   繁体   中英

How add Flyway dependency and build native image Quarkus java.lang.ClassNotFoundException: org.jboss.vfs.VirtualFileFilter

I'm building an app using quarkus, kotlin and flyway. Everything works fine with the JVM execution, but it fails when we try to build a native image. After some debugging I found that the way Quarkus builds the native image is trying to load some dependencies from Flyway that we are not using like jboss-vfs or the Android SDK.

This is the output from the mvn package -Pnative -Dnative-image.docker-build=true command:

在此处输入图片说明

The inner exception message is

java.lang.ClassNotFoundException: org.jboss.vfs.VirtualFileFilter

What's the "right way" to add Flyway as a dependency and being able to compile a native image without adding all the unused/optional dependencies?

Quarkus supports Flyway without issues when executing in JVM mode, so you can use it as always.

Quarkus native applications with Flyway are not supported yet. Some work to support it is in progress here: https://github.com/quarkusio/quarkus/issues/1575

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM