diff --git a/src/main/java/io/fabric8/maven/docker/SourceMojo.java b/src/main/java/io/fabric8/maven/docker/SourceMojo.java index c6acad3eb..93c226a84 100644 --- a/src/main/java/io/fabric8/maven/docker/SourceMojo.java +++ b/src/main/java/io/fabric8/maven/docker/SourceMojo.java @@ -78,7 +78,7 @@ protected void executeInternal(ServiceHub hub) throws DockerAccessException, Moj } } } - if (sourceMode == BuildImageSelectMode.first && imageConfigs.size() > 0) { + if (sourceMode == BuildImageSelectMode.first && !imageConfigs.isEmpty()) { ImageConfiguration imageConfig = imageConfigs.get(0); File dockerTar = hub.getArchiveService().createDockerBuildArchive(imageConfig, params); projectHelper.attachArtifact(project, getArchiveType(imageConfig),