Coverage Report - org.liquibase.maven.plugins.LiquibaseMigrate
 
Classes in this File Line Coverage Branch Coverage Complexity
LiquibaseMigrate
0%
0/8
0%
0/2
1.5
 
 1  
 package org.liquibase.maven.plugins;
 2  
 
 3  
 import liquibase.exception.LiquibaseException;
 4  
 import liquibase.Liquibase;
 5  
 import liquibase.resource.ResourceAccessor;
 6  
 import org.apache.maven.plugin.MojoExecutionException;
 7  
 import org.apache.maven.plugin.MojoFailureException;
 8  
 
 9  
 /**
 10  
  * Liquibase Migration Maven plugin. This plugin allows for DatabaseChangeLogs to be applied to a database as part of a
 11  
  * Maven build process.
 12  
  * 
 13  
  * @author Peter Murray
 14  
  * @description Liquibase Migrate Maven plugin
 15  
  * @goal migrate
 16  
  * @deprecated Use the LiquibaseUpdate class or Maven goal "update" instead.
 17  
  */
 18  0
 public class LiquibaseMigrate extends AbstractLiquibaseUpdateMojo {
 19  
 
 20  
     @Override
 21  
     public void configureFieldsAndValues(ResourceAccessor fo) throws MojoExecutionException, MojoFailureException {
 22  0
         getLog().warn(
 23  
                 "This plugin goal is DEPRICATED and will be removed in a future "
 24  
                         + "release, please use \"update\" instead of \"migrate\".");
 25  0
         super.configureFieldsAndValues(fo);
 26  0
     }
 27  
 
 28  
     @Override
 29  
     protected void doUpdate(Liquibase liquibase) throws LiquibaseException {
 30  0
         if (changesToApply > 0) {
 31  0
             liquibase.update(changesToApply, contexts);
 32  
         } else {
 33  0
             liquibase.update(contexts);
 34  
         }
 35  0
     }
 36  
 }