camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1162080 - /camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
Date Fri, 26 Aug 2011 12:23:46 GMT
Author: ningjiang
Date: Fri Aug 26 12:23:46 2011
New Revision: 1162080

URL: http://svn.apache.org/viewvc?rev=1162080&view=rev
Log:
support to set the version of apache-camel feature in OSGi test support

Modified:
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java?rev=1162080&r1=1162079&r2=1162080&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
Fri Aug 26 12:23:46 2011
@@ -23,6 +23,7 @@ import org.apache.karaf.testing.Helper;
 import org.ops4j.pax.exam.Inject;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
 import org.ops4j.pax.exam.options.UrlReference;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -69,10 +70,18 @@ public class OSGiIntegrationTestSupport 
     }
     
     public static UrlReference getCamelKarafFeatureUrl() {
-        
+        return getCamelKarafFeatureUrl(null);
+    }
+
+    public static UrlReference getCamelKarafFeatureUrl(String version) {
+
         String type = "xml/features";
-        return mavenBundle().groupId("org.apache.camel.karaf").
-            artifactId("apache-camel").versionAsInProject().type(type);
+        MavenArtifactProvisionOption mavenOption = mavenBundle().groupId("org.apache.camel.karaf").artifactId("apache-camel");
+        if (version == null) {
+            return mavenOption.versionAsInProject().type(type);
+        } else {
+            return mavenOption.version(version).type(type);
+        }
     }
     
     public static UrlReference getKarafFeatureUrl() {



Mime
View raw message