使用Liquibase的更新目标

时间:2013-01-24 17:13:49

标签: postgresql java-ee maven liquibase

我试图自动化数据库进程。据我所知,通过使用Liquibase,我可以使用<goal>标签自动调用changesetLog-file中所做的更改。

但是当我扩展我的pom.xml时:

<plugin>
  <groupId>org.liquibase</groupId>
  <artifactId>liquibase-maven-plugin</artifactId>
  <version>2.0.5</version>
  <configuration>
    ..
  </configuration>
  <executions>
    <execution>
      <phase>process-resources</phase>
      <goals>
        <goal>update</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Eclipse向我显示了这个错误:

Plugin execution not covered by lifecycle configuration: org.liquibase:liquibase-maven-plugin:2.0.5: (execution: default, phase: process-resources)

知道怎么解决这个问题?问题是什么?

1 个答案:

答案 0 :(得分:1)

liquibase有几个available goals。你忽略了指定“更新”。

  <executions>
    <execution>
      <phase>process-resources</phase>
      <goals>
        <goal>update</goal>
      </goals>
    </execution>
  </executions>

对于liquibase示例,请参阅以下问题: