-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Receive files outside the classpath in quarkus-liquibase #39720
Receive files outside the classpath in quarkus-liquibase #39720
Conversation
...base-mongodb/runtime/src/main/java/io/quarkus/liquibase/mongodb/LiquibaseMongodbFactory.java
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
…elog location uploading an adjustment adding ClassLoaderResourceAccessor to the compositeResourceAccessor formatting code
Added the classpath to the CompositeResourceAccessor of LiquibaseMongodbFactory, this way even if you specify a custom searchpath you will still be able to reference some file inside the resources folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Status for workflow
|
/** | ||
* The search path for DirectoryResourceAccessor | ||
*/ | ||
@ConfigItem(defaultValue = "/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually wondering if this is a good default... Does this mean it will start searching at the root of the file system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I saw that but I have to admit it's confusing. Anyway, let's leave it like this for now, but I assume that using Optional<List<String>>
for searchPath
would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it this way because at the time I could not find how to declare the default list as an empty list in the build time config, because if I put a default value of "" in the tag I got an error related to null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/**
* The search path for DirectoryResourceAccessor
*/
@ConfigItem
public Optional<List<String>> searchPath;
should work, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try and made the change if u prefer it that way, no biggie for me. As this is my first time contributing in quarkus I am not very clear on how to do certain things and that was a solution that I found viable at the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this and you can try and update both configs with my suggestion. If all goes well, you can open a new PR
This PR is the continuation of an improvement made in quarkus-liquibase-mongodb extension which was replicated in quarkus-liquibase extension, more information about it can be found in this issue.