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 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | 0 | public class LiquibaseTag extends AbstractLiquibaseMojo { |
14 | |
|
15 | |
|
16 | |
|
17 | |
|
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 | |
} |