diff --git a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ExtractBindexInfo.java b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ExtractBindexInfo.java
index 6d0be6e..01cc719 100644
--- a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ExtractBindexInfo.java
+++ b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ExtractBindexInfo.java
@@ -33,7 +33,7 @@
 import org.osgi.impl.bundle.obr.resource.RepositoryImpl;
 import org.osgi.impl.bundle.obr.resource.RequirementImpl;
 import org.osgi.impl.bundle.obr.resource.ResourceImpl;
-import org.osgi.impl.bundle.obr.resource.VersionImpl;
+import org.osgi.impl.bundle.obr.resource.VersionRange;
 
 /**
  * this class is used to configure bindex and get information built by bindex about targeted bundle.
@@ -121,7 +121,7 @@
                         if (value instanceof Number) {
                             type = "number";
                         } else { 
-                            if (value.getClass() == VersionImpl.class) { type = "version"; }
+                            if (value.getClass() == VersionRange.class) { type = "version"; }
                         }
                         if (type != null) {
                             p.setT(type);
@@ -238,5 +238,17 @@
             return null;
         }
     }
+    
+    /**
+     * extract source from bindex information.
+     * @return bundle source
+     */
+    public String getId() {
+        if (m_resource.getId() != null) {
+            return m_resource.getId();
+        } else {
+            return null;
+        }
+    }
 
 }
diff --git a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrUpdate.java b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrUpdate.java
index 4809951..dd7f45a 100644
--- a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrUpdate.java
+++ b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ObrUpdate.java
@@ -100,11 +100,6 @@
     private Document m_repoDoc;
 
     /**
-     * used to determine the first free id.
-     */
-    private boolean[] m_idTab;
-
-    /**
      * first Node on repository descriptor tree.
      */
     private Node m_root;
@@ -143,8 +138,6 @@
         this.m_logger = log;
 
         this.m_userConfig = userConfig;
-        // init the tab
-        m_idTab = new boolean[0];
 
         m_resourceBundle = new ResourcesBundle(log);
 
@@ -153,7 +146,6 @@
         } else {
             this.m_repo = repoFilename;
         }
-        // System.err.println("Construct: "+repoFilename.getAbsoluteFilename());
     }
 
     /**
@@ -217,15 +209,7 @@
         if (!walkOnTree(m_root)) {
             // the correct resource node was not found, we must create it
             // we compute the new id
-            int id = -1;
-            for (int i = 1; i < m_idTab.length; i++) {
-                if (!m_idTab[i]) {
-                    id = i;
-                    break;
-                }
-            }
-            if (id == -1) { id = m_idTab.length; }
-
+            String id = m_resourceBundle.getId();
             searchRepository(m_root, id);
         }
 
@@ -263,7 +247,6 @@
         if (!fout.exists()) {
             // create the repository.xml
             try {
-
             	fout.createNewFile();
                 m_logger.info("Created "+fout.getAbsolutePath());
             } catch (IOException e) {
@@ -465,12 +448,12 @@
      * @param node Node on the xml file
      * @param id id of the bundle ressource
      */
-    private void searchRepository(Node node, int id) {
+    private void searchRepository(Node node, String id) {
         if (node.getNodeName().compareTo("repository") == 0) {
-            m_resourceBundle.setId(String.valueOf(id));
             node.appendChild(m_resourceBundle.getNode(m_repoDoc));
             return;
         } else {
+            System.out.println("Second branch...");
             NodeList list = node.getChildNodes();
             if (list.getLength() > 0) {
                 for (int i = 0; i < list.getLength(); i++) {
@@ -489,25 +472,10 @@
     private boolean resource(Node node) {
 
         // this part save all the id free if we need to add resource
-        int id = Integer.parseInt(node.getAttributes().getNamedItem("id").getNodeValue());
-        if (id >= m_idTab.length) {
-            // resize tab
-            boolean[] bt = new boolean[id + 1];
-            for (int i = 0; i < id + 1; i++) {
-                if (m_idTab.length > i && m_idTab[i]) {
-                    bt[i] = true;
-                } else {
-                    bt[i] = false;
-                }
-            }
-
-            m_idTab = bt;
-        }
-        m_idTab[id] = true;
-
+        String id = node.getAttributes().getNamedItem("id").getNodeValue();
         NamedNodeMap map = node.getAttributes();
 
-        if (m_resourceBundle.isSameBundleResource(map.getNamedItem("symbolicname").getNodeValue(), map.getNamedItem("presentationname").getNodeValue(), map.getNamedItem("version").getNodeValue())) {
+        if (m_resourceBundle.isSameBundleResource(map.getNamedItem("symbolicname").getNodeValue(), map.getNamedItem("version").getNodeValue())) {
             m_resourceBundle.setId(String.valueOf(id));
             node.getParentNode().replaceChild(m_resourceBundle.getNode(m_repoDoc), node);
             return true;
diff --git a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ResourcesBundle.java b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ResourcesBundle.java
index 5d006f1..f86fa44 100644
--- a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ResourcesBundle.java
+++ b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/ResourcesBundle.java
@@ -332,6 +332,10 @@
         } else {
             this.setVersion(project.getVersion());
         }
+        
+        if (ebi.getId() != null) {
+            this.setId(ebi.getId());
+        }
 
         if (ebi.getDescription() != null) {
             this.setDescription(ebi.getDescription());
@@ -427,7 +431,7 @@
      * @return false if an information is missing, else true
      */
     public boolean isValid() {
-        // we must verify require properties are present
+        // we must verify required properties are present
         return this.getPresentationName() != null 
             && this.getSymbolicName() != null
             && this.getVersion() != null 
@@ -436,18 +440,15 @@
     }
 
     /**
-     * test if this bundle has the same symbolicname, presentationname and version number.
+     * test if this bundle has the same symbolicname, and version number.
      * @param symbolicName symbolicName to compare with current bundle
      * @param presentationName presentationName to compare with current bundlde
      * @param version version to compare with current bundle
      * @return true if the information are the same, else false
      */
-    public boolean isSameBundleResource(String symbolicName, String presentationName, String version) {
+    public boolean isSameBundleResource(String symbolicName, String version) {
         if (this.isValid()) {
-            boolean result;
-            result = (symbolicName.compareTo(this.getSymbolicName()) == 0) && (version.compareTo(this.getVersion()) == 0) && (presentationName.compareTo(this.getPresentationName()) == 0);
-            return result;
-
+            return (symbolicName.compareTo(this.getSymbolicName()) == 0) && (version.compareTo(this.getVersion()) == 0);
         } else {
             return false;
         }
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/BundleInfo.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/BundleInfo.java
index 5da803b..2e68a9a 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/BundleInfo.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/BundleInfo.java
@@ -1,3 +1,20 @@
+/*
+ * $Id: BundleInfo.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.osgi.impl.bundle.obr.resource;
 
 import java.io.*;
@@ -11,7 +28,7 @@
  * Convert a bundle to a generic resource description and store its local
  * dependencies (like for example a license file in the JAR) in a zip file.
  * 
- * @version $Revision: 1.18 $
+ * @version $Revision: 44 $
  */
 public class BundleInfo {
 	Manifest	manifest;
@@ -191,8 +208,8 @@
 				ri.setComment("Import Service " + entry.getName());
 
 				// TODO the following is arbitrary
-				ri.setOptional(true);
-				ri.setMultiple(false);
+				ri.setOptional(false);
+				ri.setMultiple(true);
 				resource.addRequirement(ri);
 			}
 		}
@@ -326,22 +343,21 @@
 		filter.append("=");
 		filter.append(pack.getName());
 		filter.append(")");
-		VersionImpl version = pack.getVersion();
+		VersionRange version = pack.getVersion();
 		if (version != null) {
-			VersionRange range = version.getRange();
-			if (range != null) {
+			if ( version.isRange() ) {
 				filter.append("(version");
 				filter.append(">");
-				if (range.getIncludeMinimum())
+				if (version.includeLow())
 					filter.append("=");
-				filter.append(range.getMinimum());
+				filter.append(version.low);
 				filter.append(")");
 
 				filter.append("(version");
 				filter.append("<");
-				if (range.getIncludeMaximum())
+				if (version.includeHigh())
 					filter.append("=");
-				filter.append(range.getMaximum());
+				filter.append(version.high);
 				filter.append(")");
 			}
 			else {
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/CapabilityImpl.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/CapabilityImpl.java
index 34b0460..45d2d1b 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/CapabilityImpl.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/CapabilityImpl.java
@@ -1,3 +1,20 @@
+/*
+ * $Id: CapabilityImpl.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.osgi.impl.bundle.obr.resource;
 
 import java.util.*;
@@ -28,7 +45,7 @@
 				if ( "nummeric".equals(type))
 					v = new Long(value);
 				else if ( "version".equals(type))
-					v = new VersionImpl(value);
+					v = new VersionRange(value);
 				addProperty(name,v);
 			}
 			parser.next();
@@ -70,7 +87,7 @@
 				String type = null;
 				if (value instanceof Number )
 					type = "number";
-				else if (value.getClass() == VersionImpl.class)
+				else if (value.getClass() == VersionRange.class)
 					type = "version";
 				if (type != null)
 					p.addAttribute("t", type);
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/FilterImpl.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/FilterImpl.java
index d6fc637..bc12314 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/FilterImpl.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/FilterImpl.java
@@ -1,15 +1,21 @@
-/**
+/*
+ * $Id: FilterImpl.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
  * Copyright (c) 2000 Gatespace AB. All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
  *
- * Gatespace grants Open Services Gateway Initiative (OSGi) an irrevocable,
- * perpetual, non-exclusive, worldwide, paid-up right and license to
- * reproduce, display, perform, prepare and have prepared derivative works
- * based upon and distribute and sublicense this material and derivative
- * works thereof as set out in the OSGi MEMBER AGREEMENT as of January 24
- * 2000, for use in accordance with Section 2.2 of the BY-LAWS of the
- * OSGi MEMBER AGREEMENT.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.osgi.impl.bundle.obr.resource;
 
 import java.lang.reflect.*;
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Manifest.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Manifest.java
index 25b0e12..01c3f51 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Manifest.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Manifest.java
@@ -1,12 +1,28 @@
+/*
+ * $Id: Manifest.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.osgi.impl.bundle.obr.resource;
 
 import java.io.*;
 import java.util.*;
 
-import org.osgi.impl.bundle.obr.resource.VersionImpl;
-
 
 public class Manifest extends Hashtable {
+	static final long	serialVersionUID	= 1L;
 	List				imports;
 	List				exports;
 	ManifestEntry		name;
@@ -18,7 +34,7 @@
 	Vector				duplicates	= new Vector();
 	final static String	wordparts	= "~!@#$%^&*_:/?><.-+";
 	ManifestEntry		bsn;
-	VersionImpl			version;
+	VersionRange			version;
 	ManifestEntry		host;
 	List				require;
 
@@ -91,10 +107,10 @@
 				}
 				if (header.equals("bundle-version")) {
 					try {
-						version = new VersionImpl(value.trim());
+						version = new VersionRange(value.trim());
 					}
 					catch (Exception e) {
-						version = new VersionImpl("0");
+						version = new VersionRange("0");
 						System.err.println("Invalid version attr for: " + bsn
 								+ " value is " + value);
 					}
@@ -295,9 +311,9 @@
 			return null;
 	}
 
-	public VersionImpl getVersion() {
+	public VersionRange getVersion() {
 		if (version == null)
-			return new VersionImpl("0");
+			return new VersionRange("0");
 		return version;
 	}
 
@@ -305,12 +321,10 @@
 		ManifestEntry bsn = getBsn();
 
 		if (bsn == null) {
-			//nox if the symbolic name is not define in manifest fils, we take the 
-			//artefactId from the pom.xml file
-			/*String name = getValue("Bundle-Name");
+			String name = getValue("Bundle-Name");
 			if (name == null)
-				name = "Untitled-" + hashCode();*/
-			return null;
+				name = "Untitled-" + hashCode();
+			return name;
 		}
 		else
 			return bsn.getName();
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ManifestEntry.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ManifestEntry.java
index f26f22f..2dc3e69 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ManifestEntry.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ManifestEntry.java
@@ -1,13 +1,28 @@
+/*
+ * $Id: ManifestEntry.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.osgi.impl.bundle.obr.resource;
 
 import java.util.*;
 
-import org.osgi.impl.bundle.obr.resource.VersionImpl;
-
 
 public class ManifestEntry implements Comparable {
 	String		name;
-	VersionImpl	version;
+	VersionRange	version;
 	Map			attributes;
 	public Map	directives;
 	public Set	uses;
@@ -16,7 +31,7 @@
 		this.name = name;
 	}
 
-	public ManifestEntry(String name, VersionImpl version) {
+	public ManifestEntry(String name, VersionRange version) {
 		this.name = name;
 		this.version = version;
 	}
@@ -31,10 +46,10 @@
 		return name;
 	}
 
-	public VersionImpl getVersion() {
+	public VersionRange getVersion() {
 		if (version != null)
 			return version;
-		return new VersionImpl("0");
+		return new VersionRange("0");
 	}
 
 	/*
@@ -74,7 +89,7 @@
 				if (parameter.key.equalsIgnoreCase("version")
 						|| parameter.key
 								.equalsIgnoreCase("specification-version"))
-					this.version = new VersionImpl(parameter.value);
+					this.version = new VersionRange(parameter.value);
 				break;
 
 			case Parameter.DIRECTIVE :
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Parameter.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Parameter.java
index 1edfb7e..5038132 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Parameter.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Parameter.java
@@ -1,30 +1,20 @@
 /*
- * $Header: /cvshome/bundles/bundles.obr/src/bundles/obr/resource/Parameter.java,v 1.1 2006/07/27 10:31:02 pkriens Exp $
+ * $Id: Parameter.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
  * 
- * Copyright (c) The OSGi Alliance (2005). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
  * 
- * Implementation of certain elements of the OSGi Specification may be subject
- * to third party intellectual property rights, including without limitation,
- * patent rights (such a third party may or may not be a member of the OSGi
- * Alliance). The OSGi Alliance is not responsible and shall not be held
- * responsible in any manner for identifying or failing to identify any or all
- * such third party intellectual property rights.
- * 
- * This document and the information contained herein are provided on an "AS IS"
- * basis and THE OSGI ALLIANCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- * HEREIN WILL NOT INFRINGE ANY RIGHTS AND ANY IMPLIED WARRANTIES OF
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL THE
- * OSGI ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF
- * USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR
- * EXEMPLARY, INCIDENTIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN
- * CONNECTION WITH THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
- * 
- * All Company, brand and product names may be trademarks that are the sole
- * property of their respective owners. All rights reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.osgi.impl.bundle.obr.resource;
 
 class Parameter {
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RepositoryImpl.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RepositoryImpl.java
index 0c27962..bc6953b 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RepositoryImpl.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RepositoryImpl.java
@@ -1,28 +1,19 @@
 /*
- * $Header: /cvshome/bundles/bundles.obr/src/bundles/obr/resource/RepositoryImpl.java,v 1.11 2006/04/27 09:00:16 pkriens Exp $
+ * $Id: RepositoryImpl.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
  * 
- * Copyright (c) The OSGi Alliance (2005). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
  * 
- * Implementation of certain elements of the OSGi Specification may be subject
- * to third party intellectual property rights, including without limitation,
- * patent rights (such a third party may or may not be a member of the OSGi
- * Alliance). The OSGi Alliance is not responsible and shall not be held
- * responsible in any manner for identifying or failing to identify any or all
- * such third party intellectual property rights.
- * 
- * This document and the information contained herein are provided on an "AS IS"
- * basis and THE OSGI ALLIANCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- * HEREIN WILL NOT INFRINGE ANY RIGHTS AND ANY IMPLIED WARRANTIES OF
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL THE
- * OSGI ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF
- * USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR
- * EXEMPLARY, INCIDENTIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN
- * CONNECTION WITH THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
- * 
- * All Company, brand and product names may be trademarks that are the sole
- * property of their respective owners. All rights reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package org.osgi.impl.bundle.obr.resource;
@@ -33,16 +24,14 @@
 import java.util.zip.*;
 
 import org.kxml2.io.KXmlParser;
-import org.osgi.service.obr.Repository;
-import org.osgi.service.obr.Resource;
-
+import org.osgi.service.obr.*;
 import org.xmlpull.v1.*;
 
 /**
  * Implements the basic repository. A repository holds a set of resources.
  * 
  * 
- * @version $Revision: 1.11 $
+ * @version $Revision: 44 $
  */
 public class RepositoryImpl implements Repository {
 	transient Set			resources		= new HashSet();
@@ -184,10 +173,10 @@
 						sb.append(")");
 						String version = parser.getAttributeValue(null,
 								"specification-version");
-						VersionImpl v = new VersionImpl("0");
+						VersionRange v = new VersionRange("0");
 						if (version != null) {
 							sb.append("(version=");
-							sb.append(v= new VersionImpl(version));
+							sb.append(v= new VersionRange(version));
 							sb.append(")");
 						}
 						sb.append(")");
@@ -205,7 +194,7 @@
 						String version = parser.getAttributeValue(null,
 								"specification-version");
 						if (version != null) {
-							capability.addProperty("version", new VersionImpl(
+							capability.addProperty("version", new VersionRange(
 									version));
 						}
 						resource.addCapability(capability);
@@ -228,7 +217,7 @@
 							resource.setPresentationName(value);
 						}
 						else if (key.equals("bundle-version"))
-							resource.setVersion(new VersionImpl(value));
+							resource.setVersion(new VersionRange(value));
 						else {
 							resource.put(key, value);
 						}
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RequirementImpl.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RequirementImpl.java
index 97032a7..146618a 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RequirementImpl.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/RequirementImpl.java
@@ -1,3 +1,20 @@
+/*
+ * $Id: RequirementImpl.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.osgi.impl.bundle.obr.resource;
 
 import org.osgi.service.obr.*;
@@ -9,7 +26,7 @@
  * Implements the Requirement interface.
  * 
  * 
- * @version $Revision: 1.8 $
+ * @version $Revision: 44 $
  */
 public class RequirementImpl implements Requirement {
 	int		id;
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ResourceImpl.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ResourceImpl.java
index beedc0d..55cd298 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ResourceImpl.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/ResourceImpl.java
@@ -1,3 +1,20 @@
+/*
+ * $Id: ResourceImpl.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.osgi.impl.bundle.obr.resource;
 
 import java.io.File;
@@ -13,7 +30,7 @@
 	List			requirements	= new ArrayList();
 	URL				url;
 	String			symbolicName;
-	VersionImpl		version;
+	VersionRange		version;
 	List			categories		= new ArrayList();
 	long			size			= -1;
 	String			id;
@@ -23,13 +40,12 @@
 	String			presentationName;
 	File			file;
 
-	{
-		id = Integer.toString(ID++);
-	}
 
 	public ResourceImpl(RepositoryImpl repository, String name,
-			VersionImpl version) {
+			VersionRange version) {
 		this.version = version;
+		if ( version == null)
+			this.version = new VersionRange("0");
 		this.symbolicName = name;
 		this.repository = repository;
 	}
@@ -49,9 +65,9 @@
 			map.put(PRESENTATION_NAME, presentationName);
 		String v = parser.getAttributeValue(null, "version");
 		if (v == null)
-			setVersion(new VersionImpl("0"));
+			setVersion(new VersionRange("0"));
 		else
-			setVersion(new VersionImpl(v));
+			setVersion(new VersionRange(v));
 
 		setURL(toURL(parser.getAttributeValue(null, "uri")));
 
@@ -221,13 +237,13 @@
 
 	public Version getVersion() {
 		if (version == null)
-			version = new VersionImpl("0");
-		return version;
+			version = new VersionRange("0");
+		return version.low;
 	}
 
-	void setVersion(VersionImpl version) {
+	void setVersion(VersionRange version) {
 		if (version == null)
-			this.version = new VersionImpl("0");
+			this.version = new VersionRange("0");
 		else
 			this.version = version;
 	}
@@ -308,7 +324,9 @@
 		return Collections.unmodifiableMap(map);
 	}
 
-	public String getId() {
+	public synchronized String getId() {
+		if ( id == null )
+			id = symbolicName + "/" + version;
 		return id;
 	}
 
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/StringSet.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/StringSet.java
index d69958d..d2bbd5d 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/StringSet.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/StringSet.java
@@ -1,35 +1,28 @@
 /*
- * $Header: /cvshome/bundles/bundles.obr/src/bundles/obr/resource/StringSet.java,v 1.1 2006/01/03 16:22:46 pkriens Exp $
+ * $Id: StringSet.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
  * 
- * Copyright (c) The OSGi Alliance (2006). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
  * 
- * Implementation of certain elements of the OSGi Specification may be subject
- * to third party intellectual property rights, including without limitation,
- * patent rights (such a third party may or may not be a member of the OSGi
- * Alliance). The OSGi Alliance is not responsible and shall not be held
- * responsible in any manner for identifying or failing to identify any or all
- * such third party intellectual property rights.
- * 
- * This document and the information contained herein are provided on an "AS IS"
- * basis and THE OSGI ALLIANCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
- * HEREIN WILL NOT INFRINGE ANY RIGHTS AND ANY IMPLIED WARRANTIES OF
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL THE
- * OSGI ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF
- * USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR
- * EXEMPLARY, INCIDENTIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN
- * CONNECTION WITH THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
- * 
- * All Company, brand and product names may be trademarks that are the sole
- * property of their respective owners. All rights reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
+
 package org.osgi.impl.bundle.obr.resource;
 
 import java.util.*;
 
 public class StringSet extends HashSet {
+	static final long	serialVersionUID	= 1L;
 
 	public StringSet(String set) {
 		StringTokenizer st = new StringTokenizer(set, ",");
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Tag.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Tag.java
index e077969..3c1375f 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Tag.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/Tag.java
@@ -1,3 +1,20 @@
+/*
+ * $Id: Tag.java 44 2007-07-13 20:49:41Z hargrave@us.ibm.com $
+ * 
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.osgi.impl.bundle.obr.resource;
 
 import java.io.*;
@@ -267,7 +284,7 @@
 	 */
 	String escape(String s) {
 		if  ( s == null )
-			System.out.println("??");
+			return "?null?";
 		
 		StringBuffer sb = new StringBuffer();
 		for (int i = 0; i < s.length(); i++) {
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionImpl.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionImpl.java
deleted file mode 100644
index 8071166..0000000
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * $Header: /cvshome/bundles/bundles.obr/src/bundles/obr/resource/VersionImpl.java,v 1.3 2006/02/15 16:36:57 pkriens Exp $
- * 
- * Copyright (c) OSGi Alliance (2004, 2005). All Rights Reserved.
- * 
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this 
- * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.
- */
-
-package org.osgi.impl.bundle.obr.resource;
-
-import org.osgi.framework.Version;
-
-/**
- * Version identifier for bundles and packages.
- * 
- * <p>
- * Version identifiers have four components.
- * <ol>
- * <li>Major version. A non-negative integer.</li>
- * <li>Minor version. A non-negative integer.</li>
- * <li>Micro version. A non-negative integer.</li>
- * <li>Qualifier. A text string. See <code>Version(String)</code> for the
- * format of the qualifier string.</li>
- * </ol>
- * 
- * <p>
- * <code>Version</code> objects are immutable.
- * 
- * @version $Revision: 1.3 $
- * @since 1.3
- */
-
-public class VersionImpl extends Version {
-	VersionRange	range;
-
-	/**
-	 * Creates a version identifier from the specified numerical components.
-	 * 
-	 * <p>
-	 * The qualifier is set to the empty string.
-	 * 
-	 * @param major Major component of the version identifier.
-	 * @param minor Minor component of the version identifier.
-	 * @param micro Micro component of the version identifier.
-	 * @throws IllegalArgumentException If the numerical components are
-	 *         negative.
-	 */
-	public VersionImpl(int major, int minor, int micro) {
-		this(major, minor, micro, null);
-	}
-
-	/**
-	 * Creates a version identifier from the specifed components.
-	 * 
-	 * @param major Major component of the version identifier.
-	 * @param minor Minor component of the version identifier.
-	 * @param micro Micro component of the version identifier.
-	 * @param qualifier Qualifier component of the version identifier. If
-	 *        <code>null</code> is specified, then the qualifier will be set
-	 *        to the empty string.
-	 * @throws IllegalArgumentException If the numerical components are negative
-	 *         or the qualifier string is invalid.
-	 */
-	public VersionImpl(int major, int minor, int micro, String qualifier) {
-		super(major, minor, micro, qualifier);
-	}
-
-	// TODO Ugly!
-	public VersionImpl(String string) {
-		super(
-				string.indexOf("[") >= 0 || string.indexOf("(") >= 0 ? new VersionRange(
-						string).getMinimum().toString()
-						: string);
-		if ( string.indexOf("[") >= 0 || string.indexOf("(") >= 0 )
-			range = new VersionRange(string);
-	}
-
-	VersionRange getRange() {
-		return range;
-	}
-	/**
-	 * 	this	other		0		1		-1
-	 * 	
-	 * @param o
-	 * @return
-	 * @see org.osgi.framework.Version#compareTo(java.lang.Object)
-	 */
-	public int compareTo(Object o) {
-		if ( o instanceof VersionImpl ) {
-			VersionImpl	other = (VersionImpl) o;
-			int cs = 0;
-			if ( range != null )
-				cs++;
-			if ( other.range!=null)
-				cs+=2;
-			switch (cs ) {
-				case 0:	// V1 V2
-					return super.compareTo(other);
-					
-				case 1:	// R1 V2
-					return range.isIncluded(other) ? 0 : 1;
-					
-				case 2:	// V1 R2
-					return other.range.isIncluded(this) ? 0 : 1;
-	
-					// TODO experimental
-				case 3:	// R1 R2
-					return range.isIncluded(other.range.getMinimum()) && range.isIncluded(other.range.getMaximum()) ? 0 : 1;			
-			}
-			return -1;
-		} else {
-			return super.compareTo(o);
-		}
-	}
-
-	public boolean equals(Object other) {
-		return compareTo(other) == 0;
-	}
-}
\ No newline at end of file
diff --git a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java
index 820e5ce..920d67f 100644
--- a/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java
+++ b/maven-obr-plugin/src/main/java/org/osgi/impl/bundle/obr/resource/VersionRange.java
@@ -1,166 +1,119 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+/*
+ * $Id: VersionRange.java 45 2007-10-01 12:56:02Z peter.kriens@aqute.biz $
  * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
+ * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.osgi.impl.bundle.obr.resource;
 
-import org.osgi.framework.Version;
+import java.util.regex.*;
 
-/**
- * This class represents a version range.
- * @since 3.1
- */
-public class VersionRange {
-	private static final Version versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-	/**
-	 * An empty version
-	 */
-	public static final VersionRange emptyRange = new VersionRange(null);
+import org.osgi.framework.*;
 
-	private Version minVersion;
-	private boolean includeMin; 
-	private Version maxVersion;
-	private boolean includeMax;
+public class VersionRange implements Comparable {
+	Version high;
+	Version low;
+	char start = '[';
+	char end = ']';
 
-	/**
-	 * Constructs a VersionRange with the specified minVersion and maxVersion.
-	 * @param minVersion the minimum version of the range
-	 * @param maxVersion the maximum version of the range
-	 */
-	public VersionRange(Version minVersion, boolean includeMin, Version maxVersion, boolean includeMax) {
-		this.minVersion = minVersion;
-		this.includeMin = includeMin;
-		this.maxVersion = maxVersion;
-		this.includeMax = includeMax;
+	static String V = "[0-9]+(\\.[0-9]+(\\.[0-9]+(\\.[a-zA-Z0-9_-]+)?)?)?";
+	static Pattern RANGE = Pattern.compile("(\\(|\\[)(" + V + "),(" + V
+			+ ")(\\)|\\])");
+
+	public VersionRange(String string) {
+		string = string.trim();
+		Matcher m = RANGE.matcher(string);
+		if (m.matches()) {
+			start = m.group(1).charAt(0);
+			low = new Version(m.group(2));
+			high = new Version(m.group(6));
+			end = m.group(10).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);
 	}
 
-	/**
-	 * Constructs a VersionRange from the given versionRange String.
-	 * @param versionRange a version range String that specifies a range of
-	 * versions.
-	 */
-	public VersionRange(String versionRange) {
-		if (versionRange == null || versionRange.length() == 0) {
-			minVersion = Version.emptyVersion;
-			includeMin = true;
-			maxVersion = VersionRange.versionMax;
-			includeMax = true;
-			return;
-		}
-		versionRange = versionRange.trim();
-		if (versionRange.charAt(0) == '[' || versionRange.charAt(0) == '(') {
-			int comma = versionRange.indexOf(',');
-			if (comma < 0)
-				throw new IllegalArgumentException();
-			char last = versionRange.charAt(versionRange.length() - 1);
-			if (last != ']' && last != ')')
-				throw new IllegalArgumentException();
-
-			minVersion = Version.parseVersion(versionRange.substring(1, comma).trim());
-			includeMin = versionRange.charAt(0) == '[';
-			maxVersion = Version.parseVersion(versionRange.substring(comma + 1, versionRange.length() - 1).trim());
-			includeMax = last == ']';
-		} else {
-			minVersion = Version.parseVersion(versionRange.trim());
-			includeMin = true;
-			maxVersion = VersionRange.versionMax;
-			includeMax = true;
-		}
+	public boolean isRange() {
+		return high != low;
 	}
 
-	/**
-	 * Returns the minimum Version of this VersionRange
-	 * @return the minimum Version of this VersionRange
-	 */
-	public Version getMinimum() {
-		return minVersion;
+	public boolean includeLow() {
+		return start == '[';
 	}
 
-	/**
-	 * Indicates if the minimum version is included in the version range.
-	 * @return true if the minimum version is included in the version range;
-	 * otherwise false is returned
-	 */
-	public boolean getIncludeMinimum() {
-		return includeMin;
+	public boolean includeHigh() {
+		return end == ']';
 	}
 
-	/**
-	 * Returns the maximum Version of this VersionRange
-	 * @return the maximum Version of this VersionRange
-	 */
-	public Version getMaximum() {
-		return maxVersion;
+	public String toString() {
+		if (high == low)
+			return high.toString();
+
+		StringBuffer sb = new StringBuffer();
+		sb.append(start);
+		sb.append(low);
+		sb.append(',');
+		sb.append(high);
+		sb.append(end);
+		return sb.toString();
 	}
 
-	/**
-	 * Indicates if the maximum version is included in the version range.
-	 * @return true if the maximum version is included in the version range;
-	 * otherwise false is returned
-	 */
-	public boolean getIncludeMaximum() {
-		return includeMax;
-	}
-
-	/**
-	 * Returns whether the given version is included in this VersionRange.
-	 * This will depend on the minimum and maximum versions of this VersionRange
-	 * and the given version.
-	 * 
-	 * @param version a version to be tested for inclusion in this VersionRange. 
-	 * (may be <code>null</code>)
-	 * @return <code>true</code> if the version is include, 
-	 * <code>false</code> otherwise 
-	 */
-	public boolean isIncluded(Version version) {
-		Version minRequired = getMinimum();
-		if (minRequired == null)
-			return true;
-		if (version == null)
-			return false;
-		Version maxRequired = getMaximum() == null ? VersionRange.versionMax : getMaximum();
-		int minCheck = includeMin ? 0 : 1;
-		int maxCheck = includeMax ? 0 : -1;
-		return version.compareTo(minRequired) >= minCheck && version.compareTo(maxRequired) <= maxCheck;
-
-	}
-
-	public boolean equals(Object object) {
-		if (!(object instanceof VersionRange))
-			return false;
-		VersionRange vr = (VersionRange) object;
-		if (minVersion != null && vr.getMinimum() != null) {
-			if (minVersion.equals(vr.getMinimum()) && includeMin == vr.includeMin)
-				if (maxVersion != null && vr.getMaximum() != null) {
-					if (maxVersion.equals(vr.getMaximum()) && includeMax == vr.includeMax)
-						return true;
-				}
-				else
-					return maxVersion == vr.getMaximum();
-		}
-		else {
-			return minVersion == vr.getMinimum();
+	public boolean equals(Object other) {
+		if (other instanceof VersionRange) {
+			return compareTo(other)==0;
 		}
 		return false;
 	}
 
-	public String toString() {
-		if (minVersion == null)
-			return Version.emptyVersion.toString();
-		if (VersionRange.versionMax.equals(maxVersion))
-			return minVersion.toString();
-		StringBuffer result = new StringBuffer();
-		result.append(includeMin ? '[' : '(');
-		result.append(minVersion);
-		result.append(',');
-		result.append(maxVersion);
-		result.append(includeMax ? ']' : ')');
-		return result.toString();
+	public int hashCode() {
+		return low.hashCode() * high.hashCode();
 	}
-}
+
+	public int compareTo(Object other) {
+		VersionRange range = (VersionRange) other;
+		VersionRange a = this, b = range;
+		if (range.isRange()) {
+			a = range;
+			b = this;
+		} else {
+			if ( !isRange() )
+				return low.compareTo(range.high);
+		}
+		int l = a.low.compareTo(b.low);
+		boolean ll = false;
+		if (a.includeLow())
+			ll = l <= 0;
+		else
+			ll = l < 0;
+
+		if (!ll)
+			return -1;
+
+		int h = a.high.compareTo(b.high);
+		if (a.includeHigh())
+			ll = h >= 0;
+		else
+			ll = h > 0;
+
+		if (ll)
+			return 0;
+		else
+			return 1;
+	}
+}
\ No newline at end of file
