Coverage Report - org.liquibase.maven.plugins.LiquibaseDropAll
 
Classes in this File Line Coverage Branch Coverage Complexity
LiquibaseDropAll
12%
1/8
0%
0/2
1.5
 
 1  
 package org.liquibase.maven.plugins;
 2  
 
 3  
 import liquibase.Liquibase;
 4  
 import liquibase.exception.LiquibaseException;
 5  
 
 6  
 /**
 7  
  * Drops all database objects owned by the user. Note that functions, procedures and packages are not dropped.
 8  
  * 
 9  
  * @author Ferenc Gratzer
 10  
  * @description Liquibase DropAll Maven plugin
 11  
  * @goal dropAll
 12  
  * @since 2.0.2
 13  
  */
 14  2
 public class LiquibaseDropAll extends AbstractLiquibaseMojo {
 15  
 
 16  
     /**
 17  
      * The schemas to be dropped. Comma separated list.
 18  
      * 
 19  
      * @parameter expression="${liquibase.schemas}"
 20  
      */
 21  
     protected String schemas;
 22  
 
 23  
     @Override
 24  
     protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException {
 25  0
         if (null != schemas) {
 26  0
             liquibase.dropAll(schemas.split(","));
 27  
         } else {
 28  0
             liquibase.dropAll();
 29  
         }
 30  0
     }
 31  
 
 32  
     @Override
 33  
     protected void printSettings(String indent) {
 34  0
         super.printSettings(indent);
 35  0
         getLog().info(indent + "schemas: " + schemas);
 36  0
     }
 37  
 }