Reputation: 939
I have next question: I use liquibase maven plugin and by default when i making mvn clean package it dropAll tables and updates them.
<code>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>2.0.3</version>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
</configuration>
</plugin>
</code>
But, i want to turn off execution of this plugin for all maven phases, i need it only when i am executing mvn liquibase:dropAll or mvn liquibase:update. How i can do it?
Upvotes: 1
Views: 917
Reputation: 940
You can always place the plugin inside a profile. So it won't run unless you activate the profile:
<profiles>
<profile>
<id>liquibase</id>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>2.0.3</version>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
which you activate as follows:
mvn liquibase:update -Pliquibase
Upvotes: 5