diff --git a/jkube-kit/jkube-kit-wildfly-jar/src/main/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGenerator.java b/jkube-kit/jkube-kit-wildfly-jar/src/main/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGenerator.java index 85ff74dbc2..79fbf13153 100644 --- a/jkube-kit/jkube-kit-wildfly-jar/src/main/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGenerator.java +++ b/jkube-kit/jkube-kit-wildfly-jar/src/main/java/org/eclipse/jkube/wildfly/jar/generator/WildflyJARGenerator.java @@ -16,6 +16,7 @@ import org.eclipse.jkube.generator.api.GeneratorContext; import org.eclipse.jkube.generator.javaexec.JavaExecGenerator; import org.eclipse.jkube.kit.common.AssemblyFileSet; +import org.eclipse.jkube.kit.common.JKubeException; import org.eclipse.jkube.kit.common.JavaProject; import org.eclipse.jkube.kit.common.Plugin; import org.eclipse.jkube.kit.common.util.JKubeProjectUtil; @@ -89,9 +90,10 @@ protected List addAdditionalFiles() { parentDir = repoDir.getParent(); } if (Files.notExists(repoDir)) { - throw new RuntimeException("Error, WildFly bootable JAR generator can't retrieve " + throw new JKubeException("Error, WildFly bootable JAR generator can't retrieve " + "generated maven local cache, directory " + repoDir + " doesn't exist."); } + set.add(AssemblyFileSet.builder() .directory(parentDir.toFile()) .include(localRepoCache.getFileName().toString())