Update to latest refactored bndlib

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1362033 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/Container.java b/bundleplugin/src/main/java/aQute/bnd/build/Container.java
index 394a14a..8a721c9 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/Container.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/Container.java
@@ -4,8 +4,8 @@
 import java.util.*;
 import java.util.jar.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.RepositoryPlugin.Strategy;
-import aQute.lib.osgi.*;
 
 public class Container {
 	public enum TYPE {
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/Project.java b/bundleplugin/src/main/java/aQute/bnd/build/Project.java
index 54c2436..a106aae 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/Project.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/Project.java
@@ -8,19 +8,18 @@
 import java.util.concurrent.locks.*;
 import java.util.jar.*;
 
+import aQute.bnd.header.*;
 import aQute.bnd.help.*;
 import aQute.bnd.maven.support.*;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.eclipse.*;
 import aQute.bnd.service.*;
 import aQute.bnd.service.RepositoryPlugin.Strategy;
 import aQute.bnd.service.action.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.eclipse.*;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
 import aQute.libg.reporter.*;
 import aQute.libg.sed.*;
-import aQute.libg.version.*;
 
 /**
  * This class is NOT threadsafe
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/ProjectBuilder.java b/bundleplugin/src/main/java/aQute/bnd/build/ProjectBuilder.java
index 4abb350..5cf4f0e 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/ProjectBuilder.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/ProjectBuilder.java
@@ -3,7 +3,7 @@
 import java.io.*;
 import java.util.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 public class ProjectBuilder extends Builder {
 	Project	project;
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/ProjectLauncher.java b/bundleplugin/src/main/java/aQute/bnd/build/ProjectLauncher.java
index 78d12e3..7c85fb3 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/ProjectLauncher.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/ProjectLauncher.java
@@ -6,11 +6,11 @@
 import java.util.concurrent.*;
 import java.util.jar.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.RepositoryPlugin.Strategy;
-import aQute.lib.osgi.*;
 import aQute.libg.command.*;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
 
 /**
  * A Project Launcher is a base class to be extended by launchers. Launchers are
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java b/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java
index ac8d7fb..e5f0444 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java
@@ -3,11 +3,10 @@
 import java.io.*;
 import java.util.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.bnd.service.RepositoryPlugin.Strategy;
-import aQute.lib.osgi.*;
 import aQute.libg.reporter.*;
-import aQute.libg.version.*;
 
 public interface ProjectMessages extends Messages {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/Workspace.java b/bundleplugin/src/main/java/aQute/bnd/build/Workspace.java
index 04d14fc..9111773 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/Workspace.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/Workspace.java
@@ -10,11 +10,11 @@
 import javax.naming.*;
 
 import aQute.bnd.maven.support.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.bnd.service.action.*;
 import aQute.lib.deployer.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
 import aQute.service.reporter.*;
 
 public class Workspace extends Processor {
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java b/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
index 64c0078..99a6325 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
@@ -4,9 +4,8 @@
 import java.util.*;
 import java.util.regex.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.libg.version.*;
 
 public class WorkspaceRepository implements RepositoryPlugin {
 	private final Workspace	workspace;
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java b/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java
index d11fbc6..c3b550d 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java
@@ -5,15 +5,14 @@
 import java.util.*;
 import java.util.Map.Entry;
 
-import org.osgi.resource.Requirement;
+import org.osgi.resource.*;
 
 import aQute.bnd.build.model.clauses.*;
 import aQute.bnd.build.model.conversions.*;
-import aQute.lib.osgi.Constants;
-import aQute.lib.properties.*;
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
+import aQute.bnd.properties.*;
 import aQute.libg.tuple.*;
-import aQute.libg.version.Version;
 
 /**
  * A model for a Bnd file. In the first iteration, use a simple Properties
@@ -31,17 +30,17 @@
 
 	protected static String[]										KNOWN_PROPERTIES			= new String[] {
 			Constants.BUNDLE_SYMBOLICNAME, Constants.BUNDLE_VERSION, Constants.BUNDLE_ACTIVATOR,
-			Constants.EXPORT_PACKAGE, Constants.IMPORT_PACKAGE, aQute.lib.osgi.Constants.PRIVATE_PACKAGE,
-			aQute.lib.osgi.Constants.SOURCES,
-			aQute.lib.osgi.Constants.SERVICE_COMPONENT, aQute.lib.osgi.Constants.CLASSPATH,
-			aQute.lib.osgi.Constants.BUILDPATH, aQute.lib.osgi.Constants.BUILDPACKAGES,
-			aQute.lib.osgi.Constants.RUNBUNDLES, aQute.lib.osgi.Constants.RUNPROPERTIES, aQute.lib.osgi.Constants.SUB,
-			aQute.lib.osgi.Constants.RUNFRAMEWORK,
-			aQute.lib.osgi.Constants.RUNVM,
+			Constants.EXPORT_PACKAGE, Constants.IMPORT_PACKAGE, aQute.bnd.osgi.Constants.PRIVATE_PACKAGE,
+			aQute.bnd.osgi.Constants.SOURCES,
+			aQute.bnd.osgi.Constants.SERVICE_COMPONENT, aQute.bnd.osgi.Constants.CLASSPATH,
+			aQute.bnd.osgi.Constants.BUILDPATH, aQute.bnd.osgi.Constants.BUILDPACKAGES,
+			aQute.bnd.osgi.Constants.RUNBUNDLES, aQute.bnd.osgi.Constants.RUNPROPERTIES, aQute.bnd.osgi.Constants.SUB,
+			aQute.bnd.osgi.Constants.RUNFRAMEWORK,
+			aQute.bnd.osgi.Constants.RUNVM,
 			// BndConstants.RUNVMARGS,
 			// BndConstants.TESTSUITES,
-			aQute.lib.osgi.Constants.TESTCASES, aQute.lib.osgi.Constants.PLUGIN, aQute.lib.osgi.Constants.PLUGINPATH,
-			aQute.lib.osgi.Constants.RUNREPOS, aQute.lib.osgi.Constants.RUNREQUIRES, aQute.lib.osgi.Constants.RUNEE};
+			aQute.bnd.osgi.Constants.TESTCASES, aQute.bnd.osgi.Constants.PLUGIN, aQute.bnd.osgi.Constants.PLUGINPATH,
+			aQute.bnd.osgi.Constants.RUNREPOS, aQute.bnd.osgi.Constants.RUNREQUIRES, aQute.bnd.osgi.Constants.RUNEE};
 
 	public static final String										BUNDLE_VERSION_MACRO		= "${"
 																										+ Constants.BUNDLE_VERSION
@@ -166,7 +165,7 @@
 	protected Converter<String,EE>									eeFormatter					= new EEFormatter();
 	Converter<String,Collection< ? extends String>>					runReposFormatter			= new CollectionFormatter<String>(
 																										LIST_SEPARATOR,
-																										aQute.lib.osgi.Constants.EMPTY_HEADER);
+																										aQute.bnd.osgi.Constants.EMPTY_HEADER);
 
 	// Converter<String, ResolveMode> resolveModeFormatter =
 	// EnumFormatter.create(ResolveMode.class, ResolveMode.manual);
@@ -174,56 +173,56 @@
 	@SuppressWarnings("deprecation")
 	public BndEditModel() {
 		// register converters
-		converters.put(aQute.lib.osgi.Constants.BUILDPATH, buildPathConverter);
-		converters.put(aQute.lib.osgi.Constants.BUILDPACKAGES, buildPackagesConverter);
-		converters.put(aQute.lib.osgi.Constants.RUNBUNDLES, clauseListConverter);
+		converters.put(aQute.bnd.osgi.Constants.BUILDPATH, buildPathConverter);
+		converters.put(aQute.bnd.osgi.Constants.BUILDPACKAGES, buildPackagesConverter);
+		converters.put(aQute.bnd.osgi.Constants.RUNBUNDLES, clauseListConverter);
 		converters.put(Constants.BUNDLE_SYMBOLICNAME, stringConverter);
 		converters.put(Constants.BUNDLE_VERSION, stringConverter);
 		converters.put(Constants.BUNDLE_ACTIVATOR, stringConverter);
-		converters.put(aQute.lib.osgi.Constants.OUTPUT, stringConverter);
-		converters.put(aQute.lib.osgi.Constants.SOURCES, includedSourcesConverter);
-		converters.put(aQute.lib.osgi.Constants.PRIVATE_PACKAGE, listConverter);
-		converters.put(aQute.lib.osgi.Constants.CLASSPATH, listConverter);
+		converters.put(aQute.bnd.osgi.Constants.OUTPUT, stringConverter);
+		converters.put(aQute.bnd.osgi.Constants.SOURCES, includedSourcesConverter);
+		converters.put(aQute.bnd.osgi.Constants.PRIVATE_PACKAGE, listConverter);
+		converters.put(aQute.bnd.osgi.Constants.CLASSPATH, listConverter);
 		converters.put(Constants.EXPORT_PACKAGE, exportPackageConverter);
-		converters.put(aQute.lib.osgi.Constants.SERVICE_COMPONENT, serviceComponentConverter);
+		converters.put(aQute.bnd.osgi.Constants.SERVICE_COMPONENT, serviceComponentConverter);
 		converters.put(Constants.IMPORT_PACKAGE, importPatternConverter);
-		converters.put(aQute.lib.osgi.Constants.RUNFRAMEWORK, stringConverter);
-		converters.put(aQute.lib.osgi.Constants.SUB, listConverter);
-		converters.put(aQute.lib.osgi.Constants.RUNPROPERTIES, propertiesConverter);
-		converters.put(aQute.lib.osgi.Constants.RUNVM, stringConverter);
+		converters.put(aQute.bnd.osgi.Constants.RUNFRAMEWORK, stringConverter);
+		converters.put(aQute.bnd.osgi.Constants.SUB, listConverter);
+		converters.put(aQute.bnd.osgi.Constants.RUNPROPERTIES, propertiesConverter);
+		converters.put(aQute.bnd.osgi.Constants.RUNVM, stringConverter);
 		// converters.put(BndConstants.RUNVMARGS, stringConverter);
-		converters.put(aQute.lib.osgi.Constants.TESTSUITES, listConverter);
-		converters.put(aQute.lib.osgi.Constants.TESTCASES, listConverter);
-		converters.put(aQute.lib.osgi.Constants.PLUGIN, headerClauseListConverter);
-		converters.put(aQute.lib.osgi.Constants.RUNREQUIRES, requirementListConverter);
-		converters.put(aQute.lib.osgi.Constants.RUNEE, eeConverter);
-		converters.put(aQute.lib.osgi.Constants.RUNREPOS, listConverter);
+		converters.put(aQute.bnd.osgi.Constants.TESTSUITES, listConverter);
+		converters.put(aQute.bnd.osgi.Constants.TESTCASES, listConverter);
+		converters.put(aQute.bnd.osgi.Constants.PLUGIN, headerClauseListConverter);
+		converters.put(aQute.bnd.osgi.Constants.RUNREQUIRES, requirementListConverter);
+		converters.put(aQute.bnd.osgi.Constants.RUNEE, eeConverter);
+		converters.put(aQute.bnd.osgi.Constants.RUNREPOS, listConverter);
 		// converters.put(BndConstants.RESOLVE_MODE, resolveModeConverter);
 
-		formatters.put(aQute.lib.osgi.Constants.BUILDPATH, headerClauseListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.BUILDPACKAGES, headerClauseListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.RUNBUNDLES, headerClauseListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.BUILDPATH, headerClauseListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.BUILDPACKAGES, headerClauseListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.RUNBUNDLES, headerClauseListFormatter);
 		formatters.put(Constants.BUNDLE_SYMBOLICNAME, newlineEscapeFormatter);
 		formatters.put(Constants.BUNDLE_VERSION, newlineEscapeFormatter);
 		formatters.put(Constants.BUNDLE_ACTIVATOR, newlineEscapeFormatter);
-		formatters.put(aQute.lib.osgi.Constants.OUTPUT, newlineEscapeFormatter);
-		formatters.put(aQute.lib.osgi.Constants.SOURCES, defaultFalseBoolFormatter);
-		formatters.put(aQute.lib.osgi.Constants.PRIVATE_PACKAGE, stringListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.CLASSPATH, stringListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.OUTPUT, newlineEscapeFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.SOURCES, defaultFalseBoolFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.PRIVATE_PACKAGE, stringListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.CLASSPATH, stringListFormatter);
 		formatters.put(Constants.EXPORT_PACKAGE, headerClauseListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.SERVICE_COMPONENT, headerClauseListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.SERVICE_COMPONENT, headerClauseListFormatter);
 		formatters.put(Constants.IMPORT_PACKAGE, headerClauseListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.RUNFRAMEWORK, newlineEscapeFormatter);
-		formatters.put(aQute.lib.osgi.Constants.SUB, stringListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.RUNPROPERTIES, propertiesFormatter);
-		formatters.put(aQute.lib.osgi.Constants.RUNVM, newlineEscapeFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.RUNFRAMEWORK, newlineEscapeFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.SUB, stringListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.RUNPROPERTIES, propertiesFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.RUNVM, newlineEscapeFormatter);
 		// formatters.put(BndConstants.RUNVMARGS, newlineEscapeFormatter);
 		// formatters.put(BndConstants.TESTSUITES, stringListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.TESTCASES, stringListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.PLUGIN, headerClauseListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.RUNREQUIRES, requirementListFormatter);
-		formatters.put(aQute.lib.osgi.Constants.RUNEE, eeFormatter);
-		formatters.put(aQute.lib.osgi.Constants.RUNREPOS, runReposFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.TESTCASES, stringListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.PLUGIN, headerClauseListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.RUNREQUIRES, requirementListFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.RUNEE, eeFormatter);
+		formatters.put(aQute.bnd.osgi.Constants.RUNREPOS, runReposFormatter);
 		// formatters.put(BndConstants.RESOLVE_MODE, resolveModeFormatter);
 	}
 
@@ -373,42 +372,42 @@
 	}
 
 	public String getOutputFile() {
-		return doGetObject(aQute.lib.osgi.Constants.OUTPUT, stringConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.OUTPUT, stringConverter);
 	}
 
 	public void setOutputFile(String name) {
-		doSetObject(aQute.lib.osgi.Constants.OUTPUT, getOutputFile(), name, newlineEscapeFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.OUTPUT, getOutputFile(), name, newlineEscapeFormatter);
 	}
 
 	public boolean isIncludeSources() {
-		return doGetObject(aQute.lib.osgi.Constants.SOURCES, includedSourcesConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.SOURCES, includedSourcesConverter);
 	}
 
 	public void setIncludeSources(boolean includeSources) {
 		boolean oldValue = isIncludeSources();
-		doSetObject(aQute.lib.osgi.Constants.SOURCES, oldValue, includeSources, defaultFalseBoolFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.SOURCES, oldValue, includeSources, defaultFalseBoolFormatter);
 	}
 
 	public List<String> getPrivatePackages() {
-		return doGetObject(aQute.lib.osgi.Constants.PRIVATE_PACKAGE, listConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.PRIVATE_PACKAGE, listConverter);
 	}
 
 	public void setPrivatePackages(List< ? extends String> packages) {
 		List<String> oldPackages = getPrivatePackages();
-		doSetObject(aQute.lib.osgi.Constants.PRIVATE_PACKAGE, oldPackages, packages, stringListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.PRIVATE_PACKAGE, oldPackages, packages, stringListFormatter);
 	}
 
 	public List<ExportedPackage> getSystemPackages() {
-		return doGetObject(aQute.lib.osgi.Constants.RUNSYSTEMPACKAGES, exportPackageConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.RUNSYSTEMPACKAGES, exportPackageConverter);
 	}
 
 	public void setSystemPackages(List< ? extends ExportedPackage> packages) {
 		List<ExportedPackage> oldPackages = getSystemPackages();
-		doSetObject(aQute.lib.osgi.Constants.RUNSYSTEMPACKAGES, oldPackages, packages, headerClauseListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.RUNSYSTEMPACKAGES, oldPackages, packages, headerClauseListFormatter);
 	}
 
 	public List<String> getClassPath() {
-		return doGetObject(aQute.lib.osgi.Constants.CLASSPATH, listConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.CLASSPATH, listConverter);
 	}
 
 	public void addPrivatePackage(String packageName) {
@@ -423,7 +422,7 @@
 
 	public void setClassPath(List< ? extends String> classPath) {
 		List<String> oldClassPath = getClassPath();
-		doSetObject(aQute.lib.osgi.Constants.CLASSPATH, oldClassPath, classPath, stringListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.CLASSPATH, oldClassPath, classPath, stringListFormatter);
 	}
 
 	public List<ExportedPackage> getExportedPackages() {
@@ -457,21 +456,21 @@
 	}
 
 	public List<String> getDSAnnotationPatterns() {
-		return doGetObject(aQute.lib.osgi.Constants.DSANNOTATIONS, listConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.DSANNOTATIONS, listConverter);
 	}
 
 	public void setDSAnnotationPatterns(List< ? extends String> patterns) {
 		List<String> oldValue = getDSAnnotationPatterns();
-		doSetObject(aQute.lib.osgi.Constants.DSANNOTATIONS, oldValue, patterns, stringListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.DSANNOTATIONS, oldValue, patterns, stringListFormatter);
 	}
 
 	public List<ServiceComponent> getServiceComponents() {
-		return doGetObject(aQute.lib.osgi.Constants.SERVICE_COMPONENT, serviceComponentConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.SERVICE_COMPONENT, serviceComponentConverter);
 	}
 
 	public void setServiceComponents(List< ? extends ServiceComponent> components) {
 		List<ServiceComponent> oldValue = getServiceComponents();
-		doSetObject(aQute.lib.osgi.Constants.SERVICE_COMPONENT, oldValue, components, headerClauseListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.SERVICE_COMPONENT, oldValue, components, headerClauseListFormatter);
 	}
 
 	public List<ImportPattern> getImportPatterns() {
@@ -484,30 +483,30 @@
 	}
 
 	public List<VersionedClause> getBuildPath() {
-		return doGetObject(aQute.lib.osgi.Constants.BUILDPATH, buildPathConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.BUILDPATH, buildPathConverter);
 	}
 
 	public void setBuildPath(List< ? extends VersionedClause> paths) {
 		List<VersionedClause> oldValue = getBuildPath();
-		doSetObject(aQute.lib.osgi.Constants.BUILDPATH, oldValue, paths, headerClauseListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.BUILDPATH, oldValue, paths, headerClauseListFormatter);
 	}
 
 	public List<VersionedClause> getBuildPackages() {
-		return doGetObject(aQute.lib.osgi.Constants.BUILDPACKAGES, buildPackagesConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.BUILDPACKAGES, buildPackagesConverter);
 	}
 
 	public void setBuildPackages(List< ? extends VersionedClause> paths) {
 		List<VersionedClause> oldValue = getBuildPackages();
-		doSetObject(aQute.lib.osgi.Constants.BUILDPACKAGES, oldValue, paths, headerClauseListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.BUILDPACKAGES, oldValue, paths, headerClauseListFormatter);
 	}
 
 	public List<VersionedClause> getRunBundles() {
-		return doGetObject(aQute.lib.osgi.Constants.RUNBUNDLES, clauseListConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.RUNBUNDLES, clauseListConverter);
 	}
 
 	public void setRunBundles(List< ? extends VersionedClause> paths) {
 		List<VersionedClause> oldValue = getBuildPath();
-		doSetObject(aQute.lib.osgi.Constants.RUNBUNDLES, oldValue, paths, headerClauseListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.RUNBUNDLES, oldValue, paths, headerClauseListFormatter);
 	}
 
 	public boolean isIncludedPackage(String packageName) {
@@ -528,16 +527,16 @@
 	}
 
 	public List<String> getSubBndFiles() {
-		return doGetObject(aQute.lib.osgi.Constants.SUB, listConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.SUB, listConverter);
 	}
 
 	public void setSubBndFiles(List<String> subBndFiles) {
 		List<String> oldValue = getSubBndFiles();
-		doSetObject(aQute.lib.osgi.Constants.SUB, oldValue, subBndFiles, stringListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.SUB, oldValue, subBndFiles, stringListFormatter);
 	}
 
 	public Map<String,String> getRunProperties() {
-		return doGetObject(aQute.lib.osgi.Constants.RUNPROPERTIES, propertiesConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.RUNPROPERTIES, propertiesConverter);
 	}
 
 	/*
@@ -546,7 +545,7 @@
 	 */
 	public void setRunProperties(Map<String,String> props) {
 		Map<String,String> old = getRunProperties();
-		doSetObject(aQute.lib.osgi.Constants.RUNPROPERTIES, old, props, propertiesFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.RUNPROPERTIES, old, props, propertiesFormatter);
 	}
 
 	/*
@@ -554,7 +553,7 @@
 	 * @see bndtools.editor.model.IBndModel#getRunVMArgs()
 	 */
 	public String getRunVMArgs() {
-		return doGetObject(aQute.lib.osgi.Constants.RUNVM, stringConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.RUNVM, stringConverter);
 	}
 
 	/*
@@ -563,15 +562,15 @@
 	 */
 	public void setRunVMArgs(String args) {
 		String old = getRunVMArgs();
-		doSetObject(aQute.lib.osgi.Constants.RUNVM, old, args, newlineEscapeFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.RUNVM, old, args, newlineEscapeFormatter);
 	}
 
 	@SuppressWarnings("deprecation")
 	public List<String> getTestSuites() {
-		List<String> testCases = doGetObject(aQute.lib.osgi.Constants.TESTCASES, listConverter);
+		List<String> testCases = doGetObject(aQute.bnd.osgi.Constants.TESTCASES, listConverter);
 		testCases = testCases != null ? testCases : Collections.<String> emptyList();
 
-		List<String> testSuites = doGetObject(aQute.lib.osgi.Constants.TESTSUITES, listConverter);
+		List<String> testSuites = doGetObject(aQute.bnd.osgi.Constants.TESTSUITES, listConverter);
 		testSuites = testSuites != null ? testSuites : Collections.<String> emptyList();
 
 		List<String> result = new ArrayList<String>(testCases.size() + testSuites.size());
@@ -583,63 +582,63 @@
 	@SuppressWarnings("deprecation")
 	public void setTestSuites(List<String> suites) {
 		List<String> old = getTestSuites();
-		doSetObject(aQute.lib.osgi.Constants.TESTCASES, old, suites, stringListFormatter);
-		doSetObject(aQute.lib.osgi.Constants.TESTSUITES, null, null, stringListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.TESTCASES, old, suites, stringListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.TESTSUITES, null, null, stringListFormatter);
 	}
 
 	public List<HeaderClause> getPlugins() {
-		return doGetObject(aQute.lib.osgi.Constants.PLUGIN, headerClauseListConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.PLUGIN, headerClauseListConverter);
 	}
 
 	public void setPlugins(List<HeaderClause> plugins) {
 		List<HeaderClause> old = getPlugins();
-		doSetObject(aQute.lib.osgi.Constants.PLUGIN, old, plugins, headerClauseListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.PLUGIN, old, plugins, headerClauseListFormatter);
 	}
 
 	public List<String> getPluginPath() {
-		return doGetObject(aQute.lib.osgi.Constants.PLUGINPATH, listConverter);
+		return doGetObject(aQute.bnd.osgi.Constants.PLUGINPATH, listConverter);
 	}
 
 	public void setPluginPath(List<String> pluginPath) {
 		List<String> old = getPluginPath();
-		doSetObject(aQute.lib.osgi.Constants.PLUGINPATH, old, pluginPath, stringListFormatter);
+		doSetObject(aQute.bnd.osgi.Constants.PLUGINPATH, old, pluginPath, stringListFormatter);
 	}
 	
     public List<String> getRunRepos() {
-        return doGetObject(aQute.lib.osgi.Constants.RUNREPOS, listConverter);
+        return doGetObject(aQute.bnd.osgi.Constants.RUNREPOS, listConverter);
     }
 
     public void setRunRepos(List<String> repos) {
         List<String> old = getRunRepos();
-        doSetObject(aQute.lib.osgi.Constants.RUNREPOS, old, repos, runReposFormatter);
+        doSetObject(aQute.bnd.osgi.Constants.RUNREPOS, old, repos, runReposFormatter);
     }
     
     public String getRunFramework() {
-        return doGetObject(aQute.lib.osgi.Constants.RUNFRAMEWORK, stringConverter);
+        return doGetObject(aQute.bnd.osgi.Constants.RUNFRAMEWORK, stringConverter);
     }
 
     public EE getEE() {
-        return doGetObject(aQute.lib.osgi.Constants.RUNEE, eeConverter);
+        return doGetObject(aQute.bnd.osgi.Constants.RUNEE, eeConverter);
     }
 
     public void setEE(EE ee) {
         EE old = getEE();
-        doSetObject(aQute.lib.osgi.Constants.RUNEE, old, ee, eeFormatter);
+        doSetObject(aQute.bnd.osgi.Constants.RUNEE, old, ee, eeFormatter);
     }
 
     
     public void setRunFramework(String clause) {
         String oldValue = getRunFramework();
-        doSetObject(aQute.lib.osgi.Constants.RUNFRAMEWORK, oldValue, clause, newlineEscapeFormatter);
+        doSetObject(aQute.bnd.osgi.Constants.RUNFRAMEWORK, oldValue, clause, newlineEscapeFormatter);
     }
     
     public List<Requirement> getRunRequires() {
-    	return doGetObject(aQute.lib.osgi.Constants.RUNREQUIRES, requirementListConverter);
+    	return doGetObject(aQute.bnd.osgi.Constants.RUNREQUIRES, requirementListConverter);
     }
     
     public void setRunRequires(List<Requirement> requires) {
     	List<Requirement> oldValue = getRunRequires();
-    	doSetObject(aQute.lib.osgi.Constants.RUNREQUIRES, oldValue, requires, requirementListFormatter);
+    	doSetObject(aQute.bnd.osgi.Constants.RUNREQUIRES, oldValue, requires, requirementListFormatter);
     }
 
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ExportedPackage.java b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ExportedPackage.java
index c55ebe2..47b37bd 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ExportedPackage.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ExportedPackage.java
@@ -1,8 +1,8 @@
 package aQute.bnd.build.model.clauses;
 
-import org.osgi.framework.Constants;
+import org.osgi.framework.*;
 
-import aQute.libg.header.Attrs;
+import aQute.bnd.header.*;
 
 public class ExportedPackage extends HeaderClause {
 
@@ -24,14 +24,14 @@
 	}
 
 	public boolean isProvided() {
-		return Boolean.valueOf(attribs.get(aQute.lib.osgi.Constants.PROVIDE_DIRECTIVE));
+		return Boolean.valueOf(attribs.get(aQute.bnd.osgi.Constants.PROVIDE_DIRECTIVE));
 	}
 
 	public void setProvided(boolean provided) {
 		if (provided)
-			attribs.put(aQute.lib.osgi.Constants.PROVIDE_DIRECTIVE, Boolean.toString(true));
+			attribs.put(aQute.bnd.osgi.Constants.PROVIDE_DIRECTIVE, Boolean.toString(true));
 		else
-			attribs.remove(aQute.lib.osgi.Constants.PROVIDE_DIRECTIVE);
+			attribs.remove(aQute.bnd.osgi.Constants.PROVIDE_DIRECTIVE);
 	}
 
 	@Override
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/HeaderClause.java b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/HeaderClause.java
index f17a069..4af4dde 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/HeaderClause.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/HeaderClause.java
@@ -1,17 +1,9 @@
 package aQute.bnd.build.model.clauses;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.Map.Entry;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
 
-import aQute.libg.header.Attrs;
+import aQute.bnd.header.*;
 
 public class HeaderClause implements Cloneable, Comparable<HeaderClause> {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ImportPattern.java b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ImportPattern.java
index caaea09..bdca772 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ImportPattern.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ImportPattern.java
@@ -1,8 +1,8 @@
 package aQute.bnd.build.model.clauses;
 
-import org.osgi.framework.Constants;
+import org.osgi.framework.*;
 
-import aQute.libg.header.Attrs;
+import aQute.bnd.header.*;
 
 public class ImportPattern extends VersionedClause implements Cloneable {
 
@@ -11,15 +11,15 @@
 	}
 
 	public boolean isOptional() {
-		String resolution = attribs.get(aQute.lib.osgi.Constants.RESOLUTION_DIRECTIVE);
+		String resolution = attribs.get(aQute.bnd.osgi.Constants.RESOLUTION_DIRECTIVE);
 		return Constants.RESOLUTION_OPTIONAL.equals(resolution);
 	}
 
 	public void setOptional(boolean optional) {
 		if (optional)
-			attribs.put(aQute.lib.osgi.Constants.RESOLUTION_DIRECTIVE, Constants.RESOLUTION_OPTIONAL);
+			attribs.put(aQute.bnd.osgi.Constants.RESOLUTION_DIRECTIVE, Constants.RESOLUTION_OPTIONAL);
 		else
-			attribs.remove(aQute.lib.osgi.Constants.RESOLUTION_DIRECTIVE);
+			attribs.remove(aQute.bnd.osgi.Constants.RESOLUTION_DIRECTIVE);
 	}
 
 	@Override
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ServiceComponent.java b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ServiceComponent.java
index dcbd8f5..d8e4c6b 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ServiceComponent.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/ServiceComponent.java
@@ -1,17 +1,10 @@
 package aQute.bnd.build.model.clauses;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.Map.Entry;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import java.util.regex.*;
 
-import aQute.libg.header.Attrs;
+import aQute.bnd.header.*;
 
 public class ServiceComponent extends HeaderClause implements Cloneable {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/VersionedClause.java b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/VersionedClause.java
index a6e79a9..358ec08 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/VersionedClause.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/clauses/VersionedClause.java
@@ -1,8 +1,8 @@
 package aQute.bnd.build.model.clauses;
 
-import org.osgi.framework.Constants;
+import org.osgi.framework.*;
 
-import aQute.libg.header.Attrs;
+import aQute.bnd.header.*;
 
 public class VersionedClause extends HeaderClause implements Cloneable {
 	public VersionedClause(String name, Attrs attribs) {
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/ClauseListConverter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/ClauseListConverter.java
index 130b60b..893a22f 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/ClauseListConverter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/ClauseListConverter.java
@@ -3,8 +3,8 @@
 import java.util.*;
 import java.util.Map.Entry;
 
-import aQute.lib.osgi.*;
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.libg.tuple.*;
 
 public class ClauseListConverter<R> implements Converter<List<R>,String> {
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEConverter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEConverter.java
index de6d2ea..a2defbf 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEConverter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEConverter.java
@@ -1,6 +1,6 @@
 package aQute.bnd.build.model.conversions;
 
-import aQute.bnd.build.model.EE;
+import aQute.bnd.build.model.*;
 
 public class EEConverter implements Converter<EE,String> {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEFormatter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEFormatter.java
index 1853685..44a7de6 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEFormatter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/EEFormatter.java
@@ -1,6 +1,6 @@
 package aQute.bnd.build.model.conversions;
 
-import aQute.bnd.build.model.EE;
+import aQute.bnd.build.model.*;
 
 public final class EEFormatter implements Converter<String,EE> {
 	public String convert(EE input) throws IllegalArgumentException {
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/HeaderClauseConverter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/HeaderClauseConverter.java
index dfb3a5d..dffd900 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/HeaderClauseConverter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/HeaderClauseConverter.java
@@ -1,7 +1,7 @@
 package aQute.bnd.build.model.conversions;
 
 import aQute.bnd.build.model.clauses.*;
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
 import aQute.libg.tuple.*;
 
 public class HeaderClauseConverter implements Converter<HeaderClause,Pair<String,Attrs>> {
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/PropertiesConverter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/PropertiesConverter.java
index a1ecf5f..cd45c60 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/PropertiesConverter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/PropertiesConverter.java
@@ -2,7 +2,7 @@
 
 import java.util.*;
 
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
 
 public class PropertiesConverter implements Converter<Map<String,String>,String> {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementFormatter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementFormatter.java
index b64f1bd..2a293ef 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementFormatter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementFormatter.java
@@ -2,7 +2,7 @@
 
 import java.util.Map.Entry;
 
-import org.osgi.resource.Requirement;
+import org.osgi.resource.*;
 
 public class RequirementFormatter implements Converter<String,Requirement> {
 
@@ -12,11 +12,11 @@
 		builder.append(req.getNamespace());
 		
 		for (Entry<String,String> directive : req.getDirectives().entrySet()) {
-			builder.append(';').append(directive.getKey()).append(":=").append(directive.getValue());
+			builder.append(';').append(directive.getKey()).append(":='").append(directive.getValue()).append('\'');
 		}
 		
 		for (Entry<String,Object> attribute : req.getAttributes().entrySet()) {
-			builder.append(';').append(attribute.getKey()).append("=").append(attribute.getValue());
+			builder.append(';').append(attribute.getKey()).append("='").append(attribute.getValue()).append('\'');
 		}
 		
 		return builder.toString();
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementListConverter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementListConverter.java
index 6249c0f..dacd6ed 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementListConverter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/RequirementListConverter.java
@@ -2,11 +2,11 @@
 
 import java.util.Map.Entry;
 
-import org.osgi.resource.Requirement;
+import org.osgi.resource.*;
 
-import aQute.lib.osgi.resource.CapReqBuilder;
-import aQute.libg.header.Attrs;
-import aQute.libg.tuple.Pair;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.resource.*;
+import aQute.libg.tuple.*;
 
 public class RequirementListConverter extends ClauseListConverter<Requirement> {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/SimpleListConverter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/SimpleListConverter.java
index 2291be3..a3a262b 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/SimpleListConverter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/SimpleListConverter.java
@@ -2,7 +2,7 @@
 
 import java.util.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 import aQute.libg.qtokens.*;
 
 public class SimpleListConverter<R> implements Converter<List<R>,String> {
diff --git a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/VersionedClauseConverter.java b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/VersionedClauseConverter.java
index 5aead1c..31a1663 100644
--- a/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/VersionedClauseConverter.java
+++ b/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/VersionedClauseConverter.java
@@ -1,7 +1,7 @@
 package aQute.bnd.build.model.conversions;
 
 import aQute.bnd.build.model.clauses.*;
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
 import aQute.libg.tuple.*;
 
 public class VersionedClauseConverter implements Converter<VersionedClause,Pair<String,Attrs>> {
diff --git a/bundleplugin/src/main/java/aQute/bnd/compatibility/ParseSignatureBuilder.java b/bundleplugin/src/main/java/aQute/bnd/compatibility/ParseSignatureBuilder.java
index 133abb1..6cb52ce 100644
--- a/bundleplugin/src/main/java/aQute/bnd/compatibility/ParseSignatureBuilder.java
+++ b/bundleplugin/src/main/java/aQute/bnd/compatibility/ParseSignatureBuilder.java
@@ -2,8 +2,8 @@
 
 import java.io.*;
 
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 
 public class ParseSignatureBuilder {
 	final Scope	root;
diff --git a/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java b/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
index d0b915c..989fdc9 100644
--- a/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
+++ b/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
@@ -6,11 +6,10 @@
 
 import org.osgi.service.component.annotations.*;
 
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.MethodDef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.lib.collections.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.MethodDef;
-import aQute.lib.osgi.Descriptors.TypeRef;
-import aQute.libg.version.*;
 
 /**
  * fixup any unbind methods To declare no unbind method, the value "-" must be
@@ -27,7 +26,7 @@
 public class AnnotationReader extends ClassDataCollector {
 	final static TypeRef[]		EMPTY					= new TypeRef[0];
 	final static Pattern		PROPERTY_PATTERN		= Pattern
-																.compile("([^=]+(:(Boolean|Byte|Char|Short|Integer|Long|Float|Double|String))?)\\s*=(.*)");
+																.compile("\\s*([^=]+(\\s*:\\s*(Boolean|Byte|Char|Short|Integer|Long|Float|Double|String))?)\\s*=(.*)");
 
 	public static final Version	V1_1					= new Version("1.1.0");																												// "1.1.0"
 	public static final Version	V1_2					= new Version("1.2.0");																												// "1.1.0"
diff --git a/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java b/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java
index edcd909..98f7d36 100644
--- a/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java
+++ b/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java
@@ -5,11 +5,10 @@
 
 import org.osgi.service.component.annotations.*;
 
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.lib.collections.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Descriptors.TypeRef;
 import aQute.lib.tag.*;
-import aQute.libg.version.*;
 
 /**
  * This class just holds the information for the component, implementation, and
diff --git a/bundleplugin/src/main/java/aQute/bnd/component/DSAnnotations.java b/bundleplugin/src/main/java/aQute/bnd/component/DSAnnotations.java
index 0fd4011..5d16b9a 100644
--- a/bundleplugin/src/main/java/aQute/bnd/component/DSAnnotations.java
+++ b/bundleplugin/src/main/java/aQute/bnd/component/DSAnnotations.java
@@ -2,9 +2,9 @@
 
 import java.util.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.libg.header.*;
 
 /**
  * Analyze the class space for any classes that have an OSGi annotation for DS.
diff --git a/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java b/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java
index a626e52..6c64fe0 100644
--- a/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java
+++ b/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java
@@ -2,9 +2,8 @@
 
 import org.osgi.service.component.annotations.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 import aQute.lib.tag.*;
-import aQute.libg.version.*;
 
 /**
  * Holds the information in the reference element.
diff --git a/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java b/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java
index 4319b6b..b5eabb5 100644
--- a/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java
+++ b/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java
@@ -4,12 +4,11 @@
 import java.util.*;
 import java.util.jar.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.diff.*;
 import aQute.bnd.service.diff.Diff.Ignore;
-import aQute.lib.osgi.*;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
-import aQute.libg.version.*;
 import aQute.service.reporter.*;
 
 /**
diff --git a/bundleplugin/src/main/java/aQute/bnd/differ/DiffPluginImpl.java b/bundleplugin/src/main/java/aQute/bnd/differ/DiffPluginImpl.java
index 2fb366b..4da23cc 100644
--- a/bundleplugin/src/main/java/aQute/bnd/differ/DiffPluginImpl.java
+++ b/bundleplugin/src/main/java/aQute/bnd/differ/DiffPluginImpl.java
@@ -6,13 +6,13 @@
 import java.util.*;
 import java.util.jar.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.diff.*;
 import aQute.bnd.service.diff.Tree.Data;
 import aQute.lib.hex.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
 import aQute.libg.cryptography.*;
-import aQute.libg.header.*;
 
 /**
  * This Diff Plugin Implementation will compare JARs for their API (based on the
@@ -120,7 +120,7 @@
 				Digester<SHA1> digester = SHA1.getDigester();
 				IO.copy(in, digester);
 				String value = Hex.toHexString(digester.digest().digest());
-				resources.add(new Element(Type.RESOURCE, entry.getKey() + "=" + value, null, CHANGED, CHANGED, null));
+				resources.add(new Element(Type.RESOURCE, entry.getKey(), Arrays.asList(new Element(Type.SHA,value)), CHANGED, CHANGED, null));
 			}
 			finally {
 				in.close();
diff --git a/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java b/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java
index fd3515a..0be044b 100644
--- a/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java
+++ b/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java
@@ -11,17 +11,17 @@
 import java.util.jar.*;
 
 import aQute.bnd.annotation.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.JAVA;
+import aQute.bnd.osgi.Clazz.MethodDef;
+import aQute.bnd.osgi.Descriptors.PackageRef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.Version;
 import aQute.bnd.service.diff.*;
 import aQute.bnd.service.diff.Type;
 import aQute.lib.collections.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.JAVA;
-import aQute.lib.osgi.Clazz.MethodDef;
-import aQute.lib.osgi.Descriptors.PackageRef;
-import aQute.lib.osgi.Descriptors.TypeRef;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
-import aQute.libg.version.Version;
 
 /**
  * An element that compares the access field in a binary compatible way. This
diff --git a/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java b/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java
index 23a5f20..5577e0e 100644
--- a/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java
+++ b/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java
@@ -2,9 +2,9 @@
 
 import java.util.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.bnd.service.diff.*;
-import aQute.libg.version.*;
 
 public class RepositoryElement {
 
diff --git a/bundleplugin/src/main/java/aQute/libg/filerepo/FileRepo.java b/bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/libg/filerepo/FileRepo.java
rename to bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java
index e278a74..c0113ac 100644
--- a/bundleplugin/src/main/java/aQute/libg/filerepo/FileRepo.java
+++ b/bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java
@@ -1,10 +1,10 @@
-package aQute.libg.filerepo;
+package aQute.bnd.filerepo;
 
 import java.io.*;
 import java.util.*;
 import java.util.regex.*;
 
-import aQute.libg.version.*;
+import aQute.bnd.osgi.*;
 
 public class FileRepo {
 	File	root;
diff --git a/bundleplugin/src/main/java/aQute/libg/filerepo/packageinfo b/bundleplugin/src/main/java/aQute/bnd/filerepo/packageinfo
similarity index 100%
rename from bundleplugin/src/main/java/aQute/libg/filerepo/packageinfo
rename to bundleplugin/src/main/java/aQute/bnd/filerepo/packageinfo
diff --git a/bundleplugin/src/main/java/aQute/libg/header/Attrs.java b/bundleplugin/src/main/java/aQute/bnd/header/Attrs.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/libg/header/Attrs.java
rename to bundleplugin/src/main/java/aQute/bnd/header/Attrs.java
index 40fefcc..8daaee7 100644
--- a/bundleplugin/src/main/java/aQute/libg/header/Attrs.java
+++ b/bundleplugin/src/main/java/aQute/bnd/header/Attrs.java
@@ -1,10 +1,10 @@
-package aQute.libg.header;
+package aQute.bnd.header;
 
 import java.util.*;
 import java.util.regex.*;
 
+import aQute.bnd.osgi.*;
 import aQute.lib.collections.*;
-import aQute.libg.version.*;
 
 public class Attrs implements Map<String,String> {
 	public enum Type {
diff --git a/bundleplugin/src/main/java/aQute/libg/header/OSGiHeader.java b/bundleplugin/src/main/java/aQute/bnd/header/OSGiHeader.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/libg/header/OSGiHeader.java
rename to bundleplugin/src/main/java/aQute/bnd/header/OSGiHeader.java
index a372527..810513a 100755
--- a/bundleplugin/src/main/java/aQute/libg/header/OSGiHeader.java
+++ b/bundleplugin/src/main/java/aQute/bnd/header/OSGiHeader.java
@@ -1,4 +1,4 @@
-package aQute.libg.header;
+package aQute.bnd.header;
 
 import java.util.*;
 
diff --git a/bundleplugin/src/main/java/aQute/libg/header/Parameters.java b/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/libg/header/Parameters.java
rename to bundleplugin/src/main/java/aQute/bnd/header/Parameters.java
index 02e3463..413b6a5 100644
--- a/bundleplugin/src/main/java/aQute/libg/header/Parameters.java
+++ b/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java
@@ -1,4 +1,4 @@
-package aQute.libg.header;
+package aQute.bnd.header;
 
 import java.util.*;
 
diff --git a/bundleplugin/src/main/java/aQute/libg/header/packageinfo b/bundleplugin/src/main/java/aQute/bnd/header/packageinfo
similarity index 100%
rename from bundleplugin/src/main/java/aQute/libg/header/packageinfo
rename to bundleplugin/src/main/java/aQute/bnd/header/packageinfo
diff --git a/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java b/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java
index e1a6c53..2b6ccbf 100644
--- a/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java
+++ b/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java
@@ -3,7 +3,7 @@
 import java.util.*;
 import java.util.regex.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 public class Syntax implements Constants {
 	final String							header;
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/Make.java b/bundleplugin/src/main/java/aQute/bnd/make/Make.java
index a42b5e0..59d252a 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/Make.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/Make.java
@@ -4,9 +4,9 @@
 import java.util.Map.Entry;
 import java.util.regex.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.libg.header.*;
 
 public class Make {
 	Builder								builder;
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java b/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java
index 3ef7076..cda13b4 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java
@@ -5,8 +5,8 @@
 import java.util.regex.*;
 
 import aQute.bnd.build.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
 
 public class MakeBnd implements MakePlugin, Constants {
 	final static Pattern	JARFILE	= Pattern.compile("(.+)\\.(jar|ipa)");
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java b/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java
index 9a6897e..c799dc7 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java
@@ -4,8 +4,8 @@
 import java.net.*;
 import java.util.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
 
 public class MakeCopy implements MakePlugin {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java b/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java
index ddcf0f5..505cfc2 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java
@@ -4,8 +4,8 @@
 import java.lang.reflect.*;
 import java.util.*;
 
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.MethodDef;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.MethodDef;
 
 /**
  * Create an XML call tree of a set of classes. The structure of the XML is:
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java b/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java
index 614071f..d081bb9 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java
@@ -1,15 +1,15 @@
 package aQute.bnd.make.component;
 
-import static aQute.lib.osgi.Constants.*;
+import static aQute.bnd.osgi.Constants.*;
 
 import java.lang.reflect.*;
 import java.util.*;
 import java.util.regex.*;
 
 import aQute.bnd.annotation.component.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.MethodDef;
-import aQute.lib.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.MethodDef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.service.reporter.*;
 
 public class ComponentAnnotationReader extends ClassDataCollector {
@@ -256,16 +256,17 @@
 		return Modifier.isPublic(method.getAccess()) || Modifier.isProtected(method.getAccess());
 	}
 
-	static Pattern	PROPERTY_PATTERN	= Pattern.compile("[^=]+=.+");
+	static Pattern	PROPERTY_PATTERN	= Pattern.compile("\\s*([^=\\s])+\\s*=(.+)");
 
-	private void doProperties(aQute.lib.osgi.Annotation annotation) {
+	private void doProperties(aQute.bnd.osgi.Annotation annotation) {
 		Object[] properties = annotation.get(Component.PROPERTIES);
 
 		if (properties != null) {
 			for (Object o : properties) {
 				String p = (String) o;
-				if (PROPERTY_PATTERN.matcher(p).matches())
-					this.properties.add(p);
+				Matcher m = PROPERTY_PATTERN.matcher(p);
+				if (m.matches())
+					this.properties.add(m.group(1)+"="+m.group(2));
 				else
 					throw new IllegalArgumentException("Malformed property '" + p + "' on: "
 							+ annotation.get(Component.NAME));
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java b/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
index 273ccbe..89c36be 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
@@ -6,13 +6,12 @@
 import java.util.regex.*;
 
 import aQute.bnd.annotation.component.*;
+import aQute.bnd.header.*;
 import aQute.bnd.make.metatype.*;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.QUERY;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.QUERY;
-import aQute.lib.osgi.Descriptors.TypeRef;
-import aQute.libg.header.*;
-import aQute.libg.version.*;
 
 /**
  * This class is an analyzer plugin. It looks at the properties and tries to
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java b/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java
index 024b5fe..6ca638c 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java
@@ -3,9 +3,9 @@
 import java.io.*;
 import java.util.*;
 
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.MethodDef;
-import aQute.lib.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.MethodDef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 
 /**
  * This class can create a coverage table between two classspaces. The
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java b/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java
index 56abb77..753b69d 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java
@@ -5,8 +5,8 @@
 import java.io.*;
 import java.util.*;
 
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.MethodDef;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.MethodDef;
 import aQute.lib.tag.*;
 
 /**
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java b/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java
index cd0fc4b..4f57467 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java
@@ -5,9 +5,9 @@
 import java.util.regex.*;
 
 import aQute.bnd.annotation.metatype.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.MethodDef;
-import aQute.lib.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.MethodDef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.lib.tag.*;
 import aQute.libg.generics.*;
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java b/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java
index c6218a1..4f30469 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java
@@ -3,10 +3,10 @@
 import java.util.*;
 
 import aQute.bnd.annotation.metatype.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Clazz.QUERY;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Clazz.QUERY;
-import aQute.libg.header.*;
 
 /**
  * This class is responsible for meta type types. It is a plugin that can
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java
index 3717062..7fb4dfd 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java
@@ -8,15 +8,15 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
+import aQute.bnd.header.*;
 import aQute.bnd.maven.support.*;
 import aQute.bnd.maven.support.Pom.Scope;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Descriptors.PackageRef;
 import aQute.bnd.settings.*;
 import aQute.lib.collections.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Descriptors.PackageRef;
 import aQute.libg.command.*;
-import aQute.libg.header.*;
 
 public class MavenCommand extends Processor {
 	final Settings	settings	= new Settings();
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java
index 4cc4cf3..ff383b4 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java
@@ -5,10 +5,10 @@
 import java.util.jar.*;
 
 import aQute.bnd.build.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
 import aQute.libg.command.*;
-import aQute.libg.header.*;
 import aQute.service.reporter.*;
 
 public class MavenDeploy implements Deploy, Plugin {
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java
index 8f80562..10829ca 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java
@@ -5,9 +5,9 @@
 import java.util.jar.*;
 
 import aQute.bnd.build.*;
-import aQute.lib.osgi.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.libg.command.*;
-import aQute.libg.header.*;
 import aQute.service.reporter.*;
 
 public class MavenDeployCmd extends Processor {
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java b/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
index 06f279f..2f55a07 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
@@ -4,9 +4,8 @@
 import java.util.*;
 import java.util.regex.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.libg.version.*;
 import aQute.service.reporter.*;
 
 public class MavenRepository implements RepositoryPlugin, Plugin, BsnToMavenPath {
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java b/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java
index 782c282..66954e0 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java
@@ -6,11 +6,10 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
 import aQute.lib.tag.*;
-import aQute.libg.header.*;
-import aQute.libg.version.*;
 
 public class PomFromManifest extends WriteResource {
 	final Manifest			manifest;
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java b/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java
index 12c2edc..3eda682 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java
@@ -8,8 +8,8 @@
 
 import org.w3c.dom.*;
 
+import aQute.bnd.osgi.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
 
 /**
  * Provides a way to parse a maven pom as properties. This provides most of the
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java b/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java
index b722d0f..b3582a3 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java
@@ -6,10 +6,10 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
 import aQute.lib.tag.*;
-import aQute.libg.header.*;
 
 public class PomResource extends WriteResource {
 	final Manifest				manifest;
diff --git a/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java b/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
index 26ba26f..0cce3b3 100644
--- a/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
+++ b/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
@@ -4,10 +4,9 @@
 import java.net.*;
 import java.util.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
-import aQute.libg.version.*;
 import aQute.service.reporter.*;
 
 public class MavenRemoteRepository implements RepositoryPlugin, RegistryPlugin, Plugin {
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/About.java b/bundleplugin/src/main/java/aQute/bnd/osgi/About.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/osgi/About.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/About.java
index 0fdf402..f2b7240 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/About.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/About.java
@@ -1,6 +1,6 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
 
 /**
  * This package contains a number of classes that assists by analyzing JARs and
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/AbstractResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/osgi/AbstractResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java
index 782e615..e023985 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/AbstractResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java
similarity index 95%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java
index 4f26d94..1a5c61b 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Analyzer.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 /**
  * This class can calculate the required headers for a (potential) JAR file. It
@@ -30,20 +30,19 @@
 import java.util.regex.*;
 
 import aQute.bnd.annotation.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.Descriptors.Descriptor;
+import aQute.bnd.osgi.Descriptors.PackageRef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.bnd.service.*;
 import aQute.lib.base64.*;
 import aQute.lib.collections.*;
 import aQute.lib.filter.*;
 import aQute.lib.hex.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.Descriptors.Descriptor;
-import aQute.lib.osgi.Descriptors.PackageRef;
-import aQute.lib.osgi.Descriptors.TypeRef;
 import aQute.libg.cryptography.*;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
 import aQute.libg.reporter.*;
-import aQute.libg.version.Version;
 
 public class Analyzer extends Processor {
 	private final SortedSet<Clazz.JAVA>				ees						= new TreeSet<Clazz.JAVA>();
@@ -59,8 +58,11 @@
 
 	// Global parameters
 	private final MultiMap<PackageRef,PackageRef>	uses					= new MultiMap<PackageRef,PackageRef>(
-																					PackageRef.class, PackageRef.class,
-																					true);
+			PackageRef.class, PackageRef.class,
+			true);
+	private final MultiMap<PackageRef,PackageRef>	apiUses					= new MultiMap<PackageRef,PackageRef>(
+			PackageRef.class, PackageRef.class,
+			true);
 	private final Packages							classpathExports		= new Packages();
 	private final Descriptors						descriptors				= new Descriptors();
 	private final List<Jar>							classpath				= list();
@@ -115,6 +117,7 @@
 		if (!analyzed) {
 			analyzed = true;
 			uses.clear();
+			apiUses.clear();
 			classspace.clear();
 			classpathExports.clear();
 
@@ -229,7 +232,40 @@
 			// USES
 			//
 			// Add the uses clause to the exports
-			doUses(exports, uses, imports);
+			
+			boolean api = isTrue(getProperty(EXPERIMENTS)) || true; // brave, lets see
+			
+			doUses(exports, api ? apiUses : uses, imports);
+			
+			//
+			// Verify that no exported package has a reference to a private
+			// package
+			// This can cause a lot of harm.
+			// TODO restrict the check to public API only, but even then
+			// exported packages
+			// should preferably not refer to private packages.
+			//
+			Set<PackageRef> privatePackages = new HashSet<PackageRef>(contained.keySet());
+			privatePackages.removeAll(exports.keySet());
+			privatePackages.removeAll(imports.keySet());
+
+			// References to java are not imported so they would show up as
+			// private
+			// packages, lets kill them as well.
+
+			for (Iterator<PackageRef> p = privatePackages.iterator(); p.hasNext();)
+				if (p.next().isJava())
+					p.remove();
+
+			for (PackageRef exported : exports.keySet()) {
+				List<PackageRef> used = uses.get(exported);
+				if (used != null) {
+					Set<PackageRef> privateReferences = new HashSet<PackageRef>(apiUses.get(exported));
+					privateReferences.retainAll(privatePackages);
+					if (!privateReferences.isEmpty())
+						msgs.Export_Has_PrivateReferences_(exported, privateReferences.size(), privateReferences);
+				}
+			}
 
 			//
 			// Checks
@@ -383,6 +419,10 @@
 			}
 		}
 
+		// Copy old values into new manifest, when they
+		// exist in the old one, but not in the new one
+		merge(manifest, dot.getManifest());
+
 		//
 		// Calculate the bundle symbolic name if it is
 		// not set.
@@ -406,16 +446,14 @@
 		if (main.getValue(BUNDLE_VERSION) == null)
 			main.putValue(BUNDLE_VERSION, "0");
 
-		// Copy old values into new manifest, when they
-		// exist in the old one, but not in the new one
-		merge(manifest, dot.getManifest());
-
 		// Remove all the headers mentioned in -removeheaders
 		Instructions instructions = new Instructions(getProperty(REMOVEHEADERS));
 		Collection<Object> result = instructions.select(main.keySet(), false);
 		main.keySet().removeAll(result);
 
-		dot.setManifest(manifest);
+		// We should not set the manifest here, this is in general done
+		// by the caller.
+		// dot.setManifest(manifest);
 		return manifest;
 	}
 
@@ -561,7 +599,8 @@
 		return value.trim();
 	}
 
-	public String _bsn(@SuppressWarnings("unused") String args[]) {
+	public String _bsn(@SuppressWarnings("unused")
+	String args[]) {
 		return getBsn();
 	}
 
@@ -638,6 +677,10 @@
 		return uses;
 	}
 
+	public MultiMap<PackageRef,PackageRef> getAPIUses() {
+		return apiUses;
+	}
+
 	/**
 	 * Get the version for this bnd
 	 * 
@@ -1358,7 +1401,8 @@
 	 * @param value
 	 * @throws Exception
 	 */
-	void getExportVersionsFromPackageInfo(PackageRef packageRef, Resource r, Packages classpathExports) throws Exception {
+	void getExportVersionsFromPackageInfo(PackageRef packageRef, Resource r, Packages classpathExports)
+			throws Exception {
 		if (r == null)
 			return;
 
@@ -1701,16 +1745,19 @@
 						if (info != null)
 							contained.merge(packageRef, false, info);
 
-						Set<PackageRef> set = Create.set();
 
 						// Look at the referred packages
 						// and copy them to our baseline
+						Set<PackageRef> refs = Create.set();
 						for (PackageRef p : clazz.getReferred()) {
 							referred.put(p);
-							set.add(p);
+							refs.add(p);
 						}
-						set.remove(packageRef);
-						uses.addAll(packageRef, set);
+						refs.remove(packageRef);
+						uses.addAll(packageRef, refs);
+	
+						// Collect the API
+						apiUses.addAll(packageRef, clazz.getAPIUses());
 					}
 				}
 			}
@@ -2294,7 +2341,8 @@
 		return ees.first();
 	}
 
-	public String _ee(@SuppressWarnings("unused") String args[]) {
+	public String _ee(@SuppressWarnings("unused")
+	String args[]) {
 		return getLowestEE().getEE();
 	}
 
@@ -2328,8 +2376,9 @@
 		} else
 			outputDir = getBase();
 
-		if (getBundleSymbolicName() != null) {
-			String bsn = getBundleSymbolicName();
+		Entry<String,Attrs> name = getBundleSymbolicName();
+		if (name != null) {
+			String bsn = name.getKey();
 			String version = getBundleVersion();
 			Version v = Version.parseVersion(version);
 			String outputName = bsn + "-" + v.getWithoutQualifier() + Constants.DEFAULT_JAR_EXTENSION;
@@ -2411,4 +2460,25 @@
 		if (version != null && getBundleVersion() == null)
 			setBundleVersion(version);
 	}
+
+	/**
+	 * Remove the own references and optionall java references from the uses lib
+	 * @param apiUses
+	 * @param removeJava
+	 * @return
+	 */
+	public MultiMap<PackageRef,PackageRef> cleanupUses(MultiMap<PackageRef,PackageRef> apiUses, boolean removeJava) {
+		MultiMap<PackageRef,PackageRef> map = new MultiMap<PackageRef,PackageRef>(apiUses);
+		for ( Entry<PackageRef,List<PackageRef>> e : map.entrySet()) {
+			e.getValue().remove(e.getKey());
+			if (!removeJava)
+				continue;
+			
+			for (Iterator<PackageRef> i = e.getValue().iterator(); i.hasNext(); ) {
+				if ( i.next().isJava())
+					i.remove();
+			}
+		}		
+		return map;
+	}
 }
diff --git a/bundleplugin/src/main/java/aQute/bnd/osgi/AnalyzerMessages.java b/bundleplugin/src/main/java/aQute/bnd/osgi/AnalyzerMessages.java
new file mode 100644
index 0000000..aac1a52
--- /dev/null
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/AnalyzerMessages.java
@@ -0,0 +1,13 @@
+package aQute.bnd.osgi;
+
+import java.util.*;
+
+import aQute.bnd.osgi.Descriptors.PackageRef;
+import aQute.libg.reporter.*;
+
+public interface AnalyzerMessages extends Messages {
+
+	WARNING Export_Has_PrivateReferences_(PackageRef exported, int count, Collection<PackageRef> local);
+/**/
+}
+
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Annotation.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Annotation.java
similarity index 95%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Annotation.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Annotation.java
index e364949..37c4cad 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Annotation.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Annotation.java
@@ -1,10 +1,10 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.lang.annotation.*;
 import java.util.*;
 
 import aQute.bnd.annotation.metatype.*;
-import aQute.lib.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 
 public class Annotation {
 	TypeRef				name;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Builder.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java
index 152f326..a5bb7f6 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Builder.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.util.*;
@@ -10,18 +10,18 @@
 import aQute.bnd.component.*;
 import aQute.bnd.differ.*;
 import aQute.bnd.differ.Baseline.Info;
+import aQute.bnd.header.*;
 import aQute.bnd.make.*;
 import aQute.bnd.make.component.*;
 import aQute.bnd.make.metatype.*;
 import aQute.bnd.maven.*;
+import aQute.bnd.osgi.Descriptors.PackageRef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.bnd.service.*;
 import aQute.bnd.service.RepositoryPlugin.Strategy;
 import aQute.bnd.service.diff.*;
 import aQute.lib.collections.*;
-import aQute.lib.osgi.Descriptors.PackageRef;
-import aQute.lib.osgi.Descriptors.TypeRef;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
 
 /**
  * Include-Resource: ( [name '=' ] file )+ Private-Package: package-decl ( ','
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/BundleId.java b/bundleplugin/src/main/java/aQute/bnd/osgi/BundleId.java
similarity index 96%
rename from bundleplugin/src/main/java/aQute/lib/osgi/BundleId.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/BundleId.java
index 87fc25f..2d711ad 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/BundleId.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/BundleId.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 /**
  * Holds the bundle bsn + version pair
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/ClassDataCollector.java b/bundleplugin/src/main/java/aQute/bnd/osgi/ClassDataCollector.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/osgi/ClassDataCollector.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/ClassDataCollector.java
index 04a8406..c8d79c6 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/ClassDataCollector.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/ClassDataCollector.java
@@ -1,6 +1,6 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
-import aQute.lib.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 
 public class ClassDataCollector {
 	public void classBegin(@SuppressWarnings("unused") int access, @SuppressWarnings("unused") TypeRef name) {}
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Clazz.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Clazz.java
similarity index 92%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Clazz.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Clazz.java
index 87ce8a5..dc8784c 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Clazz.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Clazz.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.lang.annotation.*;
@@ -7,9 +7,9 @@
 import java.util.*;
 import java.util.regex.*;
 
-import aQute.lib.osgi.Descriptors.Descriptor;
-import aQute.lib.osgi.Descriptors.PackageRef;
-import aQute.lib.osgi.Descriptors.TypeRef;
+import aQute.bnd.osgi.Descriptors.Descriptor;
+import aQute.bnd.osgi.Descriptors.PackageRef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.libg.generics.*;
 
 public class Clazz {
@@ -337,8 +337,6 @@
 	int					accessx		= 0;
 	String				sourceFile;
 	Set<TypeRef>		xref;
-	Set<Integer>		classes;
-	Set<Integer>		descriptors;
 	Set<TypeRef>		annotations;
 	int					forName		= 0;
 	int					class$		= 0;
@@ -348,9 +346,10 @@
 	Resource			resource;
 	FieldDef			last		= null;
 	boolean				deprecated;
-
+	Set<PackageRef>		api;
 	final Analyzer		analyzer;
 
+
 	public Clazz(Analyzer analyzer, String path, Resource resource) {
 		this.path = path;
 		this.resource = resource;
@@ -389,9 +388,7 @@
 
 	Set<TypeRef> parseClassFile(DataInputStream in) throws Exception {
 		xref = new HashSet<TypeRef>();
-		classes = new HashSet<Integer>();
-		descriptors = new HashSet<Integer>();
-
+		
 		boolean crawl = cd != null; // Crawl the byte code if we have a
 		// collector
 		int magic = in.readInt();
@@ -466,16 +463,36 @@
 		}
 
 		pool(pool, intPool);
+		
+		// All name& type and class constant records contain descriptors we must treat
+		// as references, though not API
+		
+		for ( Object o : pool ) {
+			if ( o == null)
+				continue;
+			
+			if (o instanceof Assoc && ((Assoc)o).tag ==12 ) {
+				referTo( ((Assoc)o).b, 0); // Descriptor
+			} else if ( o instanceof ClassConstant) {
+				String binaryClassName = (String) pool[((ClassConstant)o).cname];
+				TypeRef typeRef = analyzer.getTypeRef(binaryClassName);
+				referTo( typeRef, 0);
+			}
+		}
+		
 		/*
 		 * Parse after the constant pool, code thanks to Hans Christian
 		 * Falkenberg
 		 */
 
 		accessx = in.readUnsignedShort(); // access
-
+		if ( Modifier.isPublic(accessx))
+			api = new HashSet<PackageRef>();
+		
 		int this_class = in.readUnsignedShort();
 		className = analyzer.getTypeRef((String) pool[intPool[this_class]]);
-
+		referTo(className, Modifier.PUBLIC);
+		
 		try {
 
 			if (cd != null) {
@@ -490,7 +507,7 @@
 			}
 
 			if (zuper != null) {
-				referTo(zuper);
+				referTo(zuper, accessx);
 				if (cd != null)
 					cd.extendsClass(zuper);
 			}
@@ -498,8 +515,10 @@
 			int interfacesCount = in.readUnsignedShort();
 			if (interfacesCount > 0) {
 				interfaces = new TypeRef[interfacesCount];
-				for (int i = 0; i < interfacesCount; i++)
+				for (int i = 0; i < interfacesCount; i++) {
 					interfaces[i] = analyzer.getTypeRef((String) pool[intPool[in.readUnsignedShort()]]);
+					referTo(interfaces[i],accessx);
+				}
 				if (cd != null)
 					cd.implementsInterfaces(interfaces);
 			}
@@ -526,8 +545,9 @@
 				}
 				if (cd != null)
 					cd.field(last = new FieldDef(access_flags, name, pool[descriptor_index].toString()));
-				descriptors.add(Integer.valueOf(descriptor_index));
-				doAttributes(in, ElementType.FIELD, false);
+				
+				referTo( descriptor_index, access_flags);
+				doAttributes(in, ElementType.FIELD, false, access_flags);
 			}
 
 			//
@@ -562,7 +582,7 @@
 				int access_flags = in.readUnsignedShort();
 				int name_index = in.readUnsignedShort();
 				int descriptor_index = in.readUnsignedShort();
-				descriptors.add(Integer.valueOf(descriptor_index));
+				referTo(descriptor_index, access_flags);
 				String name = pool[name_index].toString();
 				String descriptor = pool[descriptor_index].toString();
 				if (cd != null) {
@@ -572,40 +592,20 @@
 				}
 
 				if ("<init>".equals(name)) {
-					doAttributes(in, ElementType.CONSTRUCTOR, crawl);
+					doAttributes(in, ElementType.CONSTRUCTOR, crawl, access_flags);
 				} else {
-					doAttributes(in, ElementType.METHOD, crawl);
+					doAttributes(in, ElementType.METHOD, crawl, access_flags);
 				}
 			}
 			if (cd != null)
 				cd.memberEnd();
 
-			doAttributes(in, ElementType.TYPE, false);
-
-			//
-			// Now iterate over all classes we found and
-			// parse those as well. We skip duplicates
-			//
-
-			for (int n : classes) {
-				String descr = (String) pool[n];
-
-				TypeRef clazz = analyzer.getTypeRef(descr);
-				referTo(clazz);
-			}
+			doAttributes(in, ElementType.TYPE, false, accessx);
 
 			//
 			// Parse all the descriptors we found
 			//
 
-			for (Iterator<Integer> e = descriptors.iterator(); e.hasNext();) {
-				Integer index = e.next();
-				String prototype = (String) pool[index.intValue()];
-				if (prototype != null)
-					parseDescriptor(prototype);
-				else
-					System.err.println("Unrecognized descriptor: " + index);
-			}
 			Set<TypeRef> xref = this.xref;
 			reset();
 			return xref;
@@ -640,7 +640,6 @@
 	protected void nameAndType(DataInputStream in, int poolIndex, byte tag) throws IOException {
 		int name_index = in.readUnsignedShort();
 		int descriptor_index = in.readUnsignedShort();
-		descriptors.add(Integer.valueOf(descriptor_index));
 		pool[poolIndex] = new Assoc(tag, name_index, descriptor_index);
 	}
 
@@ -673,7 +672,6 @@
 	 */
 	protected void constantClass(DataInputStream in, int poolIndex) throws IOException {
 		int class_index = in.readUnsignedShort();
-		classes.add(Integer.valueOf(class_index));
 		intPool[poolIndex] = class_index;
 		ClassConstant c = new ClassConstant(class_index);
 		pool[poolIndex] = c;
@@ -755,13 +753,14 @@
 	 * 
 	 * @param in
 	 *            The stream
+	 * @param access_flags 
 	 * @throws Exception
 	 */
-	private void doAttributes(DataInputStream in, ElementType member, boolean crawl) throws Exception {
+	private void doAttributes(DataInputStream in, ElementType member, boolean crawl, int access_flags) throws Exception {
 		int attributesCount = in.readUnsignedShort();
 		for (int j = 0; j < attributesCount; j++) {
 			// skip name CONSTANT_Utf8 pointer
-			doAttribute(in, member, crawl);
+			doAttribute(in, member, crawl, access_flags);
 		}
 	}
 
@@ -770,9 +769,10 @@
 	 * 
 	 * @param in
 	 *            the data stream
+	 * @param access_flags 
 	 * @throws Exception
 	 */
-	private void doAttribute(DataInputStream in, ElementType member, boolean crawl) throws Exception {
+	private void doAttribute(DataInputStream in, ElementType member, boolean crawl, int access_flags) throws Exception {
 		int attribute_name_index = in.readUnsignedShort();
 		String attributeName = (String) pool[attribute_name_index];
 		long attribute_length = in.readInt();
@@ -797,7 +797,7 @@
 		else if ("Code".equals(attributeName) && crawl)
 			doCode(in);
 		else if ("Signature".equals(attributeName))
-			doSignature(in, member);
+			doSignature(in, member, access_flags);
 		else if ("ConstantValue".equals(attributeName))
 			doConstantValue(in);
 		else {
@@ -901,20 +901,14 @@
 	 * </pre>
 	 * 
 	 * @param member
+	 * @param access_flags 
 	 */
 
-	void doSignature(DataInputStream in, ElementType member) throws IOException {
+	void doSignature(DataInputStream in, ElementType member, int access_flags) throws IOException {
 		int signature_index = in.readUnsignedShort();
 		String signature = (String) pool[signature_index];
 
-		// s.println("Signature " + signature );
-
-		// // The type signature is kind of weird,
-		// // lets skip it for now. Seems to be some kind of
-		// // type variable name index but it does not seem to
-		// // conform to the language specification.
-		// if (member != ElementType.TYPE)
-		parseDescriptor(signature);
+		parseDescriptor(signature, access_flags);
 
 		if (last != null)
 			last.signature = signature;
@@ -972,7 +966,7 @@
 		crawl(code);
 		int exception_table_length = in.readUnsignedShort();
 		in.skipBytes(exception_table_length * 8);
-		doAttributes(in, ElementType.METHOD, false);
+		doAttributes(in, ElementType.METHOD, false, 0);
 	}
 
 	/**
@@ -1027,7 +1021,7 @@
 						String fqn = (String) pool[intPool[lastReference]];
 						if (!fqn.equals("class") && fqn.indexOf('.') > 0) {
 							TypeRef clazz = analyzer.getTypeRefFromFQN(fqn);
-							referTo(clazz);
+							referTo(clazz, 0);
 						}
 						lastReference = -1;
 					}
@@ -1107,7 +1101,7 @@
 		annotations.add(tr);
 
 		if (policy == RetentionPolicy.RUNTIME) {
-			descriptors.add(Integer.valueOf(type_index));
+			referTo(type_index,0);
 			hasRuntimeAnnotations = true;
 		} else {
 			hasClassAnnotations = true;
@@ -1155,14 +1149,14 @@
 			case 'e' : // enum constant
 				int type_name_index = in.readUnsignedShort();
 				if (policy == RetentionPolicy.RUNTIME)
-					descriptors.add(Integer.valueOf(type_name_index));
+					referTo(type_name_index,0);
 				int const_name_index = in.readUnsignedShort();
 				return pool[const_name_index];
 
 			case 'c' : // Class
 				int class_info_index = in.readUnsignedShort();
 				if (policy == RetentionPolicy.RUNTIME)
-					descriptors.add(Integer.valueOf(class_info_index));
+					referTo(class_info_index,0);
 				return pool[class_info_index];
 
 			case '@' : // Annotation type
@@ -1187,7 +1181,7 @@
 	 * @param packageRef
 	 *            A '.' delimited package name
 	 */
-	void referTo(TypeRef typeRef) {
+	void referTo(TypeRef typeRef, int modifiers) {
 		if (xref != null)
 			xref.add(typeRef);
 		if (typeRef.isPrimitive())
@@ -1198,6 +1192,14 @@
 			return;
 
 		imports.add(packageRef);
+		
+		if ( api != null && (Modifier.isPublic(modifiers)||Modifier.isProtected(modifiers)))
+			api.add(packageRef);
+	}
+	
+	void referTo( int index, int modifiers) {
+		String descriptor = (String) pool[index];
+		parseDescriptor(descriptor, modifiers);
 	}
 
 	/**
@@ -1217,19 +1219,20 @@
 	 * @param rover
 	 *            The pointer to start at
 	 */
-	public void parseDescriptor(String descriptor) {
+	
+	public void parseDescriptor(String descriptor, int modifiers) {
 		// Some descriptors are weird, they start with a generic
 		// declaration that contains ':', not sure what they mean ...
 		int rover = 0;
 		if (descriptor.charAt(0) == '<') {
-			rover = parseFormalTypeParameters(descriptor, rover);
+			rover = parseFormalTypeParameters(descriptor, rover, modifiers);
 		}
 
 		if (descriptor.charAt(rover) == '(') {
-			rover = parseReferences(descriptor, rover + 1, ')');
+			rover = parseReferences(descriptor, rover + 1, ')', modifiers);
 			rover++;
 		}
-		parseReferences(descriptor, rover, (char) 0);
+		parseReferences(descriptor, rover, (char) 0, modifiers);
 	}
 
 	/**
@@ -1244,10 +1247,10 @@
 	 *            The end character or 0
 	 * @return the last index processed, one character after the delimeter
 	 */
-	int parseReferences(String descriptor, int rover, char delimiter) {
+	int parseReferences(String descriptor, int rover, char delimiter, int modifiers) {
 		int r = rover;
 		while (r < descriptor.length() && descriptor.charAt(r) != delimiter) {
-			r = parseReference(descriptor, r);
+			r = parseReference(descriptor, r, modifiers);
 		}
 		return r;
 	}
@@ -1262,14 +1265,14 @@
 	 *            The place to start
 	 * @return The return index after the reference
 	 */
-	int parseReference(String descriptor, int rover) {
+	int parseReference(String descriptor, int rover, int modifiers) {
 		int r = rover;
 		char c = descriptor.charAt(r);
 		while (c == '[')
 			c = descriptor.charAt(++r);
 
 		if (c == '<') {
-			r = parseReferences(descriptor, r + 1, '>');
+			r = parseReferences(descriptor, r + 1, '>', modifiers);
 		} else if (c == 'T') {
 			// Type variable name
 			r++;
@@ -1280,7 +1283,7 @@
 			r++;
 			while ((c = descriptor.charAt(r)) != ';') {
 				if (c == '<') {
-					r = parseReferences(descriptor, r + 1, '>');
+					r = parseReferences(descriptor, r + 1, '>', modifiers);
 				} else
 					sb.append(c);
 				r++;
@@ -1289,7 +1292,7 @@
 			if (cd != null)
 				cd.addReference(ref);
 
-			referTo(ref);
+			referTo(ref, modifiers);
 		} else {
 			if ("+-*BCDFIJSZV".indexOf(c) < 0)
 				;// System.err.println("Should not skip: " + c);
@@ -1308,7 +1311,7 @@
 	 * @param index
 	 * @return
 	 */
-	private int parseFormalTypeParameters(String descriptor, int index) {
+	private int parseFormalTypeParameters(String descriptor, int index, int modifiers) {
 		index++;
 		while (descriptor.charAt(index) != '>') {
 			// Skip IDENTIFIER
@@ -1322,14 +1325,14 @@
 
 			// Class Bound?
 			if (c == 'L' || c == 'T') {
-				index = parseReference(descriptor, index); // class reference
+				index = parseReference(descriptor, index, modifiers); // class reference
 				c = descriptor.charAt(index);
 			}
 
 			// Interface Bounds
 			while (c == ':') {
 				index++;
-				index = parseReference(descriptor, index);
+				index = parseReference(descriptor, index, modifiers);
 				c = descriptor.charAt(index);
 			} // for each interface
 
@@ -1364,8 +1367,6 @@
 		pool = null;
 		intPool = null;
 		xref = null;
-		classes = null;
-		descriptors = null;
 	}
 
 	public boolean is(QUERY query, Instruction instr, Analyzer analyzer) throws Exception {
@@ -1621,4 +1622,10 @@
 	public boolean isAnnotation() {
 		return (accessx & ACC_ANNOTATION) != 0;
 	}
+
+	public Set<PackageRef> getAPIUses() {
+		if ( api == null)
+			return Collections.emptySet();
+		return  api;
+	}
 }
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/CombinedResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/CombinedResource.java
similarity index 96%
rename from bundleplugin/src/main/java/aQute/lib/osgi/CombinedResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/CombinedResource.java
index 3886c48..d38f416 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/CombinedResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/CombinedResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.util.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/CommandResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/CommandResource.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/osgi/CommandResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/CommandResource.java
index 47ba4ac..eb66635 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/CommandResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/CommandResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Constants.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Constants.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Constants.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Constants.java
index 767e516..755e9a2 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Constants.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Constants.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.nio.charset.*;
 import java.util.*;
@@ -52,11 +52,11 @@
 	String							CREATED_BY									= "Created-By";
 	String							TOOL										= "Tool";
 	String							TESTCASES									= "Test-Cases";
-        /**
-         * @deprecated Use {@link Constants#TESTCASES}.
-         */
-        @Deprecated
-        String                                                  TESTSUITES                                                                      = "Test-Suites";
+	/**
+	 * @deprecated Use {@link Constants#TESTCASES}.
+	 */
+	@Deprecated
+	String							TESTSUITES									= "Test-Suites";
 	String							SIGNATURE_TEST								= "-signaturetest";
 
 	String							headers[]									= {
@@ -66,7 +66,7 @@
 			BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SYMBOLICNAME, BUNDLE_VERSION,
 			FRAGMENT_HOST, PRIVATE_PACKAGE, IGNORE_PACKAGE, INCLUDE_RESOURCE, REQUIRE_BUNDLE, IMPORT_SERVICE,
 			EXPORT_SERVICE, CONDITIONAL_PACKAGE, BND_LASTMODIFIED, TESTCASES, SIGNATURE_TEST, REQUIRE_CAPABILITY,
-			PROVIDE_CAPABILITY
+			PROVIDE_CAPABILITY, BUNDLE_ICON
 																				};
 
 	String							BUILDPATH									= "-buildpath";
@@ -82,6 +82,7 @@
 	String							DSANNOTATIONS								= "-dsannotations";
 	String							DONOTCOPY									= "-donotcopy";
 	String							DEBUG										= "-debug";
+	String							EXPERIMENTS									= "-experiments";
 	String							EXPORT_CONTENTS								= "-exportcontents";
 	String							FAIL_OK										= "-failok";
 	String							INCLUDE										= "-include";
@@ -112,13 +113,14 @@
 	String							RUNREPOS									= "-runrepos";
 
 	/**
-	 * @deprecated This is for support of the legacy OBR requirement format, use {@link #RUNREQUIRES} for new format.
+	 * @deprecated This is for support of the legacy OBR requirement format, use
+	 *             {@link #RUNREQUIRES} for new format.
 	 */
 	@Deprecated
 	String							RUNREQUIRE									= "-runrequire";
-	
+
 	String							RUNREQUIRES									= "-runrequires";
-	
+
 	String							RUNEE										= "-runee";
 	String							RUNPATH										= "-runpath";
 	String							RUNSTORAGE									= "-runstorage";
@@ -156,7 +158,7 @@
 			PROVIDER_POLICY, REMOVEHEADERS, RESOURCEONLY, SOURCES, SOURCEPATH, SOURCES, SOURCEPATH, SUB, RUNBUNDLES,
 			RUNPATH, RUNSYSTEMPACKAGES, RUNPROPERTIES, REPORTNEWER, UNDERTEST, TESTPATH, TESTPACKAGES, TESTREPORT,
 			VERBOSE, NOMANIFEST, DEPLOYREPO, RELEASEREPO, SAVEMANIFEST, RUNVM, WAB, WABLIB, RUNFRAMEWORK, RUNTRACE,
-			TESTCONTINUOUS, SNAPSHOT, NAMESECTION, DIGESTS, DSANNOTATIONS
+			TESTCONTINUOUS, SNAPSHOT, NAMESECTION, DIGESTS, DSANNOTATIONS, EXPERIMENTS
 																				};
 
 	// Ignore bundle specific headers. These bundles do not make
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Descriptors.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Descriptors.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Descriptors.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Descriptors.java
index f9c6a31..b435b27 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Descriptors.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Descriptors.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.util.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Domain.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
similarity index 81%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Domain.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
index e705534..828f1cf 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Domain.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
@@ -1,12 +1,13 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
-import static aQute.lib.osgi.Constants.*;
+import static aQute.bnd.osgi.Constants.*;
 
 import java.util.*;
+import java.util.Map.Entry;
 import java.util.jar.*;
 
-import aQute.libg.header.*;
-import aQute.libg.version.*;
+import aQute.bnd.header.*;
+import aQute.lib.converter.*;
 import aQute.service.reporter.*;
 
 /**
@@ -234,8 +235,11 @@
 		return Processor.isTrue(get(SOURCES));
 	}
 
-	public String getBundleSymbolicName() {
-		return get(BUNDLE_SYMBOLICNAME);
+	public Map.Entry<String,Attrs> getBundleSymbolicName() {
+		Parameters p = getParameters(BUNDLE_SYMBOLICNAME);
+		if (p.isEmpty())
+			return null;
+		return p.entrySet().iterator().next();
 	}
 
 	public void setBundleSymbolicName(String s) {
@@ -262,4 +266,39 @@
 	public boolean isFailOk() {
 		return Processor.isTrue(get(FAIL_OK));
 	}
+
+	/**
+	 * Find an icon with the requested size in the list of icons.
+	 * 
+	 * @param requestedSize
+	 *            the number of pixels desired
+	 * @return null or a the selected URI (which may be relative)
+	 */
+	public String getIcon(int requestedSize) throws Exception {
+		String spec = get(Constants.BUNDLE_ICON);
+		if (spec == null)
+			return null;
+
+		Parameters p = OSGiHeader.parseHeader(spec);
+		int dist = Integer.MAX_VALUE;
+		String selected = null;
+
+		for (Entry<String,Attrs> e : p.entrySet()) {
+			String url = e.getKey();
+			if (selected == null)
+				selected = url;
+
+			int size = Converter.cnv(Integer.class, e.getValue().get("size"));
+			if (size != 0 && Math.abs(requestedSize - size) < dist) {
+				dist = Math.abs(requestedSize - size);
+				selected = url;
+			}
+		}
+		return selected;
+	}
+
+	public void setConditionalPackage(String string) {
+		set(CONDITIONAL_PACKAGE, string);
+		
+	}
 }
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/EmbeddedResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/EmbeddedResource.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/osgi/EmbeddedResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/EmbeddedResource.java
index 3aff084..0aad605 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/EmbeddedResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/EmbeddedResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.util.zip.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/FileResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/FileResource.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/osgi/FileResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/FileResource.java
index 4d2459d..cd18cf5 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/FileResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/FileResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.util.regex.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Instruction.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Instruction.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Instruction.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Instruction.java
index bfb80bb..a660169 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Instruction.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Instruction.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.util.regex.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Instructions.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Instructions.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Instructions.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Instructions.java
index 6ac56dd..bfb7e28 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Instructions.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Instructions.java
@@ -1,8 +1,8 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.util.*;
 
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
 
 public class Instructions implements Map<Instruction,Attrs> {
 	private LinkedHashMap<Instruction,Attrs>	map;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Jar.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java
similarity index 95%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Jar.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java
index 725b065..b864297 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Jar.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java
@@ -1,8 +1,9 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import static aQute.lib.io.IO.*;
 
 import java.io.*;
+import java.net.*;
 import java.security.*;
 import java.util.*;
 import java.util.jar.*;
@@ -779,4 +780,34 @@
 		if (closed)
 			throw new RuntimeException("Already closed " + name);
 	}
+
+	/**
+	 * Return a data uri from the JAR. The data must be less than 32k
+	 * 
+	 * @param jar
+	 *            The jar to load the data from
+	 * @param path
+	 *            the path in the jar
+	 * @param mime
+	 *            the mime type
+	 * @return a URI or null if conversion could not take place
+	 */
+
+	public URI getDataURI(String path, String mime, int max) throws Exception {
+		Resource r = getResource(path);
+
+		if (r.size() >= max || r.size() <= 0)
+			return null;
+
+		byte[] data = new byte[(int) r.size()];
+		DataInputStream din = new DataInputStream(r.openInputStream());
+		try {
+			din.readFully(data);
+			String encoded = Base64.encodeBase64(data);
+			return new URI("data:" + mime + ";base64," + encoded);
+		}
+		finally {
+			din.close();
+		}
+	}
 }
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/JarResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/JarResource.java
similarity index 95%
rename from bundleplugin/src/main/java/aQute/lib/osgi/JarResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/JarResource.java
index c51aba3..2fb5c54 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/JarResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/JarResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Macro.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Macro.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java
index 8730b69..b6a6087 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Macro.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.lang.reflect.*;
@@ -10,7 +10,6 @@
 import aQute.lib.collections.*;
 import aQute.lib.io.*;
 import aQute.libg.sed.*;
-import aQute.libg.version.*;
 
 /**
  * Provide a macro processor. This processor can replace variables in strings
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/OpCodes.java b/bundleplugin/src/main/java/aQute/bnd/osgi/OpCodes.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/OpCodes.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/OpCodes.java
index 17b6d2b..4299556 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/OpCodes.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/OpCodes.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 public class OpCodes {
 	final static short	nop				= 0x00;			// [No change]
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Packages.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Packages.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Packages.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Packages.java
index 64e4a4e..53a92da 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Packages.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Packages.java
@@ -1,9 +1,9 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.util.*;
 
-import aQute.lib.osgi.Descriptors.PackageRef;
-import aQute.libg.header.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.Descriptors.PackageRef;
 
 public class Packages implements Map<PackageRef,Attrs> {
 	private LinkedHashMap<PackageRef,Attrs>	map;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/PreprocessResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/PreprocessResource.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/osgi/PreprocessResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/PreprocessResource.java
index 8b3f79e..a1b5095 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/PreprocessResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/PreprocessResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Processor.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Processor.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
index ef4013f..17b4df3 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Processor.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.net.*;
@@ -8,11 +8,11 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
+import aQute.bnd.header.*;
 import aQute.bnd.service.*;
 import aQute.lib.collections.*;
 import aQute.lib.io.*;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
 import aQute.service.reporter.*;
 
 public class Processor extends Domain implements Reporter, Registry, Constants, Closeable {
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Resource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Resource.java
similarity index 91%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Resource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Resource.java
index 6605eef..8be81aa 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Resource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Resource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/TagResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/TagResource.java
similarity index 95%
rename from bundleplugin/src/main/java/aQute/lib/osgi/TagResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/TagResource.java
index e138175..183f1cd 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/TagResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/TagResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/URLResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/URLResource.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/osgi/URLResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/URLResource.java
index 7c4772f..2cd2375 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/URLResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/URLResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.net.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/Verifier.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Verifier.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/Verifier.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Verifier.java
index 2759049..eac2f6f 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/Verifier.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Verifier.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.util.*;
@@ -6,12 +6,12 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.Descriptors.PackageRef;
+import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.lib.base64.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.Descriptors.PackageRef;
-import aQute.lib.osgi.Descriptors.TypeRef;
 import aQute.libg.cryptography.*;
-import aQute.libg.header.*;
 import aQute.libg.qtokens.*;
 
 public class Verifier extends Processor {
diff --git a/bundleplugin/src/main/java/aQute/libg/version/Version.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Version.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/libg/version/Version.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/Version.java
index 77d21e4..951ad25 100755
--- a/bundleplugin/src/main/java/aQute/libg/version/Version.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Version.java
@@ -1,4 +1,4 @@
-package aQute.libg.version;
+package aQute.bnd.osgi;
 
 import java.util.regex.*;
 
diff --git a/bundleplugin/src/main/java/aQute/libg/version/VersionRange.java b/bundleplugin/src/main/java/aQute/bnd/osgi/VersionRange.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/libg/version/VersionRange.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/VersionRange.java
index 3e00c76..8ff69a3 100755
--- a/bundleplugin/src/main/java/aQute/libg/version/VersionRange.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/VersionRange.java
@@ -1,4 +1,4 @@
-package aQute.libg.version;
+package aQute.bnd.osgi;
 
 import java.util.*;
 import java.util.regex.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/WriteResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/WriteResource.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/osgi/WriteResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/WriteResource.java
index 5cc5229..494c678 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/WriteResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/WriteResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/ZipResource.java b/bundleplugin/src/main/java/aQute/bnd/osgi/ZipResource.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/osgi/ZipResource.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/ZipResource.java
index f5e2095..edf6a68 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/ZipResource.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/ZipResource.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi;
+package aQute.bnd.osgi;
 
 import java.io.*;
 import java.util.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/eclipse/EclipseClasspath.java b/bundleplugin/src/main/java/aQute/bnd/osgi/eclipse/EclipseClasspath.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/osgi/eclipse/EclipseClasspath.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/eclipse/EclipseClasspath.java
index c146477..5415985 100755
--- a/bundleplugin/src/main/java/aQute/lib/osgi/eclipse/EclipseClasspath.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/eclipse/EclipseClasspath.java
@@ -1,4 +1,4 @@
-package aQute.lib.osgi.eclipse;
+package aQute.bnd.osgi.eclipse;
 
 import java.io.*;
 import java.util.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/packageinfo b/bundleplugin/src/main/java/aQute/bnd/osgi/packageinfo
similarity index 100%
rename from bundleplugin/src/main/java/aQute/lib/osgi/packageinfo
rename to bundleplugin/src/main/java/aQute/bnd/osgi/packageinfo
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/resource/CapReq.java b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/CapReq.java
similarity index 91%
rename from bundleplugin/src/main/java/aQute/lib/osgi/resource/CapReq.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/resource/CapReq.java
index c175060..d5fe2c6 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/resource/CapReq.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/CapReq.java
@@ -1,13 +1,8 @@
-package aQute.lib.osgi.resource;
+package aQute.bnd.osgi.resource;
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
 
-import org.osgi.resource.Capability;
-import org.osgi.resource.Namespace;
-import org.osgi.resource.Requirement;
-import org.osgi.resource.Resource;
+import org.osgi.resource.*;
 
 class CapReq implements Capability, Requirement {
 	
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/resource/CapReqBuilder.java b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/CapReqBuilder.java
similarity index 80%
rename from bundleplugin/src/main/java/aQute/lib/osgi/resource/CapReqBuilder.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/resource/CapReqBuilder.java
index 1e259c9..b06f37a 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/resource/CapReqBuilder.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/CapReqBuilder.java
@@ -1,19 +1,12 @@
-package aQute.lib.osgi.resource;
+package aQute.bnd.osgi.resource;
 
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
 
-import org.osgi.framework.namespace.PackageNamespace;
-import org.osgi.resource.Capability;
-import org.osgi.resource.Namespace;
-import org.osgi.resource.Requirement;
-import org.osgi.resource.Resource;
+import org.osgi.framework.namespace.*;
+import org.osgi.resource.*;
 
-import aQute.lib.osgi.resource.CapReq.MODE;
-import aQute.libg.filters.AndFilter;
-import aQute.libg.filters.Filter;
-import aQute.libg.filters.SimpleFilter;
-import aQute.libg.version.VersionRange;
+import aQute.bnd.osgi.resource.CapReq.MODE;
+import aQute.libg.filters.*;
 
 public class CapReqBuilder {
 
@@ -85,11 +78,11 @@
 		return new CapReq(MODE.Requirement, namespace, null, directives, attributes);
 	}
 	
-	public static final CapReqBuilder createPackageRequirement(String pkgName, VersionRange range) {
+	public static final CapReqBuilder createPackageRequirement(String pkgName, String range) {
 		Filter filter;
 		SimpleFilter pkgNameFilter = new SimpleFilter(PackageNamespace.PACKAGE_NAMESPACE, pkgName);
 		if (range != null)
-			filter = new AndFilter().addChild(pkgNameFilter).addChild(Filters.fromVersionRange(range));
+			filter = new AndFilter().addChild(pkgNameFilter).addChild(new LiteralFilter(Filters.fromVersionRange(range)));
 		else
 			filter = pkgNameFilter;
 		
diff --git a/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java
new file mode 100644
index 0000000..3194146
--- /dev/null
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java
@@ -0,0 +1,64 @@
+package aQute.bnd.osgi.resource;
+
+import org.osgi.framework.namespace.*;
+
+import aQute.bnd.osgi.*;
+import aQute.libg.filters.*;
+
+public class Filters {
+	
+	public static final String DEFAULT_VERSION_ATTR = IdentityNamespace.CAPABILITY_VERSION_ATTRIBUTE;
+	
+	/**
+	 * Generate an LDAP-style version filter from a version range, e.g.
+	 * {@code [1.0,2.0)} generates {@code (&(version>=1.0)(!(version>=2.0))}
+	 * 
+	 * @param range
+	 * @return The generated filter.
+	 * @throws IllegalArgumentException
+	 *             If the supplied range is invalid.
+	 */
+	public static String fromVersionRange(String range) throws IllegalArgumentException {
+		return fromVersionRange(range, DEFAULT_VERSION_ATTR);
+	}
+
+	/**
+	 * Generate an LDAP-style version filter from a version range, using a
+	 * specific attribute name for the version; for example can be used to
+	 * generate a range using the {@code bundle-version} attribute such as
+	 * {@code (&(bundle-version>=1.0)(!(bundle-version>=2.0))}.
+	 * 
+	 * @param range
+	 * @param versionAttr
+	 * @return The generated filter
+	 * @throws IllegalArgumentException
+	 *             If the supplied range is invalid.
+	 */
+	public static String fromVersionRange(String range, String versionAttr) throws IllegalArgumentException {
+		if (range == null)
+			return null;
+		VersionRange parsedRange = new VersionRange(range);
+		
+		Filter left;
+		if (parsedRange.includeLow())
+			left = new SimpleFilter(versionAttr, Operator.GreaterThanOrEqual, parsedRange.getLow().toString());
+		else
+			left = new NotFilter(new SimpleFilter(versionAttr, Operator.LessThanOrEqual, parsedRange.getLow().toString()));
+		
+		Filter right;
+		if (!parsedRange.isRange())
+			right = null;
+		else if (parsedRange.includeHigh())
+			right = new SimpleFilter(versionAttr, Operator.LessThanOrEqual, parsedRange.getHigh().toString());
+		else
+			right = new NotFilter(new SimpleFilter(versionAttr, Operator.GreaterThanOrEqual, parsedRange.getHigh().toString()));
+		
+		Filter result;
+		if (right != null)
+			result = new AndFilter().addChild(left).addChild(right);
+		else
+			result = left;
+		
+		return result.toString();
+	}
+}
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/resource/ResourceBuilder.java b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/ResourceBuilder.java
similarity index 87%
rename from bundleplugin/src/main/java/aQute/lib/osgi/resource/ResourceBuilder.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/resource/ResourceBuilder.java
index 9e9cde3..69e95b0 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/resource/ResourceBuilder.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/ResourceBuilder.java
@@ -1,11 +1,8 @@
-package aQute.lib.osgi.resource;
+package aQute.bnd.osgi.resource;
 
-import java.util.LinkedList;
-import java.util.List;
+import java.util.*;
 
-import org.osgi.resource.Capability;
-import org.osgi.resource.Requirement;
-import org.osgi.resource.Resource;
+import org.osgi.resource.*;
 
 public class ResourceBuilder {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/resource/ResourceImpl.java b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/ResourceImpl.java
similarity index 87%
rename from bundleplugin/src/main/java/aQute/lib/osgi/resource/ResourceImpl.java
rename to bundleplugin/src/main/java/aQute/bnd/osgi/resource/ResourceImpl.java
index 7305148..f8c3a84 100644
--- a/bundleplugin/src/main/java/aQute/lib/osgi/resource/ResourceImpl.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/ResourceImpl.java
@@ -1,14 +1,9 @@
-package aQute.lib.osgi.resource;
+package aQute.bnd.osgi.resource;
 
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
-import org.osgi.framework.namespace.IdentityNamespace;
-import org.osgi.resource.Capability;
-import org.osgi.resource.Requirement;
-import org.osgi.resource.Resource;
+import org.osgi.framework.namespace.*;
+import org.osgi.resource.*;
 
 class ResourceImpl implements Resource {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/resource/packageinfo b/bundleplugin/src/main/java/aQute/bnd/osgi/resource/packageinfo
similarity index 100%
rename from bundleplugin/src/main/java/aQute/lib/osgi/resource/packageinfo
rename to bundleplugin/src/main/java/aQute/bnd/osgi/resource/packageinfo
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/BadLocationException.java b/bundleplugin/src/main/java/aQute/bnd/properties/BadLocationException.java
similarity index 87%
rename from bundleplugin/src/main/java/aQute/lib/properties/BadLocationException.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/BadLocationException.java
index 2d9207d..30647db 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/BadLocationException.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/BadLocationException.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 public class BadLocationException extends Exception {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/CopyOnWriteTextStore.java b/bundleplugin/src/main/java/aQute/bnd/properties/CopyOnWriteTextStore.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/properties/CopyOnWriteTextStore.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/CopyOnWriteTextStore.java
index 179ab25..edcba0e 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/CopyOnWriteTextStore.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/CopyOnWriteTextStore.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 /**
  * Copy-on-write <code>ITextStore</code> wrapper.
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/Document.java b/bundleplugin/src/main/java/aQute/bnd/properties/Document.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/properties/Document.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/Document.java
index 4df75a6..3818b72 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/Document.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/Document.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 public class Document implements IDocument {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/GapTextStore.java b/bundleplugin/src/main/java/aQute/bnd/properties/GapTextStore.java
similarity index 99%
rename from bundleplugin/src/main/java/aQute/lib/properties/GapTextStore.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/GapTextStore.java
index 7c4a043..a32c219 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/GapTextStore.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/GapTextStore.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 /**
  * Implements a gap managing text store. The gap text store relies on the
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/IDocument.java b/bundleplugin/src/main/java/aQute/bnd/properties/IDocument.java
similarity index 93%
rename from bundleplugin/src/main/java/aQute/lib/properties/IDocument.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/IDocument.java
index aba541f..267003d 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/IDocument.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/IDocument.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 public interface IDocument {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/IRegion.java b/bundleplugin/src/main/java/aQute/bnd/properties/IRegion.java
similarity index 69%
rename from bundleplugin/src/main/java/aQute/lib/properties/IRegion.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/IRegion.java
index 70230e7..2712d71 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/IRegion.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/IRegion.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 public interface IRegion {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/ITextStore.java b/bundleplugin/src/main/java/aQute/bnd/properties/ITextStore.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/properties/ITextStore.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/ITextStore.java
index f4cf2c7..19791de 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/ITextStore.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/ITextStore.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 /**
  * Interface for storing and managing text.
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/Line.java b/bundleplugin/src/main/java/aQute/bnd/properties/Line.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/properties/Line.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/Line.java
index 8d07ce1..6ff1c07 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/Line.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/Line.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 /**
  * Describes a line as a particular number of characters beginning at a
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/LineTracker.java b/bundleplugin/src/main/java/aQute/bnd/properties/LineTracker.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/properties/LineTracker.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/LineTracker.java
index a3c3adf..df65c78 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/LineTracker.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/LineTracker.java
@@ -1,9 +1,9 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import aQute.lib.properties.Document.DelimiterInfo;
+import aQute.bnd.properties.Document.DelimiterInfo;
 
 public class LineTracker {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/LineType.java b/bundleplugin/src/main/java/aQute/bnd/properties/LineType.java
similarity index 64%
rename from bundleplugin/src/main/java/aQute/lib/properties/LineType.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/LineType.java
index 69eda5f..58dd96b 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/LineType.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/LineType.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 public enum LineType {
 	blank, comment, entry, eof
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/PropertiesLineReader.java b/bundleplugin/src/main/java/aQute/bnd/properties/PropertiesLineReader.java
similarity index 97%
rename from bundleplugin/src/main/java/aQute/lib/properties/PropertiesLineReader.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/PropertiesLineReader.java
index c3ea14b..720dde0 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/PropertiesLineReader.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/PropertiesLineReader.java
@@ -1,6 +1,6 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
-import static aQute.lib.properties.LineType.*;
+import static aQute.bnd.properties.LineType.*;
 
 public class PropertiesLineReader {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/PropertiesReader.java b/bundleplugin/src/main/java/aQute/bnd/properties/PropertiesReader.java
similarity index 98%
rename from bundleplugin/src/main/java/aQute/lib/properties/PropertiesReader.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/PropertiesReader.java
index 58426af..10d7f4a 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/PropertiesReader.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/PropertiesReader.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 import java.io.*;
 import java.net.*;
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/Region.java b/bundleplugin/src/main/java/aQute/bnd/properties/Region.java
similarity index 90%
rename from bundleplugin/src/main/java/aQute/lib/properties/Region.java
rename to bundleplugin/src/main/java/aQute/bnd/properties/Region.java
index 5ece58e..d94a06f 100644
--- a/bundleplugin/src/main/java/aQute/lib/properties/Region.java
+++ b/bundleplugin/src/main/java/aQute/bnd/properties/Region.java
@@ -1,4 +1,4 @@
-package aQute.lib.properties;
+package aQute.bnd.properties;
 
 public class Region implements IRegion {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/properties/packageinfo b/bundleplugin/src/main/java/aQute/bnd/properties/packageinfo
similarity index 100%
rename from bundleplugin/src/main/java/aQute/lib/properties/packageinfo
rename to bundleplugin/src/main/java/aQute/bnd/properties/packageinfo
diff --git a/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java b/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java
index e52ef24..1f3bfdc 100644
--- a/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java
+++ b/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java
@@ -5,12 +5,11 @@
 import java.util.Map.Entry;
 import java.util.jar.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
 import aQute.libg.generics.*;
-import aQute.libg.header.*;
-import aQute.libg.version.*;
 import aQute.service.reporter.*;
 
 public class EclipseRepo implements Plugin, RepositoryPlugin {
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/AnalyzerPlugin.java b/bundleplugin/src/main/java/aQute/bnd/service/AnalyzerPlugin.java
index 1a5b19a..9c3e51d 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/AnalyzerPlugin.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/AnalyzerPlugin.java
@@ -1,6 +1,6 @@
 package aQute.bnd.service;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 public interface AnalyzerPlugin {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/Deploy.java b/bundleplugin/src/main/java/aQute/bnd/service/Deploy.java
index c2f2b61..a8fc577 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/Deploy.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/Deploy.java
@@ -1,7 +1,7 @@
 package aQute.bnd.service;
 
 import aQute.bnd.build.*;
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 /**
  * Deploy this artifact to maven.
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/MakePlugin.java b/bundleplugin/src/main/java/aQute/bnd/service/MakePlugin.java
index 2e564e5..8541436 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/MakePlugin.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/MakePlugin.java
@@ -2,7 +2,7 @@
 
 import java.util.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 public interface MakePlugin {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/RepositoryListenerPlugin.java b/bundleplugin/src/main/java/aQute/bnd/service/RepositoryListenerPlugin.java
index 92238ab..abd24f4 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/RepositoryListenerPlugin.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/RepositoryListenerPlugin.java
@@ -2,7 +2,7 @@
 
 import java.io.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 public interface RepositoryListenerPlugin {
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java b/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java
index accda4f..769238c 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java
@@ -3,8 +3,7 @@
 import java.io.*;
 import java.util.*;
 
-import aQute.lib.osgi.*;
-import aQute.libg.version.*;
+import aQute.bnd.osgi.*;
 
 public interface RepositoryPlugin {
 	public enum Strategy {
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/SignerPlugin.java b/bundleplugin/src/main/java/aQute/bnd/service/SignerPlugin.java
index b503652..54b4e80 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/SignerPlugin.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/SignerPlugin.java
@@ -1,6 +1,6 @@
 package aQute.bnd.service;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 public interface SignerPlugin {
 	/**
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/diff/Differ.java b/bundleplugin/src/main/java/aQute/bnd/service/diff/Differ.java
index 6d60c82..151051b 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/diff/Differ.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/diff/Differ.java
@@ -1,6 +1,6 @@
 package aQute.bnd.service.diff;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 /**
  * Compare two Jars and report the differences.
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/diff/Type.java b/bundleplugin/src/main/java/aQute/bnd/service/diff/Type.java
index ec4c1b2..91b186c 100644
--- a/bundleplugin/src/main/java/aQute/bnd/service/diff/Type.java
+++ b/bundleplugin/src/main/java/aQute/bnd/service/diff/Type.java
@@ -1,7 +1,7 @@
 package aQute.bnd.service.diff;
 
 public enum Type {
-	ACCESS, BUNDLE, API, MANIFEST, PACKAGE, CLASS, INTERFACE, ANNOTATION, ENUM, EXTENDS, IMPLEMENTS, FIELD, METHOD, ANNOTATED, PROPERTY, RESOURCE, CUSTOM, CLAUSE, HEADER, PARAMETER, CLASS_VERSION, RESOURCES, CONSTANT, RETURN, VERSION, DEPRECATED, REPO, PROGRAM, REVISION;
+	ACCESS, BUNDLE, API, MANIFEST, PACKAGE, CLASS, INTERFACE, ANNOTATION, ENUM, EXTENDS, IMPLEMENTS, FIELD, METHOD, ANNOTATED, PROPERTY, RESOURCE, SHA, CUSTOM, CLAUSE, HEADER, PARAMETER, CLASS_VERSION, RESOURCES, CONSTANT, RETURN, VERSION, DEPRECATED, REPO, PROGRAM, REVISION;
 
 	public boolean isInherited() {
 		// TODO Auto-generated method stub
diff --git a/bundleplugin/src/main/java/aQute/bnd/signing/JartoolSigner.java b/bundleplugin/src/main/java/aQute/bnd/signing/JartoolSigner.java
index 346491f..fe317b8 100644
--- a/bundleplugin/src/main/java/aQute/bnd/signing/JartoolSigner.java
+++ b/bundleplugin/src/main/java/aQute/bnd/signing/JartoolSigner.java
@@ -5,8 +5,8 @@
 import java.util.Map.Entry;
 import java.util.concurrent.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
 import aQute.libg.command.*;
 import aQute.service.reporter.*;
 
diff --git a/bundleplugin/src/main/java/aQute/bnd/signing/Signer.java b/bundleplugin/src/main/java/aQute/bnd/signing/Signer.java
index f885d4d..1841a58 100644
--- a/bundleplugin/src/main/java/aQute/bnd/signing/Signer.java
+++ b/bundleplugin/src/main/java/aQute/bnd/signing/Signer.java
@@ -7,12 +7,12 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
+import aQute.bnd.osgi.*;
 import aQute.lib.base64.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
 
 /**
- * This class is used with the aQute.lib.osgi package, it signs jars with DSA
+ * This class is used with the aQute.bnd.osgi package, it signs jars with DSA
  * signature. -sign: md5, sha1
  */
 public class Signer extends Processor {
diff --git a/bundleplugin/src/main/java/aQute/lib/collections/MultiMap.java b/bundleplugin/src/main/java/aQute/lib/collections/MultiMap.java
index 21c1509..322a2e8 100644
--- a/bundleplugin/src/main/java/aQute/lib/collections/MultiMap.java
+++ b/bundleplugin/src/main/java/aQute/lib/collections/MultiMap.java
@@ -2,6 +2,7 @@
 
 import java.util.*;
 
+
 public class MultiMap<K, V> extends HashMap<K,List<V>> {
 	private static final long	serialVersionUID	= 1L;
 	final boolean				noduplicates;
@@ -22,6 +23,15 @@
 		this.valueClass = valueClass;
 	}
 
+	public MultiMap(MultiMap<K,V> other) {
+		keyClass = other.keyClass;
+		valueClass  = other.valueClass;
+		noduplicates = other.noduplicates;
+		for ( java.util.Map.Entry<K,List<V>> e : other.entrySet()) {
+			addAll(e.getKey(), e.getValue());
+		}
+	}
+
 	@SuppressWarnings("unchecked")
 	public boolean add(K key, V value) {
 		assert keyClass.isInstance(key);
@@ -57,7 +67,7 @@
 			boolean r = false;
 			for (V v : value) {
 				assert valueClass.isInstance(v);
-				if (!set.contains(value))
+				if (!set.contains(v))
 					r |= set.add(v);
 			}
 			return r;
diff --git a/bundleplugin/src/main/java/aQute/lib/converter/Converter.java b/bundleplugin/src/main/java/aQute/lib/converter/Converter.java
index 621b558..a227d71 100644
--- a/bundleplugin/src/main/java/aQute/lib/converter/Converter.java
+++ b/bundleplugin/src/main/java/aQute/lib/converter/Converter.java
@@ -38,8 +38,8 @@
 	public Object convert(Type type, Object o) throws Exception {
 		Class resultType = getRawClass(type);
 		if (o == null) {
-			if (resultType.isPrimitive()||  Number.class.isAssignableFrom(resultType)) 
-				return convert(type,0);
+			if (resultType.isPrimitive() || Number.class.isAssignableFrom(resultType))
+				return convert(type, 0);
 
 			return null; // compatible with any
 		}
@@ -231,27 +231,40 @@
 		}
 
 		if (o instanceof Map) {
+			String key = null;
 			try {
 				Map<Object,Object> map = (Map) o;
 				Object instance = resultType.newInstance();
 				for (Map.Entry e : map.entrySet()) {
-					String key = (String) e.getKey();
-					Field f = resultType.getField(key);
-					Object value = convert(f.getGenericType(), e.getValue());
-					f.set(instance, value);
+					key = (String) e.getKey();
+					try {
+						Field f = resultType.getField(key);
+						Object value = convert(f.getGenericType(), e.getValue());
+						f.set(instance, value);
+					}
+					catch (Exception ee) {
+						
+						// We cannot find the key, so try the __extra field
+						Field f = resultType.getField("__extra");
+						Map<String,Object> extra = (Map<String,Object>) f.get(instance);
+						if ( extra == null) {
+							extra = new HashMap<String,Object>();
+							f.set(instance, extra);
+						}
+						extra.put(key, convert(Object.class,e.getValue()));
+						
+					}
 				}
 				return instance;
 			}
 			catch (Exception e) {
-				// fall through
+				return error("No conversion found for " + o.getClass() + " to " + type + ", error " + e + " on key " + key);
 			}
 		}
 
 		return error("No conversion found for " + o.getClass() + " to " + type);
 	}
 
-
-
 	private Number number(Object o) {
 		if (o instanceof Number)
 			return (Number) o;
@@ -446,10 +459,10 @@
 
 			public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
 				Object o = properties.get(method.getName());
-				if ( o == null)
+				if (o == null)
 					o = properties.get(mangleMethodName(method.getName()));
 
-				return convert( method.getGenericReturnType(), o);
+				return convert(method.getGenericReturnType(), o);
 			}
 
 		});
@@ -471,4 +484,17 @@
 		}
 		return sb.toString();
 	}
+
+	public static <T> T cnv(TypeReference<T> tr, Object source) throws Exception {
+		return new Converter().convert(tr, source);
+	}
+
+	public static <T> T cnv(Class<T> tr, Object source) throws Exception {
+		return new Converter().convert(tr, source);
+	}
+
+	public static Object cnv(Type tr, Object source) throws Exception {
+		return new Converter().convert(tr, source);
+	}
+
 }
diff --git a/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java b/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java
index 9b01ff7..84c3c46 100644
--- a/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java
+++ b/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java
@@ -5,9 +5,8 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
-import aQute.lib.osgi.*;
-import aQute.libg.header.*;
-import aQute.libg.version.*;
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.service.reporter.*;
 
 public class FileInstallRepo extends FileRepo {
diff --git a/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java b/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
index 3703b8b..d34ef98 100644
--- a/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
+++ b/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
@@ -5,11 +5,10 @@
 import java.util.jar.*;
 import java.util.regex.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.lib.io.*;
-import aQute.lib.osgi.*;
-import aQute.libg.header.*;
-import aQute.libg.version.*;
 import aQute.service.reporter.*;
 
 public class FileRepo implements Plugin, RepositoryPlugin, Refreshable, RegistryPlugin {
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/AnalyzerMessages.java b/bundleplugin/src/main/java/aQute/lib/osgi/AnalyzerMessages.java
deleted file mode 100644
index a91a0f0..0000000
--- a/bundleplugin/src/main/java/aQute/lib/osgi/AnalyzerMessages.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package aQute.lib.osgi;
-
-import aQute.libg.reporter.*;
-
-public interface AnalyzerMessages extends Messages {
-/**/
-}
diff --git a/bundleplugin/src/main/java/aQute/lib/osgi/resource/Filters.java b/bundleplugin/src/main/java/aQute/lib/osgi/resource/Filters.java
deleted file mode 100644
index 20af48d..0000000
--- a/bundleplugin/src/main/java/aQute/lib/osgi/resource/Filters.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package aQute.lib.osgi.resource;
-
-import aQute.libg.filters.AndFilter;
-import aQute.libg.filters.Filter;
-import aQute.libg.filters.NotFilter;
-import aQute.libg.filters.Operator;
-import aQute.libg.filters.SimpleFilter;
-import aQute.libg.version.VersionRange;
-
-public class Filters {
-	
-	public static Filter fromVersionRange(VersionRange range) {
-		return fromVersionRange(range, "version");
-	}
-	
-	public static Filter fromVersionRange(VersionRange range, @SuppressWarnings("unused") String versionAttr) {
-		if (range == null)
-			return null;
-		
-		Filter left;
-		if (range.includeLow())
-			left = new SimpleFilter("version", Operator.GreaterThanOrEqual, range.getLow().toString());
-		else
-			left = new NotFilter(new SimpleFilter("version", Operator.LessThanOrEqual, range.getLow().toString()));
-		
-		Filter right;
-		if (!range.isRange())
-			right = null;
-		else if (range.includeHigh())
-			right = new SimpleFilter("version", Operator.LessThanOrEqual, range.getHigh().toString());
-		else
-			right = new NotFilter(new SimpleFilter("version", Operator.GreaterThanOrEqual, range.getHigh().toString()));
-		
-		Filter result;
-		if (right != null)
-			result = new AndFilter().addChild(left).addChild(right);
-		else
-			result = left;
-		
-		return result;
-	}
-}
diff --git a/bundleplugin/src/main/java/aQute/lib/spring/JPAComponent.java b/bundleplugin/src/main/java/aQute/lib/spring/JPAComponent.java
index 4fcbc34..2f08e10 100644
--- a/bundleplugin/src/main/java/aQute/lib/spring/JPAComponent.java
+++ b/bundleplugin/src/main/java/aQute/lib/spring/JPAComponent.java
@@ -2,7 +2,7 @@
 
 import java.util.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 /**
  * This component is called when we find a resource in the META-INF/*.xml
diff --git a/bundleplugin/src/main/java/aQute/lib/spring/SpringComponent.java b/bundleplugin/src/main/java/aQute/lib/spring/SpringComponent.java
index c8678a8..eff6ef4 100644
--- a/bundleplugin/src/main/java/aQute/lib/spring/SpringComponent.java
+++ b/bundleplugin/src/main/java/aQute/lib/spring/SpringComponent.java
@@ -8,10 +8,10 @@
 import javax.xml.transform.*;
 import javax.xml.transform.stream.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Descriptors.PackageRef;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Descriptors.PackageRef;
-import aQute.libg.header.*;
 
 /**
  * This component is called when we find a resource in the META-INF/*.xml
diff --git a/bundleplugin/src/main/java/aQute/lib/spring/SpringXMLType.java b/bundleplugin/src/main/java/aQute/lib/spring/SpringXMLType.java
index b4840d0..ae524d3 100644
--- a/bundleplugin/src/main/java/aQute/lib/spring/SpringXMLType.java
+++ b/bundleplugin/src/main/java/aQute/lib/spring/SpringXMLType.java
@@ -2,7 +2,7 @@
 
 import java.util.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 /**
  * This component is called when we find a resource in the META-INF/*.xml
diff --git a/bundleplugin/src/main/java/aQute/lib/spring/XMLType.java b/bundleplugin/src/main/java/aQute/lib/spring/XMLType.java
index 7d65d1c..d01fd57 100644
--- a/bundleplugin/src/main/java/aQute/lib/spring/XMLType.java
+++ b/bundleplugin/src/main/java/aQute/lib/spring/XMLType.java
@@ -8,8 +8,8 @@
 import javax.xml.transform.*;
 import javax.xml.transform.stream.*;
 
-import aQute.lib.osgi.*;
-import aQute.lib.osgi.Descriptors.PackageRef;
+import aQute.bnd.osgi.*;
+import aQute.bnd.osgi.Descriptors.PackageRef;
 
 public class XMLType {
 
diff --git a/bundleplugin/src/main/java/aQute/lib/spring/XMLTypeProcessor.java b/bundleplugin/src/main/java/aQute/lib/spring/XMLTypeProcessor.java
index dc17eb1..e8ca286 100644
--- a/bundleplugin/src/main/java/aQute/lib/spring/XMLTypeProcessor.java
+++ b/bundleplugin/src/main/java/aQute/lib/spring/XMLTypeProcessor.java
@@ -2,9 +2,9 @@
 
 import java.util.*;
 
+import aQute.bnd.header.*;
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
-import aQute.libg.header.*;
 
 public class XMLTypeProcessor implements AnalyzerPlugin {
 
diff --git a/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java b/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java
index 93d48ad..aeb4bbb 100644
--- a/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java
+++ b/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java
@@ -17,6 +17,10 @@
 		return digest;
 	}
 
+	public String asHex() {
+		return Hex.toHexString(digest());
+	}
+
 	@Override
 	public String toString() {
 		return String.format("%s(d=%s)", getAlgorithm(), Hex.toHexString(digest));
diff --git a/bundleplugin/src/main/java/aQute/libg/cryptography/MD5.java b/bundleplugin/src/main/java/aQute/libg/cryptography/MD5.java
index 05a6bdd..a1a5a0a 100644
--- a/bundleplugin/src/main/java/aQute/libg/cryptography/MD5.java
+++ b/bundleplugin/src/main/java/aQute/libg/cryptography/MD5.java
@@ -35,4 +35,7 @@
 		return ALGORITHM;
 	}
 
+	public static MD5 digest(byte [] data) throws Exception {
+		return getDigester().digest(data);
+	}
 }
\ No newline at end of file
diff --git a/bundleplugin/src/main/java/aQute/libg/cryptography/SHA1.java b/bundleplugin/src/main/java/aQute/libg/cryptography/SHA1.java
index d0a486c..c76f182 100644
--- a/bundleplugin/src/main/java/aQute/libg/cryptography/SHA1.java
+++ b/bundleplugin/src/main/java/aQute/libg/cryptography/SHA1.java
@@ -35,4 +35,7 @@
 		return ALGORITHM;
 	}
 
+	public static SHA1 digest(byte [] data) throws Exception {
+		return getDigester().digest(data);
+	}
 }
\ No newline at end of file
diff --git a/bundleplugin/src/main/java/aQute/libg/cryptography/SHA256.java b/bundleplugin/src/main/java/aQute/libg/cryptography/SHA256.java
index b6eeacc..743a431 100644
--- a/bundleplugin/src/main/java/aQute/libg/cryptography/SHA256.java
+++ b/bundleplugin/src/main/java/aQute/libg/cryptography/SHA256.java
@@ -35,4 +35,7 @@
 		return ALGORITHM;
 	}
 
+	public static SHA256 digest(byte [] data) throws Exception {
+		return getDigester().digest(data);
+	}
 }
\ No newline at end of file
diff --git a/bundleplugin/src/main/java/aQute/libg/filters/LiteralFilter.java b/bundleplugin/src/main/java/aQute/libg/filters/LiteralFilter.java
new file mode 100644
index 0000000..ca09228
--- /dev/null
+++ b/bundleplugin/src/main/java/aQute/libg/filters/LiteralFilter.java
@@ -0,0 +1,16 @@
+package aQute.libg.filters;
+
+public class LiteralFilter extends Filter {
+	
+	private String	filterString;
+
+	public LiteralFilter(String filterString) {
+		this.filterString = filterString;
+	}
+
+	@Override
+	public void append(StringBuilder builder) {
+		builder.append(filterString);
+	}
+
+}
diff --git a/bundleplugin/src/main/java/aQute/libg/reporter/ReporterAdapter.java b/bundleplugin/src/main/java/aQute/libg/reporter/ReporterAdapter.java
index 4ed2ff1..e08c569 100644
--- a/bundleplugin/src/main/java/aQute/libg/reporter/ReporterAdapter.java
+++ b/bundleplugin/src/main/java/aQute/libg/reporter/ReporterAdapter.java
@@ -10,7 +10,7 @@
 /**
  * Mainly used for testing where reporters are needed.
  */
-public class ReporterAdapter implements Reporter, Report {
+public class ReporterAdapter implements Reporter, Report, Runnable {
 	final List<String>	errors		= new ArrayList<String>();
 	final List<String>	warnings	= new ArrayList<String>();
 	final List<LocationImpl> locations = new ArrayList<LocationImpl>();
@@ -204,8 +204,9 @@
 			return true;
 
 		if (!missed.isEmpty())
-			error("Missed the following patterns in the warnings or errors: %s", missed);
+			System.err.println("Missed the following patterns in the warnings or errors: " + missed);
 
+		report(System.err);
 		return false;
 	}
 
@@ -258,4 +259,19 @@
 		return null;
 	}
 
+	/**
+	 * Handy routine that can be extended by subclasses
+	 * so they can run inside the context
+	 */
+	public void run() {
+		throw new UnsupportedOperationException("Must be implemented by subclass");
+	}
+
+	/**
+	 * Return a messages object bound to this adapter
+	 */
+	
+	public <T> T getMessages(Class<T> c) {
+		return ReporterMessages.base(this, c);
+	}
 }
diff --git a/bundleplugin/src/main/java/aQute/libg/reporter/ReporterMessages.java b/bundleplugin/src/main/java/aQute/libg/reporter/ReporterMessages.java
index 375dbc6..d2ca832 100644
--- a/bundleplugin/src/main/java/aQute/libg/reporter/ReporterMessages.java
+++ b/bundleplugin/src/main/java/aQute/libg/reporter/ReporterMessages.java
@@ -10,7 +10,7 @@
 
 public class ReporterMessages {
 
-	static class WARNINGImpl implements ERROR {
+	static class WARNINGImpl implements WARNING {
 		Reporter.SetLocation	loc;
 
 		public SetLocation file(String file) {
@@ -42,7 +42,7 @@
 		}
 	}
 
-	static class ERRORImpl extends WARNINGImpl implements WARNING {
+	static class ERRORImpl extends WARNINGImpl implements ERROR {
 		public ERRORImpl(SetLocation e) {
 			super(e);
 		}
diff --git a/bundleplugin/src/main/java/aQute/libg/version/packageinfo b/bundleplugin/src/main/java/aQute/libg/version/packageinfo
deleted file mode 100644
index b3d1f97..0000000
--- a/bundleplugin/src/main/java/aQute/libg/version/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.0.1