Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liquibase is not using module directory as working directory. #117

Open
chali opened this issue Apr 4, 2023 · 1 comment
Open

Liquibase is not using module directory as working directory. #117

chali opened this issue Apr 4, 2023 · 1 comment

Comments

@chali
Copy link

chali commented Apr 4, 2023

I have a submodule that applies liquibase plugin then I have a sibling submodule that is an application. As part of application start I call task liquibaseUpdate.

I noticed that liquibase is using current working directory where I invoke gradle as its working directory not the submodule where plugin is applied.

E.g.

-- app
\- module-with-liquibase

I execute ./gradlew :app:run from project root. I end up starting :module-with-liquibase:liquibaseUdate and all change sets are expected to be relative from project root.

If I move to app directory and execute ../gradlew run now my changesets are expected to be relative to app directory.

Am I misapplying the plugin? Should it live only in the root modules?

@Djimi
Copy link

Djimi commented Apr 6, 2023

Hey @chali ,

I recently start using Liquibase, but I believe maybe that's the important part of the documentation for you:

If you are using liquibase in a subproject structure, due to a limitation in liquibase, you will need to override the user.dir using the jvmArgs. For example:

liquibase {
  jvmArgs "-Duser.dir=$project.projectDir" 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants