I have silly problem when running my application inside docker container or using jar file. When application is started locally migration library which is using reflections:
new Reflections("package").getTypesAnnotatedWith(SomeClass.class)
Is able to find classes with this annotation. But when it's executed inside docker container or from *.jar file - reflections is not finding any classes. Jar file which is used is built by maven.
Update: If we'll change packaging to war - everything id working correctly. But it would be better to have just jar file.