FELIX-476: Improve default Export-Package setting

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@616711 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index da3f628..6182fe7 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -340,8 +340,10 @@
 
         if ( !properties.containsKey( Analyzer.PRIVATE_PACKAGE ) )
         {
-            String bsn = currentProject.getGroupId() + "." + currentProject.getArtifactId();
-            properties.put( Analyzer.EXPORT_PACKAGE, bsn + ".*" );
+            String bsn = properties.getProperty( Analyzer.BUNDLE_SYMBOLICNAME );
+            String namespace = bsn.replaceAll( "\\W", "." );
+
+            properties.put( Analyzer.EXPORT_PACKAGE, namespace + ".*" );
         }
 
         // update BND instructions to embed selected Maven dependencies