Fixes FELIX-2811 : If <Private-Package>!*</Private-Package> is defined the all packages should be exported by {local-packages}
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1064937 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 76ef7ea..d0da8bc 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -1012,6 +1012,8 @@
StringBuffer exportedPkgs = new StringBuffer();
StringBuffer privatePkgs = new StringBuffer();
+
+ boolean noprivatePackages = "!*".equals(analyzer.getProperty( Analyzer.PRIVATE_PACKAGE ) );
for ( Iterator i = packages.iterator(); i.hasNext(); )
{
@@ -1021,7 +1023,7 @@
privatePkgs.append( pkg ).append( ";-split-package:=merge-first," );
// we can't export the default package (".") and we shouldn't export internal packages
- if ( !( ".".equals( pkg ) || pkg.contains( ".internal" ) || pkg.contains( ".impl" ) ) )
+ if ( noprivatePackages || !( ".".equals( pkg ) || pkg.contains( ".internal" ) || pkg.contains( ".impl" ) ) )
{
if( exportedPkgs.length() > 0 )
{