felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r1362033 [2/10] - in /felix/trunk/bundleplugin/src: main/java/aQute/bnd/build/ main/java/aQute/bnd/build/model/ main/java/aQute/bnd/build/model/clauses/ main/java/aQute/bnd/build/model/conversions/ main/java/aQute/bnd/compatibility/ main/ja...
Date Mon, 16 Jul 2012 13:43:44 GMT
Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java?rev=1362033&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java Mon Jul 16 13:43:38
2012
@@ -0,0 +1,206 @@
+package aQute.bnd.header;
+
+import java.util.*;
+
+import aQute.lib.collections.*;
+import aQute.service.reporter.*;
+
+public class Parameters implements Map<String,Attrs> {
+	private LinkedHashMap<String,Attrs>	map;
+	static Map<String,Attrs>			EMPTY	= Collections.emptyMap();
+	String								error;
+
+	public Parameters() {}
+
+	public Parameters(String header) {
+		OSGiHeader.parseHeader(header, null, this);
+	}
+
+	public Parameters(String header, Reporter reporter) {
+		OSGiHeader.parseHeader(header, reporter, this);
+	}
+
+	public void clear() {
+		map.clear();
+	}
+
+	public boolean containsKey(final String name) {
+		if (map == null)
+			return false;
+
+		return map.containsKey(name);
+	}
+
+	@SuppressWarnings("cast")
+	@Deprecated
+	public boolean containsKey(Object name) {
+		assert name instanceof String;
+		if (map == null)
+			return false;
+
+		return map.containsKey((String) name);
+	}
+
+	public boolean containsValue(Attrs value) {
+		if (map == null)
+			return false;
+
+		return map.containsValue(value);
+	}
+
+	@SuppressWarnings("cast")
+	@Deprecated
+	public boolean containsValue(Object value) {
+		assert value instanceof Attrs;
+		if (map == null)
+			return false;
+
+		return map.containsValue((Attrs) value);
+	}
+
+	public Set<java.util.Map.Entry<String,Attrs>> entrySet() {
+		if (map == null)
+			return EMPTY.entrySet();
+
+		return map.entrySet();
+	}
+
+	@SuppressWarnings("cast")
+	@Deprecated
+	public Attrs get(Object key) {
+		assert key instanceof String;
+		if (map == null)
+			return null;
+
+		return map.get((String) key);
+	}
+
+	public Attrs get(String key) {
+		if (map == null)
+			return null;
+
+		return map.get(key);
+	}
+
+	public boolean isEmpty() {
+		return map == null || map.isEmpty();
+	}
+
+	public Set<String> keySet() {
+		if (map == null)
+			return EMPTY.keySet();
+
+		return map.keySet();
+	}
+
+	public Attrs put(String key, Attrs value) {
+		assert key != null;
+		assert value != null;
+
+		if (map == null)
+			map = new LinkedHashMap<String,Attrs>();
+
+		return map.put(key, value);
+	}
+
+	public void putAll(Map< ? extends String, ? extends Attrs> map) {
+		if (this.map == null) {
+			if (map.isEmpty())
+				return;
+			this.map = new LinkedHashMap<String,Attrs>();
+		}
+		this.map.putAll(map);
+	}
+
+	public void putAllIfAbsent(Map<String, ? extends Attrs> map) {
+		for (Map.Entry<String, ? extends Attrs> entry : map.entrySet()) {
+			if (!containsKey(entry.getKey()))
+				put(entry.getKey(), entry.getValue());
+		}
+	}
+
+	@SuppressWarnings("cast")
+	@Deprecated
+	public Attrs remove(Object var0) {
+		assert var0 instanceof String;
+		if (map == null)
+			return null;
+
+		return map.remove((String) var0);
+	}
+
+	public Attrs remove(String var0) {
+		if (map == null)
+			return null;
+		return map.remove(var0);
+	}
+
+	public int size() {
+		if (map == null)
+			return 0;
+		return map.size();
+	}
+
+	public Collection<Attrs> values() {
+		if (map == null)
+			return EMPTY.values();
+
+		return map.values();
+	}
+
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		append(sb);
+		return sb.toString();
+	}
+
+	public void append(StringBuilder sb) {
+		String del = "";
+		for (Map.Entry<String,Attrs> s : entrySet()) {
+			sb.append(del);
+			sb.append(s.getKey());
+			if (!s.getValue().isEmpty()) {
+				sb.append(';');
+				s.getValue().append(sb);
+			}
+
+			del = ",";
+		}
+	}
+
+	@Deprecated
+	public boolean equals(Object other) {
+		return super.equals(other);
+	}
+
+	@Deprecated
+	public int hashCode() {
+		return super.hashCode();
+	}
+
+	public boolean isEqual(Parameters other) {
+		if (this == other)
+			return true;
+
+		if (size() != other.size())
+			return false;
+
+		if (isEmpty())
+			return true;
+
+		SortedList<String> l = new SortedList<String>(keySet());
+		SortedList<String> lo = new SortedList<String>(other.keySet());
+		if (!l.isEqual(lo))
+			return false;
+
+		for (String key : keySet()) {
+			if (!get(key).isEqual(other.get(key)))
+				return false;
+		}
+		return true;
+	}
+
+	public Map<String, ? extends Map<String,String>> asMapMap() {
+		return this;
+	}
+}

Propchange: felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Parameters.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/packageinfo?rev=1362033&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/packageinfo (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/packageinfo Mon Jul 16 13:43:38
2012
@@ -0,0 +1 @@
+version 1.1.0

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/help/Syntax.java Mon Jul 16 13:43:38
2012
@@ -3,7 +3,7 @@ package aQute.bnd.help;
 import java.util.*;
 import java.util.regex.*;
 
-import aQute.lib.osgi.*;
+import aQute.bnd.osgi.*;
 
 public class Syntax implements Constants {
 	final String							header;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/Make.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/Make.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/Make.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/Make.java Mon Jul 16 13:43:38 2012
@@ -4,9 +4,9 @@ import java.util.*;
 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;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java Mon Jul 16 13:43:38
2012
@@ -5,8 +5,8 @@ import java.util.*;
 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)");

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java Mon Jul 16 13:43:38
2012
@@ -4,8 +4,8 @@ import java.io.*;
 import java.net.*;
 import java.util.*;
 
+import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
-import aQute.lib.osgi.*;
 
 public class MakeCopy implements MakePlugin {
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/calltree/CalltreeResource.java Mon
Jul 16 13:43:38 2012
@@ -4,8 +4,8 @@ import java.io.*;
 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:

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java
Mon Jul 16 13:43:38 2012
@@ -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 @@ public class ComponentAnnotationReader e
 		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));

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
Mon Jul 16 13:43:38 2012
@@ -6,13 +6,12 @@ import java.util.Map.Entry;
 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

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/Coverage.java Mon Jul 16
13:43:38 2012
@@ -3,9 +3,9 @@ package aQute.bnd.make.coverage;
 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

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/coverage/CoverageResource.java Mon
Jul 16 13:43:38 2012
@@ -5,8 +5,8 @@ import static aQute.bnd.make.coverage.Co
 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.*;
 
 /**

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetaTypeReader.java Mon
Jul 16 13:43:38 2012
@@ -5,9 +5,9 @@ import java.util.*;
 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.*;
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/metatype/MetatypePlugin.java Mon
Jul 16 13:43:38 2012
@@ -3,10 +3,10 @@ package aQute.bnd.make.metatype;
 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

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenCommand.java Mon Jul 16 13:43:38
2012
@@ -8,15 +8,15 @@ import java.util.concurrent.*;
 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();

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeploy.java Mon Jul 16 13:43:38
2012
@@ -5,10 +5,10 @@ import java.util.*;
 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 {

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenDeployCmd.java Mon Jul 16
13:43:38 2012
@@ -5,9 +5,9 @@ import java.util.*;
 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 {

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java Mon Jul 16
13:43:38 2012
@@ -4,9 +4,8 @@ import java.io.*;
 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 {

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java Mon Jul 16
13:43:38 2012
@@ -6,11 +6,10 @@ import java.util.Map.Entry;
 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;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomParser.java Mon Jul 16 13:43:38
2012
@@ -8,8 +8,8 @@ import javax.xml.xpath.*;
 
 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

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomResource.java Mon Jul 16 13:43:38
2012
@@ -6,10 +6,10 @@ import java.util.Map.Entry;
 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;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java?rev=1362033&r1=1362032&r2=1362033&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
Mon Jul 16 13:43:38 2012
@@ -4,10 +4,9 @@ import java.io.*;
 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 {

Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/About.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/About.java?rev=1362033&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/About.java (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/About.java Mon Jul 16 13:43:38 2012
@@ -0,0 +1,39 @@
+package aQute.bnd.osgi;
+
+import aQute.bnd.header.*;
+
+/**
+ * This package contains a number of classes that assists by analyzing JARs and
+ * constructing bundles. The Analyzer class can be used to analyze an existing
+ * bundle and can create a manifest specification from proposed (wildcard)
+ * Export-Package, Bundle-Includes, and Import-Package headers. The Builder
+ * class can use the headers to construct a JAR from the classpath. The Verifier
+ * class can take an existing JAR and verify that all headers are correctly set.
+ * It will verify the syntax of the headers, match it against the proper
+ * contents, and verify imports and exports. A number of utility classes are
+ * available. Jar, provides an abstraction of a Jar file. It has constructors
+ * for creating a Jar from a stream, a directory, or a jar file. A Jar, keeps a
+ * collection Resource's. There are Resource implementations for File, from
+ * ZipFile, or from a stream (which copies the data). The Jar tries to minimize
+ * the work during build up so that it is cheap to use. The Resource's can be
+ * used to iterate over the names and later read the resources when needed.
+ * Clazz, provides a parser for the class files. This will be used to define the
+ * imports and exports. Headers are translated to {@link Parameters} that
+ * contains all headers (the order is maintained). The attribute of each header
+ * are maintained in an {@link Attrs}. Each additional file in a header
+ * definition will have its own entry (only native code does not work this way).
+ * The ':' of directives is considered part of the name. This allows attributes
+ * and directives to be maintained in the Attributes map. An important aspect of
+ * the specification is to allow the use of wildcards. Wildcards select from a
+ * set and can decorate the entries with new attributes. This functionality is
+ * implemented in Instructions. Much of the information calculated is in
+ * packages. A package is identified by a PackageRef (and a type by a TypeRef).
+ * The namespace is maintained by {@link Descriptors}, which here is owned by
+ * {@link Analyzer}. A special class, {@link Packages} maintains the attributes
+ * that are found in the code.
+ * 
+ * @version $Revision$
+ */
+public class About {
+	// Empty
+}

Propchange: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/About.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/About.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/About.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java?rev=1362033&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java Mon Jul 16
13:43:38 2012
@@ -0,0 +1,56 @@
+package aQute.bnd.osgi;
+
+import java.io.*;
+
+public abstract class AbstractResource implements Resource {
+	String	extra;
+	byte[]	calculated;
+	long	lastModified;
+
+	protected AbstractResource(long modified) {
+		lastModified = modified;
+	}
+
+	public String getExtra() {
+		return extra;
+	}
+
+	public long lastModified() {
+		return lastModified;
+	}
+
+	public InputStream openInputStream() throws IOException {
+		return new ByteArrayInputStream(getLocalBytes());
+	}
+
+	private byte[] getLocalBytes() throws IOException {
+		try {
+			if (calculated != null)
+				return calculated;
+
+			return calculated = getBytes();
+		}
+		catch (IOException e) {
+			throw e;
+		}
+		catch (Exception e) {
+			IOException ee = new IOException("Opening resource");
+			ee.initCause(e);
+			throw ee;
+		}
+	}
+
+	public void setExtra(String extra) {
+		this.extra = extra;
+	}
+
+	public void write(OutputStream out) throws IOException {
+		out.write(getLocalBytes());
+	}
+
+	abstract protected byte[] getBytes() throws Exception;
+
+	public long size() throws IOException {
+		return getLocalBytes().length;
+	}
+}

Propchange: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/AbstractResource.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message