generateChangeLog goal finish with error while executing from multi-modules maven project
Description
Environment
Ubuntu 16.04 LTS
Java version "1.8.0_161"
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T14:41:47-02:00)
Activity
Show:
generateChangeLog goal fails while building project with multi-modules.
Suppose you have a structure like this, where project A and B are modules of project X:
Project X
+- Project A
+- Project B
Project X does not have any content. It's just an aggregation of all modules.
And on project A, you define inside your POM file, the liquibase-maven-plugin like this:
If you execute the command mvn generate-resources directly on project A it works without any problem. But if you execute from project X, the following error occurs:
"Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.4:generateChangeLog (generate-initial-db-schema) on project project-a: Error setting up or running Liquibase: liquibase.command.CommandExecutionException: java.io.FileNotFoundException: src/main/resources/db/initial-schema.xml (No such file or directory) -> [Help 1]"
And just to make sure, I've created the directory "src/main/resources/db/" on project X and ran again the command. The build has completed with success, but it generated the initial-schema.xml file inside this directory on project X. In other words, it used the path from project X instead of the path from project A.