liquibase-maven-plugin无法执行目标

时间:2019-01-17 10:44:39

标签: maven liquibase

我已将liquibase集成到我的项目中,并在pom.xml中添加了liquibase插件。在我的本地系统上运行正常,但是签入github后,登台构建因以下错误而失败:

 ------------------------------------------------------------------------
[[1;34mINFO[m] Parsing Liquibase Properties File
[[1;34mINFO[m]   File: src/main/resources/liquibase.properties
[[1;34mINFO[m] ------------------------------------------------------------------------
[[1;34mINFO[m] Starting Liquibase at Thu, 17 Jan 2019 15:24:09 IST (version 3.6.1 built at 2018-04-11 09:05:04)
[[1;34mINFO[m] Executing on Database: jdbc:mysql://10.264.230.308/imsstaging?autoReconnect=true&useSSL=false
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;31mBUILD FAILURE[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 3.210 s
[[1;34mINFO[m] Finished at: 2019-01-17T15:24:10+05:30
[[1;34mINFO[m] Final Memory: 16M/121M
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;31mERROR[m] Failed to execute goal [32morg.liquibase:liquibase-maven-plugin:3.6.1:update[m [1m(default)[m on project [36mede-app[m: [1;31mExecution default of goal org.liquibase:liquibase-maven-plugin:3.6.1:update failed: [m
[[1;31mERROR[m] [1;31mNo X11 DISPLAY variable was set, but this program performed an operation which requires it.[m
[[1;31mERROR[m] -> [1m[Help 1][m 

POM.xml:

<plugin>
  <groupId>org.liquibase</groupId>
  <artifactId>liquibase-maven-plugin</artifactId>
  <version>3.6.1</version>
  <configuration>
    <propertyFile>src/main/resources/liquibase.properties</propertyFile>
  </configuration>
  <executions>
    <execution>
      <phase>process-resources</phase>
      <goals>
        <goal>update</goal>
      </goals>
    </execution>
  </executions>
</plugin>

1 个答案:

答案 0 :(得分:0)

在插件内部,我将标签用作false并起作用。

<configuration>
                <propertyFile>src/main/resources/liquibase.properties</propertyFile>
                <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
</configuration>

以下是完整的详细信息:

http://blog.nutpan.com/2012/03/liquibase-maven-plugin-issue-with-non.html