Skip to content

Commit

Permalink
Skips execution if packaging is 'pom'. (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
coollog authored Jul 30, 2018
1 parent 51b20c4 commit aab67f9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public class BuildDockerMojo extends JibPluginConfiguration {

@Override
public void execute() throws MojoExecutionException {
if ("pom".equals(getProject().getPackaging())) {
getLog().info("Skipping containerization because packaging is 'pom'...");
return;
}

MavenBuildLogger mavenBuildLogger = new MavenBuildLogger(getLog());
handleDeprecatedParameters(mavenBuildLogger);
SystemPropertyValidator.checkHttpTimeoutProperty(MojoExecutionException::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ public class BuildImageMojo extends JibPluginConfiguration {

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
// TODO: Consolidate all of these checks.
if ("pom".equals(getProject().getPackaging())) {
getLog().info("Skipping containerization because packaging is 'pom'...");
return;
}

MavenBuildLogger mavenBuildLogger = new MavenBuildLogger(getLog());
handleDeprecatedParameters(mavenBuildLogger);
SystemPropertyValidator.checkHttpTimeoutProperty(MojoExecutionException::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public class BuildTarMojo extends JibPluginConfiguration {

@Override
public void execute() throws MojoExecutionException {
if ("pom".equals(getProject().getPackaging())) {
getLog().info("Skipping containerization because packaging is 'pom'...");
return;
}

MavenBuildLogger mavenBuildLogger = new MavenBuildLogger(getLog());
handleDeprecatedParameters(mavenBuildLogger);
SystemPropertyValidator.checkHttpTimeoutProperty(MojoExecutionException::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public class DockerContextMojo extends JibPluginConfiguration {

@Override
public void execute() throws MojoExecutionException {
if ("pom".equals(getProject().getPackaging())) {
getLog().info("Skipping containerization because packaging is 'pom'...");
return;
}

MavenBuildLogger mavenBuildLogger = new MavenBuildLogger(getLog());
handleDeprecatedParameters(mavenBuildLogger);
SystemPropertyValidator.checkHttpTimeoutProperty(MojoExecutionException::new);
Expand Down

0 comments on commit aab67f9

Please sign in to comment.