ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1145911 - /ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLWriter.java
Date Wed, 13 Jul 2011 08:52:57 GMT
Author: hibou
Date: Wed Jul 13 08:52:57 2011
New Revision: 1145911

URL: http://svn.apache.org/viewvc?rev=1145911&view=rev
Log:
IVY-1304:
 - make the buildobr Ant task generate OBR XML that is not compatible with Felix bundlerepository

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLWriter.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLWriter.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLWriter.java?rev=1145911&r1=1145910&r2=1145911&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLWriter.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/xml/OBRXMLWriter.java Wed Jul 13 08:52:57
2011
@@ -225,21 +225,29 @@ public class OBRXMLWriter {
         filter.append("(&");
         Version start = v.getStartVersion();
         if (start != null) {
-            filter.append("(version>");
             if (!v.isStartExclusive()) {
-                filter.append('=');
+                filter.append("(version>=");
+                filter.append(start.toString());
+                filter.append(')');
+            } else {
+                filter.append("(!");
+                filter.append("(version<=");
+                filter.append(start.toString());
+                filter.append("))");
             }
-            filter.append(start.toString());
-            filter.append(')');
         }
         Version end = v.getEndVersion();
         if (end != null) {
-            filter.append("(version<");
             if (!v.isEndExclusive()) {
-                filter.append('=');
+                filter.append("(version<=");
+                filter.append(end.toString());
+                filter.append(')');
+            } else {
+                filter.append("(!");
+                filter.append("(version>=");
+                filter.append(end.toString());
+                filter.append("))");
             }
-            filter.append(end.toString());
-            filter.append(')');
         }
     }
 



Mime
View raw message