FELIX-3206: revert to old behaviour of generating manifest from the actual bundle content, but allow people to generate manifests by rebuilding the bundle in-memory by setting <rebuildBundle>true</rebuildBundle> in the configuration

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1207309 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 2b147f3..c7a6544 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
@@ -50,6 +50,14 @@
  */
 public class ManifestPlugin extends BundlePlugin
 {
+    /**
+     * When true, generate the manifest by rebuilding the full bundle in memory 
+     *
+     * @parameter expression="${rebuildBundle}"
+     */
+    protected boolean rebuildBundle;
+
+
     @Override
     protected void execute( MavenProject project, Map instructions, Properties properties, Jar[] classpath )
         throws MojoExecutionException
@@ -150,7 +158,7 @@
     protected Analyzer getAnalyzer( MavenProject project, Map instructions, Properties properties, Jar[] classpath )
         throws IOException, MojoExecutionException, Exception
     {
-        if ( supportedProjectTypes.contains( project.getArtifact().getType() ) )
+        if ( rebuildBundle && supportedProjectTypes.contains( project.getArtifact().getType() ) )
         {
             return buildOSGiBundle( project, instructions, properties, classpath );
         }