Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

includeAll does not work when running with the maven plugin

$
0
0
Hi everybody,

I have a problem with 'includeAll' when running liquibase via liquibase-maven-plugin 3.5.3.

An example is attached as zip-file shows exactly our use case.It can be executed with the command mvn liquibase:update

It produces the following error:
  1. [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:update (default-cli) on project liquibase-test: Error setting up or running Liquibase: liquibase.exception.SetupException: Cannot find base path 'changelogFiles/master-file.xml' -> [Help

  2. org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:3.5.3:update (default-cli) on project liquibase-test: Error setting up or running Liquibase: liquibase.exception.SetupException: Cannot find base path 'changelogFiles/master-file.xml'
  3.         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
  4.         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  5.         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  6.         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
  7.         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  8.         at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
  9.         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  10.         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
  11.         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
  12.         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
  13.         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
  14.         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
  15.         at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
  16.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  17.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  18.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  19.         at java.lang.reflect.Method.invoke(Method.java:498)
  20.         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  21.         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  22.         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  23.         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  24. Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: liquibase.exception.SetupException: Cannot find base path 'changelogFiles/master-file.xml'
  25.         at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:398)
  26.         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  27.         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
  28.         ... 20 more
  29. Caused by: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: Cannot find base path 'changelogFiles/master-file.xml'
  30.         at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:27)
  31.         at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:229)
  32.         at liquibase.Liquibase.update(Liquibase.java:202)
  33.         at liquibase.Liquibase.update(Liquibase.java:192)
  34.         at liquibase.Liquibase.update(Liquibase.java:335)
  35.         at org.liquibase.maven.plugins.LiquibaseUpdate.doUpdate(LiquibaseUpdate.java:33)
  36.         at org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:30)
  37.         at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:394)
  38.         ... 22 more
  39. Caused by: liquibase.exception.SetupException: Cannot find base path 'changelogFiles/master-file.xml'
  40.         at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:448)
  41.         at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:352)
  42.         at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:282)
  43.         at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
  44.         ... 29 more
  45. Caused by: liquibase.exception.UnexpectedLiquibaseException: Cannot find base path 'changelogFiles/master-file.xml'
  46.         at liquibase.resource.AbstractResourceAccessor.convertToPath(AbstractResourceAccessor.java:145)
  47.         at liquibase.resource.ClassLoaderResourceAccessor.list(ClassLoaderResourceAccessor.java:61)
  48.         at org.liquibase.maven.plugins.MavenResourceAccessor.list(MavenResourceAccessor.java:29)
  49.         at liquibase.resource.CompositeResourceAccessor.list(CompositeResourceAccessor.java:40)
  50.         at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:425)
We tried some debugging and found out, that the error is thrown when trying to access to the file system via MavenResourceAccessor to target/classes/...

For us it sounds like a bug, but maybe we misunderstand something and it is a feature. Can anyone please help us with that problem.

Running liquibase via commandline would be a workaround for us, but this would lead in higher maintenance-effort for us. So we would prefer to execute it via maven directly in our build.

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>