Fix a NPE in manifest goal (FELIX-326)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@555987 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
index bdba885..aafdba0 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
@@ -19,6 +19,7 @@
 package org.apache.felix.bundleplugin;
 
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.HashMap;
@@ -109,12 +110,17 @@
 
         analyzer.setProperties( props );
 
-        if ( project.getArtifact().getFile() == null )
+        File file = project.getArtifact().getFile();
+        if ( file == null )
         {
             analyzer.setJar( getOutputDirectory() );
         }
         else
         {
+            if ( !file.exists() )
+            {
+                file.mkdirs();
+            }
             analyzer.setJar( project.getArtifact().getFile() );
         }