I am trying to use Flyway to run my database migration scripts. I have two SQL scripts and one Java Script I am trying to run. When I run ./gradlew flywayMigrate or gradle flywayMigrate it only picks up on the SQL scripts and not the Java one.
My project setup is below:
database_migrations
--->src
------>main/java
--------->db/migration
-------------V3__load_data.java
------>main/resources
--------->db/migration
-------------V1__base_table.sql
-------------V2__stored_procedures.sql
I have tried a variety of solutions to get the java script to run such as specifying the flyway.locations=classpath:db/migration but that just results in this output Unable to resolve location classpath:db/migration. I have tried moving it other packages. I have tried putting it in a jar and running from the commandline tool but it doesn't pick it up. I have tried both the JDBCMigration and the SpringJDBCMigration class.
Am I missing something in how it is supposed to be run?
When I run it with gradlew compileJava in my jenkins instance it throws Could not find tools.jar, not sure if that my be related