By default this option is turned off as per the Liquibase documentation, but when execute through maven Liquibase plugin seems like this default is other way round and by default it is true and even if add the property
promptOnNonLocalDatabase=false
to liquibase properties file, it is not changing its behavior, when we execute this in non head environments like unix, it does through following exception
No X11 DISPLAY variable WAS set, this program aims Performed year operation Which
Requires it.
at java.awt.GraphicsEnvironment.
at java.awt.Window.(Window.java: 407)
at java.awt.Frame.(Frame.java: 402)
at java.awt.Frame.(Frame.java: 367)
at $ javax.swing.SwingUtilities SharedOwnerFrame.(
at javax.swing.SwingUtilities.
at javax.swing.JOptionPane.
at javax.swing.JOptionPane.
at javax.swing.JOptionPane.
at javax.swing.JOptionPane.
at liquibase.SwingUIFacade.
Solution to this problem is ,
Just add the following in to the maven plugin configuration section
<promptOnNonLocalDatabase>fals
Example :
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupI d>
<artifactId>liquibase-maven-pl ugin</artifactId>
<version>2.0.1</version>
<executions>
<execution>
<phase>process-resources</phas e>
<configuration>
<propertyFile>target/classes/ liquibase.properties</property File>
<promptOnNonLocalDatabase>fals e</promptOnNonLocalDatabase>
</configuration>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Hope this helps....
I can't even tell you how helpful this WAS. Thanks!
ReplyDeleteThanks a lot, dude!
ReplyDeleteI second and third the motion - thanks!
ReplyDeleteThanks for visiting and comment
DeleteThanks a lot, very helpful!
ReplyDeleteThank you!
ReplyDeleteYou are awesome. Thank you so much
ReplyDelete