Skip to content

Commit

Permalink
feat: skip check if file does not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Mar 1, 2024
1 parent 54dffb4 commit 6a28470
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/tkit/maven/liquibase/CheckChangesMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import org.apache.maven.project.MavenProject;
import org.liquibase.maven.plugins.AbstractLiquibaseChangeLogMojo;
import java.io.ByteArrayOutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;

/**
Expand Down Expand Up @@ -70,6 +72,12 @@ public class CheckChangesMojo extends AbstractLiquibaseChangeLogMojo {
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
logLevel = "INFO";

if (!Files.exists(Path.of(liquibaseChangeLogFile))) {
getLog().info("Liquibase change log file does not exists. File: " + liquibaseChangeLogFile);
return;
}

changeLogFile = liquibaseChangeLogFile;
project = currentProject;
verbose = liquibaseVerbose;
Expand Down

0 comments on commit 6a28470

Please sign in to comment.