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 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
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 | |
} |