I want to link yaml database creation rules from src/main/resources.. in src/test/resources and add one more chagngelog with sample data.
src\test\resources\db\changelog\db.changelog-master.yaml :
databaseChangeLog:
- include:
file: ../../main/resources/db/changelog/db.changelog-master.yaml
- include:
file: db/changelog/marketplace/sampleData.yaml
But it doesn't work. So, the error is : Error parsing ../../main/resources/db/changelog/db.changelog-master.yaml
Is there any other options to link main resources from main? This is a spring boot project.
Error stack trace :
Caused by: liquibase.exception.ChangeLogParseException: Error parsing classpath:/db/changelog/db.changelog-master.yaml
at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:84)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:217)
at liquibase.Liquibase.update(Liquibase.java:190)
at liquibase.Liquibase.update(Liquibase.java:179)
at
...
Caused by: java.io.FileNotFoundException: class path resource [../../main/resources/db/changelog/db.changelog-master.yaml] cannot be resolved to URL because it does not exist
at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:195)
at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.getResourcesAsStream(SpringLiquibase.java:504)
at liquibase.util.StreamUtil.singleInputStream(StreamUtil.java:186)
at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:27)
... 52 more