Blob Blame History Raw
--- hk2-hk2-parent-2.4.0-b24/hk2-configuration/persistence/hk2-xml-dom/config-generator/src/main/java/org/jvnet/hk2/config/generator/maven/AbstractConfigGeneratorMojo.java	2015-05-18 20:04:14.000000000 +0200
+++ hk2-hk2-parent-2.4.0-b24/hk2-configuration/persistence/hk2-xml-dom/config-generator/src/main/java/org/jvnet/hk2/config/generator/maven/AbstractConfigGeneratorMojo.java.config-generator	2015-05-26 21:56:49.828270082 +0200
@@ -108,9 +108,18 @@
             return;
         }
         
-        if(!getGeneratedDirectory().mkdirs()){
-          throw new MojoExecutionException(
-            "Unable to create directory "+getGeneratedDirectory().getAbsolutePath());
+        getLog().info(getGeneratedDirectory().getAbsolutePath());
+        if (!getGeneratedDirectory().exists()) {
+            if (!getGeneratedDirectory().mkdirs()) {
+                getLog().info("Could not create output directory " +
+                        getOutputDirectory().getAbsolutePath());
+                return;
+            }
+        }
+        if (!getGeneratedDirectory().exists()) {
+            getLog().info("Exiting hk2-config-generator because could not find generated directory " +
+                  getGeneratedDirectory().getAbsolutePath());
+            return;
         }
         String outputPath = getGeneratedDirectory().getAbsolutePath();