diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java index 35ecba1c94..59b3abbc49 100644 --- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java +++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java @@ -201,7 +201,11 @@ private File makeJar(BuildOutputJar jar) throws MojoExecutionException { File jarFile = new File(project.getBasedir(), jarName); JarArchiver archiver = new JarArchiver(); archiver.setDestFile(jarFile); - archiver.addDirectory(jar.getOutputDirectory()); + File outputDirectory = jar.getOutputDirectory(); + if (!outputDirectory.mkdirs() && !outputDirectory.exists()) { + throw new IOException("creating output directory " + outputDirectory.getAbsolutePath() + " failed"); + } + archiver.addDirectory(outputDirectory); if (customManifest != null) { for (File sourceFolder : jar.getSourceFolders()) { File manifestFile = new File(sourceFolder, customManifest);