felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r1363322 - in /felix/trunk/bundleplugin/src/main/java/aQute: bnd/build/ bnd/build/model/ bnd/build/model/conversions/ bnd/component/ bnd/differ/ bnd/filerepo/ bnd/header/ bnd/make/component/ bnd/maven/ bnd/maven/support/ bnd/osgi/ bnd/osgi/...
Date Thu, 19 Jul 2012 13:11:21 GMT
Author: mcculls
Date: Thu Jul 19 13:11:20 2012
New Revision: 1363322

URL: http://svn.apache.org/viewvc?rev=1363322&view=rev
Log:
Sync with latest bnd code

Added:
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/Version.java   (with props)
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/VersionRange.java   (with props)
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/packageinfo
Removed:
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/LowerVersionMatchType.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/UpperVersionMatchType.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/VersionPolicy.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/conversions/packageinfo
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/TagResource.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Version.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/VersionRange.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/properties/PropertiesReader.java
    felix/trunk/bundleplugin/src/main/java/aQute/libg/reporter/Messages.java
Modified:
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/Project.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Attrs.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ComponentAnnotationReader.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/MavenRepository.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/PomFromManifest.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/maven/support/MavenRemoteRepository.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/properties/packageinfo
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/Project.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/Project.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/Project.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/Project.java Thu Jul 19 13:11:20
2012
@@ -16,6 +16,7 @@ import aQute.bnd.osgi.eclipse.*;
 import aQute.bnd.service.*;
 import aQute.bnd.service.RepositoryPlugin.Strategy;
 import aQute.bnd.service.action.*;
+import aQute.bnd.version.*;
 import aQute.lib.io.*;
 import aQute.libg.generics.*;
 import aQute.libg.reporter.*;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/ProjectMessages.java Thu Jul 19
13:11:20 2012
@@ -6,6 +6,7 @@ import java.util.*;
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.bnd.service.RepositoryPlugin.Strategy;
+import aQute.bnd.version.*;
 import aQute.service.reporter.*;
 
 public interface ProjectMessages extends Messages {

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/WorkspaceRepository.java Thu Jul
19 13:11:20 2012
@@ -6,6 +6,7 @@ import java.util.regex.*;
 
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
+import aQute.bnd.version.*;
 
 public class WorkspaceRepository implements RepositoryPlugin {
 	private final Workspace	workspace;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/build/model/BndEditModel.java Thu Jul
19 13:11:20 2012
@@ -12,6 +12,7 @@ import aQute.bnd.build.model.conversions
 import aQute.bnd.header.*;
 import aQute.bnd.osgi.*;
 import aQute.bnd.properties.*;
+import aQute.bnd.version.*;
 import aQute.libg.tuple.*;
 
 /**
@@ -26,9 +27,9 @@ public class BndEditModel {
 	public static final String										LINE_SEPARATOR				= " \\\n\t";
 	public static final String										LIST_SEPARATOR				= ",\\\n\t";
 
-	protected static final String									ISO_8859_1					= "ISO-8859-1";												//$NON-NLS-1$
+	private static final String									ISO_8859_1					= "ISO-8859-1";												//$NON-NLS-1$
 
-	protected static String[]										KNOWN_PROPERTIES			= new String[] {
+	private static String[]										KNOWN_PROPERTIES			= new String[] {
 			Constants.BUNDLE_SYMBOLICNAME, Constants.BUNDLE_VERSION, Constants.BUNDLE_ACTIVATOR,
 			Constants.EXPORT_PACKAGE, Constants.IMPORT_PACKAGE, aQute.bnd.osgi.Constants.PRIVATE_PACKAGE,
 			aQute.bnd.osgi.Constants.SOURCES,
@@ -46,8 +47,8 @@ public class BndEditModel {
 																										+ Constants.BUNDLE_VERSION
 																										+ "}";
 
-	protected final Map<String,Converter< ? extends Object,String>>	converters	
			= new HashMap<String,Converter< ? extends Object,String>>();
-	protected final Map<String,Converter<String, ? extends Object>>	formatters	
			= new HashMap<String,Converter<String, ? extends Object>>();
+	private final Map<String,Converter< ? extends Object,String>>	converters			
	= new HashMap<String,Converter< ? extends Object,String>>();
+	private final Map<String,Converter<String, ? extends Object>>	formatters			
	= new HashMap<String,Converter<String, ? extends Object>>();
 	// private final DataModelHelper obrModelHelper = new DataModelHelperImpl();
 
 	private final PropertyChangeSupport								propChangeSupport			= new PropertyChangeSupport(
@@ -60,7 +61,7 @@ public class BndEditModel {
 	private final Map<String,String>								changesToSave				= new HashMap<String,String>();
 
 	// CONVERTERS
-	protected Converter<List<VersionedClause>,String>				buildPathConverter			=
new ClauseListConverter<VersionedClause>(
+	private Converter<List<VersionedClause>,String>				buildPathConverter			= new
ClauseListConverter<VersionedClause>(
 																										new Converter<VersionedClause,Pair<String,Attrs>>()
{
 																											public VersionedClause convert(
 																													Pair<String,Attrs> input)
@@ -70,7 +71,7 @@ public class BndEditModel {
 																														input.getSecond());
 																											}
 																										});
-	protected Converter<List<VersionedClause>,String>				buildPackagesConverter
	= new ClauseListConverter<VersionedClause>(
+	private Converter<List<VersionedClause>,String>				buildPackagesConverter		=
new ClauseListConverter<VersionedClause>(
 																										new Converter<VersionedClause,Pair<String,Attrs>>()
{
 																											public VersionedClause convert(
 																													Pair<String,Attrs> input)
@@ -80,10 +81,10 @@ public class BndEditModel {
 																														input.getSecond());
 																											}
 																										});
-	protected Converter<List<VersionedClause>,String>				clauseListConverter			=
new ClauseListConverter<VersionedClause>(
+	private Converter<List<VersionedClause>,String>				clauseListConverter			= new
ClauseListConverter<VersionedClause>(
 																										new VersionedClauseConverter());
-	protected Converter<String,String>								stringConverter				= new NoopConverter<String>();
-	protected Converter<Boolean,String>								includedSourcesConverter	= new Converter<Boolean,String>()
{
+	private Converter<String,String>								stringConverter				= new NoopConverter<String>();
+	private Converter<Boolean,String>								includedSourcesConverter	= new Converter<Boolean,String>()
{
 																									public Boolean convert(
 																											String string)
 																											throws IllegalArgumentException {
@@ -91,18 +92,10 @@ public class BndEditModel {
 																												.valueOf(string);
 																									}
 																								};
-	protected Converter<VersionPolicy,String>						versionPolicyConverter		= new Converter<VersionPolicy,String>()
{
-																									public VersionPolicy convert(
-																											String string)
-																											throws IllegalArgumentException {
-																										return VersionPolicy
-																												.parse(string);
-																									}
-																								};
-	protected Converter<List<String>,String>						listConverter				= SimpleListConverter
+	private Converter<List<String>,String>						listConverter				= SimpleListConverter
 																										.create();
-	protected Converter<List<HeaderClause>,String>					headerClauseListConverter
= new HeaderClauseListConverter();
-	protected ClauseListConverter<ExportedPackage>					exportPackageConverter		= new ClauseListConverter<ExportedPackage>(
+	private Converter<List<HeaderClause>,String>					headerClauseListConverter	=
new HeaderClauseListConverter();
+	private ClauseListConverter<ExportedPackage>					exportPackageConverter		= new ClauseListConverter<ExportedPackage>(
 																										new Converter<ExportedPackage,Pair<String,Attrs>>()
{
 																											public ExportedPackage convert(
 																													Pair<String,Attrs> input) {
@@ -111,7 +104,7 @@ public class BndEditModel {
 																														input.getSecond());
 																											}
 																										});
-	protected Converter<List<ServiceComponent>,String>				serviceComponentConverter
= new ClauseListConverter<ServiceComponent>(
+	private Converter<List<ServiceComponent>,String>				serviceComponentConverter
= new ClauseListConverter<ServiceComponent>(
 																										new Converter<ServiceComponent,Pair<String,Attrs>>()
{
 																											public ServiceComponent convert(
 																													Pair<String,Attrs> input)
@@ -121,7 +114,7 @@ public class BndEditModel {
 																														input.getSecond());
 																											}
 																										});
-	protected Converter<List<ImportPattern>,String>					importPatternConverter	
= new ClauseListConverter<ImportPattern>(
+	private Converter<List<ImportPattern>,String>					importPatternConverter		=
new ClauseListConverter<ImportPattern>(
 																										new Converter<ImportPattern,Pair<String,Attrs>>() {
 																											public ImportPattern convert(
 																													Pair<String,Attrs> input)
@@ -132,38 +125,38 @@ public class BndEditModel {
 																											}
 																										});
 
-	protected Converter<Map<String,String>,String>					propertiesConverter			= new
PropertiesConverter();
+	private Converter<Map<String,String>,String>					propertiesConverter			= new
PropertiesConverter();
 	
-	protected Converter<List<Requirement>,String>					requirementListConverter	=
new RequirementListConverter();
-	protected Converter<EE,String>									eeConverter					= new EEConverter();
+	private Converter<List<Requirement>,String>					requirementListConverter	= new
RequirementListConverter();
+	private Converter<EE,String>									eeConverter					= new EEConverter();
 
 	// Converter<ResolveMode, String> resolveModeConverter =
 	// EnumConverter.create(ResolveMode.class, ResolveMode.manual);
 
 	// FORMATTERS
-	protected Converter<String,Object>								defaultFormatter			= new DefaultFormatter();
-	protected Converter<String,String>								newlineEscapeFormatter		= new NewlineEscapedStringFormatter();
-	protected Converter<String,Boolean>								defaultFalseBoolFormatter	= new DefaultBooleanFormatter(
+	private Converter<String,Object>								defaultFormatter			= new DefaultFormatter();
+	private Converter<String,String>								newlineEscapeFormatter		= new NewlineEscapedStringFormatter();
+	private Converter<String,Boolean>								defaultFalseBoolFormatter	= new DefaultBooleanFormatter(
 																										false);
-	protected Converter<String,Collection< ? >>						stringListFormatter			= new
CollectionFormatter<Object>(
+	private Converter<String,Collection< ? >>						stringListFormatter			= new CollectionFormatter<Object>(
 																										LIST_SEPARATOR,
 																										(String) null);
-	protected Converter<String,Collection< ? extends HeaderClause>>	headerClauseListFormatter
= new CollectionFormatter<HeaderClause>(
+	private Converter<String,Collection< ? extends HeaderClause>>	headerClauseListFormatter
= new CollectionFormatter<HeaderClause>(
 																										LIST_SEPARATOR,
 																										new HeaderClauseFormatter(),
 																										null);
-	protected Converter<String,Map<String,String>>					propertiesFormatter			= new
MapFormatter(
+	private Converter<String,Map<String,String>>					propertiesFormatter			= new
MapFormatter(
 																										LIST_SEPARATOR,
 																										new PropertiesEntryFormatter(),
 																										null);
 	
-	protected Converter<String,Collection< ? extends Requirement>>	requirementListFormatter
= new CollectionFormatter<Requirement>(
+	private Converter<String,Collection< ? extends Requirement>>	requirementListFormatter
= new CollectionFormatter<Requirement>(
 																										LIST_SEPARATOR,
 																										new RequirementFormatter(),
 																										null);
 
-	protected Converter<String,EE>									eeFormatter					= new EEFormatter();
-	Converter<String,Collection< ? extends String>>					runReposFormatter			= new
CollectionFormatter<String>(
+	private Converter<String,EE>									eeFormatter					= new EEFormatter();
+	private Converter<String,Collection< ? extends String>>			runReposFormatter
		= new CollectionFormatter<String>(
 																										LIST_SEPARATOR,
 																										aQute.bnd.osgi.Constants.EMPTY_HEADER);
 
@@ -267,7 +260,7 @@ public class BndEditModel {
 		}
 	}
 
-	protected static IRegion findEntry(IDocument document, String name) throws Exception {
+	private static IRegion findEntry(IDocument document, String name) throws Exception {
 		PropertiesLineReader reader = new PropertiesLineReader(document);
 		LineType type = reader.next();
 		while (type != LineType.eof) {
@@ -281,7 +274,7 @@ public class BndEditModel {
 		return null;
 	}
 
-	protected static void updateDocument(IDocument document, String name, String value) {
+	private static void updateDocument(IDocument document, String name, String value) {
 		String newEntry;
 		if (value != null) {
 			StringBuilder buffer = new StringBuilder();
@@ -642,7 +635,7 @@ public class BndEditModel {
     }
 
 
-	protected <R> R doGetObject(String name, Converter< ? extends R, ? super String>
converter) {
+	private <R> R doGetObject(String name, Converter< ? extends R, ? super String>
converter) {
 		R result;
 		if (objectProperties.containsKey(name)) {
 			R temp = (R) objectProperties.get(name);
@@ -659,7 +652,7 @@ public class BndEditModel {
 		return result;
 	}
 
-	protected <T> void doSetObject(String name, T oldValue, T newValue, Converter<String,
? super T> formatter) {
+	private <T> void doSetObject(String name, T oldValue, T newValue, Converter<String,
? super T> formatter) {
 		objectProperties.put(name, newValue);
 		changesToSave.put(name, formatter.convert(newValue));
 		propChangeSupport.firePropertyChange(name, oldValue, newValue);

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/AnnotationReader.java Thu Jul
19 13:11:20 2012
@@ -9,6 +9,7 @@ import org.osgi.service.component.annota
 import aQute.bnd.osgi.*;
 import aQute.bnd.osgi.Clazz.MethodDef;
 import aQute.bnd.osgi.Descriptors.TypeRef;
+import aQute.bnd.version.*;
 import aQute.lib.collections.*;
 
 /**
@@ -26,7 +27,7 @@ import aQute.lib.collections.*;
 public class AnnotationReader extends ClassDataCollector {
 	final static TypeRef[]		EMPTY					= new TypeRef[0];
 	final static Pattern		PROPERTY_PATTERN		= Pattern
-																.compile("\\s*([^=]+(\\s*:\\s*(Boolean|Byte|Char|Short|Integer|Long|Float|Double|String))?)\\s*=(.*)");
+																.compile("\\s*([^=\\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"
@@ -308,7 +309,11 @@ public class AnnotationReader extends Cl
 
 				if (m.matches()) {
 					String key = m.group(1);
-					String value = m.group(4);
+					String type = m.group(2);
+					if ( type != null)
+						key += ":" + type;
+					
+					String value = m.group(3);
 					component.property.add(key, value);
 				} else
 					throw new IllegalArgumentException("Malformed property '" + p + "' on component: " +
className);

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ComponentDef.java Thu Jul 19
13:11:20 2012
@@ -7,6 +7,7 @@ import org.osgi.service.component.annota
 
 import aQute.bnd.osgi.*;
 import aQute.bnd.osgi.Descriptors.TypeRef;
+import aQute.bnd.version.*;
 import aQute.lib.collections.*;
 import aQute.lib.tag.*;
 
@@ -183,6 +184,9 @@ class ComponentDef {
 			return v;
 
 		try {
+			if ( type.equals("Char"))
+				type = "Character";
+			
 			Class< ? > c = Class.forName("java.lang." + type);
 			if (c == String.class)
 				return v;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/component/ReferenceDef.java Thu Jul 19
13:11:20 2012
@@ -3,6 +3,7 @@ package aQute.bnd.component;
 import org.osgi.service.component.annotations.*;
 
 import aQute.bnd.osgi.*;
+import aQute.bnd.version.*;
 import aQute.lib.tag.*;
 
 /**

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/Baseline.java Thu Jul 19 13:11:20
2012
@@ -8,6 +8,7 @@ import aQute.bnd.header.*;
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.diff.*;
 import aQute.bnd.service.diff.Diff.Ignore;
+import aQute.bnd.version.*;
 import aQute.libg.generics.*;
 import aQute.service.reporter.*;
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/JavaElement.java Thu Jul 19 13:11:20
2012
@@ -17,9 +17,9 @@ 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.bnd.version.Version;
 import aQute.lib.collections.*;
 import aQute.libg.generics.*;
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/differ/RepositoryElement.java Thu Jul
19 13:11:20 2012
@@ -5,6 +5,7 @@ import java.util.*;
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
 import aQute.bnd.service.diff.*;
+import aQute.bnd.version.*;
 
 public class RepositoryElement {
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/filerepo/FileRepo.java Thu Jul 19 13:11:20
2012
@@ -5,6 +5,7 @@ import java.util.*;
 import java.util.regex.*;
 
 import aQute.bnd.osgi.*;
+import aQute.bnd.version.*;
 
 public class FileRepo {
 	File	root;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Attrs.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Attrs.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Attrs.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/header/Attrs.java Thu Jul 19 13:11:20
2012
@@ -4,6 +4,7 @@ import java.util.*;
 import java.util.regex.*;
 
 import aQute.bnd.osgi.*;
+import aQute.bnd.version.*;
 import aQute.lib.collections.*;
 
 public class Attrs implements Map<String,String> {

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=1363322&r1=1363321&r2=1363322&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
Thu Jul 19 13:11:20 2012
@@ -256,7 +256,7 @@ public class ComponentAnnotationReader e
 		return Modifier.isPublic(method.getAccess()) || Modifier.isProtected(method.getAccess());
 	}
 
-	static Pattern	PROPERTY_PATTERN	= Pattern.compile("\\s*([^=\\s])+\\s*=(.+)");
+	static Pattern	PROPERTY_PATTERN	= Pattern.compile("\\s*([^=\\s]+)\\s*=(.+)");
 
 	private void doProperties(aQute.bnd.osgi.Annotation annotation) {
 		Object[] properties = annotation.get(Component.PROPERTIES);

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=1363322&r1=1363321&r2=1363322&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
Thu Jul 19 13:11:20 2012
@@ -12,6 +12,7 @@ import aQute.bnd.osgi.*;
 import aQute.bnd.osgi.Clazz.QUERY;
 import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.bnd.service.*;
+import aQute.bnd.version.*;
 
 /**
  * This class is an analyzer plugin. It looks at the properties and tries to

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=1363322&r1=1363321&r2=1363322&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 Thu Jul 19
13:11:20 2012
@@ -6,6 +6,7 @@ import java.util.regex.*;
 
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
+import aQute.bnd.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=1363322&r1=1363321&r2=1363322&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 Thu Jul 19
13:11:20 2012
@@ -8,6 +8,7 @@ import java.util.regex.*;
 
 import aQute.bnd.header.*;
 import aQute.bnd.osgi.*;
+import aQute.bnd.version.*;
 import aQute.lib.io.*;
 import aQute.lib.tag.*;
 

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=1363322&r1=1363321&r2=1363322&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
Thu Jul 19 13:11:20 2012
@@ -6,6 +6,7 @@ import java.util.*;
 
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
+import aQute.bnd.version.*;
 import aQute.lib.io.*;
 import aQute.service.reporter.*;
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Analyzer.java Thu Jul 19 13:11:20
2012
@@ -35,6 +35,7 @@ import aQute.bnd.osgi.Descriptors.Descri
 import aQute.bnd.osgi.Descriptors.PackageRef;
 import aQute.bnd.osgi.Descriptors.TypeRef;
 import aQute.bnd.service.*;
+import aQute.bnd.version.Version;
 import aQute.lib.base64.*;
 import aQute.lib.collections.*;
 import aQute.lib.filter.*;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Builder.java Thu Jul 19 13:11:20
2012
@@ -117,6 +117,8 @@ public class Builder extends Analyzer {
 		dot.updateModified(lastModified(), "Last Modified Processor");
 		dot.setName(getBsn());
 
+		doDigests(dot);
+		
 		sign(dot);
 		doSaveManifest(dot);
 
@@ -138,7 +140,7 @@ public class Builder extends Analyzer {
 			return;
 		trace("digests %s", ps);
 		String[] digests = ps.keySet().toArray(new String[ps.size()]);
-		dot.calcChecksums(digests);
+		dot.setDigestAlgorithms(digests);
 	}
 
 	/**

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java Thu Jul 19 13:11:20
2012
@@ -7,6 +7,7 @@ import java.util.Map.Entry;
 import java.util.jar.*;
 
 import aQute.bnd.header.*;
+import aQute.bnd.version.*;
 import aQute.lib.converter.*;
 import aQute.service.reporter.*;
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Jar.java Thu Jul 19 13:11:20 2012
@@ -34,6 +34,7 @@ public class Jar implements Closeable {
 	boolean									nomanifest;
 	Compression								compression	= Compression.DEFLATE;
 	boolean									closed;
+	String[]								algorithms;
 
 	public Jar(String name) {
 		this.name = name;
@@ -241,6 +242,40 @@ public class Jar implements Closeable {
 
 	public void write(OutputStream out) throws Exception {
 		check();
+
+		if (!doNotTouchManifest && !nomanifest && algorithms != null) {
+
+			// ok, we have a request to create digests
+			// of the resources. Since we have to output
+			// the manifest first, we have a slight problem.
+			// We can also not make multiple passes over the resource
+			// because some resources are not idempotent and/or can
+			// take significant time. So we just copy the jar
+			// to a temporary file, read it in again, calculate
+			// the checksums and save.
+
+			String[] algs = algorithms;
+			algorithms = null;
+			try {
+				File f = File.createTempFile(getName(), ".jar");
+				System.out.println("Created tmp file " + f);
+				write(f);
+				Jar tmp = new Jar(f);
+				try {
+					tmp.calcChecksums(algorithms);
+					tmp.write(out);
+				}
+				finally {
+					f.delete();
+					tmp.close();
+				}
+			}
+			finally {
+				algorithms = algs;
+			}
+			return;
+		}
+
 		ZipOutputStream jout = nomanifest || doNotTouchManifest ? new ZipOutputStream(out) : new
JarOutputStream(out);
 
 		switch (compression) {
@@ -278,6 +313,7 @@ public class Jar implements Closeable {
 			return;
 
 		JarEntry ze = new JarEntry("META-INF/MANIFEST.MF");
+
 		jout.putNextEntry(ze);
 		writeManifest(jout);
 		jout.closeEntry();
@@ -810,4 +846,8 @@ public class Jar implements Closeable {
 			din.close();
 		}
 	}
+
+	public void setDigestAlgorithms(String[] algorithms) {
+		this.algorithms = algorithms;
+	}
 }

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Macro.java Thu Jul 19 13:11:20 2012
@@ -7,6 +7,7 @@ import java.text.*;
 import java.util.*;
 import java.util.regex.*;
 
+import aQute.bnd.version.*;
 import aQute.lib.collections.*;
 import aQute.lib.io.*;
 
@@ -230,7 +231,7 @@ public class Macro {
 				if (e.getCause() instanceof IllegalArgumentException) {
 					domain.error("%s, for cmd: %s, arguments; %s", e.getMessage(), method, Arrays.toString(args));
 				} else {
-					domain.warning("Exception in replace: " + e.getCause());
+					domain.warning("Exception in replace: %s", e.getCause());
 					e.getCause().printStackTrace();
 				}
 			}

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/resource/Filters.java Thu Jul 19
13:11:20 2012
@@ -3,6 +3,7 @@ package aQute.bnd.osgi.resource;
 import org.osgi.framework.namespace.*;
 
 import aQute.bnd.osgi.*;
+import aQute.bnd.version.*;
 import aQute.libg.filters.*;
 
 public class Filters {

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/properties/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/properties/packageinfo?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/properties/packageinfo (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/properties/packageinfo Thu Jul 19 13:11:20
2012
@@ -1 +1 @@
-version 1.0
\ No newline at end of file
+version 2.0
\ No newline at end of file

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/repo/eclipse/EclipseRepo.java Thu Jul
19 13:11:20 2012
@@ -8,6 +8,7 @@ import java.util.jar.*;
 import aQute.bnd.header.*;
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
+import aQute.bnd.version.*;
 import aQute.lib.io.*;
 import aQute.libg.generics.*;
 import aQute.service.reporter.*;

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/RepositoryPlugin.java Thu Jul
19 13:11:20 2012
@@ -4,6 +4,7 @@ import java.io.*;
 import java.util.*;
 
 import aQute.bnd.osgi.*;
+import aQute.bnd.version.*;
 
 public interface RepositoryPlugin {
 	public enum Strategy {

Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/Version.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/Version.java?rev=1363322&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/Version.java (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/Version.java Thu Jul 19 13:11:20
2012
@@ -0,0 +1,164 @@
+package aQute.bnd.version;
+
+import java.util.regex.*;
+
+public class Version implements Comparable<Version> {
+	final int					major;
+	final int					minor;
+	final int					micro;
+	final String				qualifier;
+	public final static String	VERSION_STRING	= "(\\d+)(\\.(\\d+)(\\.(\\d+)(\\.([-_\\da-zA-Z]+))?)?)?";
+	public final static Pattern	VERSION			= Pattern.compile(VERSION_STRING);
+	public final static Version	LOWEST			= new Version();
+	public final static Version	HIGHEST			= new Version(Integer.MAX_VALUE, Integer.MAX_VALUE,
Integer.MAX_VALUE,
+														"\uFFFF");
+
+	public static final Version	emptyVersion	= LOWEST;
+	public static final Version	ONE				= new Version(1, 0, 0);
+
+	public Version() {
+		this(0);
+	}
+
+	public Version(int major, int minor, int micro, String qualifier) {
+		this.major = major;
+		this.minor = minor;
+		this.micro = micro;
+		this.qualifier = qualifier;
+	}
+
+	public Version(int major, int minor, int micro) {
+		this(major, minor, micro, null);
+	}
+
+	public Version(int major, int minor) {
+		this(major, minor, 0, null);
+	}
+
+	public Version(int major) {
+		this(major, 0, 0, null);
+	}
+
+	public Version(String version) {
+		version = version.trim();
+		Matcher m = VERSION.matcher(version);
+		if (!m.matches())
+			throw new IllegalArgumentException("Invalid syntax for version: " + version);
+
+		major = Integer.parseInt(m.group(1));
+		if (m.group(3) != null)
+			minor = Integer.parseInt(m.group(3));
+		else
+			minor = 0;
+
+		if (m.group(5) != null)
+			micro = Integer.parseInt(m.group(5));
+		else
+			micro = 0;
+
+		qualifier = m.group(7);
+	}
+
+	public int getMajor() {
+		return major;
+	}
+
+	public int getMinor() {
+		return minor;
+	}
+
+	public int getMicro() {
+		return micro;
+	}
+
+	public String getQualifier() {
+		return qualifier;
+	}
+
+	public int compareTo(Version other) {
+		if (other == this)
+			return 0;
+
+		Version o = other;
+		if (major != o.major)
+			return major - o.major;
+
+		if (minor != o.minor)
+			return minor - o.minor;
+
+		if (micro != o.micro)
+			return micro - o.micro;
+
+		int c = 0;
+		if (qualifier != null)
+			c = 1;
+		if (o.qualifier != null)
+			c += 2;
+
+		switch (c) {
+			case 0 :
+				return 0;
+			case 1 :
+				return 1;
+			case 2 :
+				return -1;
+		}
+		return qualifier.compareTo(o.qualifier);
+	}
+
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(major);
+		sb.append(".");
+		sb.append(minor);
+		sb.append(".");
+		sb.append(micro);
+		if (qualifier != null) {
+			sb.append(".");
+			sb.append(qualifier);
+		}
+		return sb.toString();
+	}
+
+	public boolean equals(Object ot) {
+		if (!(ot instanceof Version))
+			return false;
+
+		return compareTo((Version) ot) == 0;
+	}
+
+	public int hashCode() {
+		return major * 97 ^ minor * 13 ^ micro + (qualifier == null ? 97 : qualifier.hashCode());
+	}
+
+	public int get(int i) {
+		switch (i) {
+			case 0 :
+				return major;
+			case 1 :
+				return minor;
+			case 2 :
+				return micro;
+			default :
+				throw new IllegalArgumentException("Version can only get 0 (major), 1 (minor), or 2 (micro)");
+		}
+	}
+
+	public static Version parseVersion(String version) {
+		if (version == null) {
+			return LOWEST;
+		}
+
+		version = version.trim();
+		if (version.length() == 0) {
+			return LOWEST;
+		}
+
+		return new Version(version);
+
+	}
+
+	public Version getWithoutQualifier() {
+		return new Version(major, minor, micro);
+	}
+}

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

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

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

Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/VersionRange.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/VersionRange.java?rev=1363322&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/VersionRange.java (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/VersionRange.java Thu Jul 19
13:11:20 2012
@@ -0,0 +1,93 @@
+package aQute.bnd.version;
+
+import java.util.*;
+import java.util.regex.*;
+
+public class VersionRange {
+	Version			high;
+	Version			low;
+	char			start	= '[';
+	char			end		= ']';
+
+	static Pattern	RANGE	= Pattern.compile("(\\(|\\[)\\s*(" + Version.VERSION_STRING + ")\\s*,\\s*("
+									+ Version.VERSION_STRING + ")\\s*(\\)|\\])");
+
+	public VersionRange(String string) {
+		string = string.trim();
+		Matcher m = RANGE.matcher(string);
+		if (m.matches()) {
+			start = m.group(1).charAt(0);
+			String v1 = m.group(2);
+			String v2 = m.group(10);
+			low = new Version(v1);
+			high = new Version(v2);
+			end = m.group(18).charAt(0);
+			if (low.compareTo(high) > 0)
+				throw new IllegalArgumentException("Low Range is higher than High Range: " + low + "-"
+ high);
+
+		} else
+			high = low = new Version(string);
+	}
+
+	public boolean isRange() {
+		return high != low;
+	}
+
+	public boolean includeLow() {
+		return start == '[';
+	}
+
+	public boolean includeHigh() {
+		return end == ']';
+	}
+
+	public String toString() {
+		if (high == low)
+			return high.toString();
+
+		StringBuilder sb = new StringBuilder();
+		sb.append(start);
+		sb.append(low);
+		sb.append(',');
+		sb.append(high);
+		sb.append(end);
+		return sb.toString();
+	}
+
+	public Version getLow() {
+		return low;
+	}
+
+	public Version getHigh() {
+		return high;
+	}
+
+	public boolean includes(Version v) {
+		if (!isRange()) {
+			return low.compareTo(v) <= 0;
+		}
+		if (includeLow()) {
+			if (v.compareTo(low) < 0)
+				return false;
+		} else if (v.compareTo(low) <= 0)
+			return false;
+
+		if (includeHigh()) {
+			if (v.compareTo(high) > 0)
+				return false;
+		} else if (v.compareTo(high) >= 0)
+			return false;
+
+		return true;
+	}
+
+	public Iterable<Version> filter(final Iterable<Version> versions) {
+		List<Version> list = new ArrayList<Version>();
+		for (Version v : versions) {
+			if (includes(v))
+				list.add(v);
+		}
+		return list;
+	}
+
+}
\ No newline at end of file

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

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

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

Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/packageinfo?rev=1363322&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/packageinfo (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/version/packageinfo Thu Jul 19 13:11:20
2012
@@ -0,0 +1 @@
+version 1.0

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileInstallRepo.java Thu Jul
19 13:11:20 2012
@@ -7,6 +7,7 @@ import java.util.regex.*;
 
 import aQute.bnd.header.*;
 import aQute.bnd.osgi.*;
+import aQute.bnd.version.*;
 import aQute.service.reporter.*;
 
 public class FileInstallRepo extends FileRepo {

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java?rev=1363322&r1=1363321&r2=1363322&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java Thu Jul 19 13:11:20
2012
@@ -8,6 +8,7 @@ import java.util.regex.*;
 import aQute.bnd.header.*;
 import aQute.bnd.osgi.*;
 import aQute.bnd.service.*;
+import aQute.bnd.version.*;
 import aQute.lib.io.*;
 import aQute.service.reporter.*;
 



Mime
View raw message