Coverage Report - org.liquibase.maven.plugins.LiquibaseTag
 
Classes in this File Line Coverage Branch Coverage Complexity
LiquibaseTag
0%
0/10
0%
0/4
2
 
 1  
 package org.liquibase.maven.plugins;
 2  
 
 3  
 import liquibase.Liquibase;
 4  
 import liquibase.exception.LiquibaseException;
 5  
 import org.apache.maven.plugin.MojoFailureException;
 6  
 
 7  
 /**
 8  
  * Writes a Liquibase tag to the database.
 9  
  * 
 10  
  * @author Peter Murray
 11  
  * @goal tag
 12  
  */
 13  0
 public class LiquibaseTag extends AbstractLiquibaseMojo {
 14  
 
 15  
     /**
 16  
      * @parameter expression="${liquibase.tag}"
 17  
      * @required
 18  
      */
 19  
     private String tag;
 20  
 
 21  
     @Override
 22  
     protected void checkRequiredParametersAreSpecified() throws MojoFailureException {
 23  0
         super.checkRequiredParametersAreSpecified();
 24  
 
 25  0
         if (tag == null || tag.trim().length() == 0) {
 26  0
             throw new MojoFailureException("The tag must be specified.");
 27  
         }
 28  0
     }
 29  
 
 30  
     @Override
 31  
     protected void printSettings(String indent) {
 32  0
         super.printSettings(indent);
 33  0
         getLog().info(indent + "tag: " + tag);
 34  0
     }
 35  
 
 36  
     @Override
 37  
     protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException {
 38  0
         liquibase.tag(tag);
 39  0
     }
 40  
 }