You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2016/07/30 08:28:04 UTC

svn commit: r1754597 - in /sling/trunk/testing/org.apache.sling.testing.paxexam/src: main/java/org/apache/sling/testing/paxexam/ main/resources/templates/ test/java/org/apache/sling/testing/paxexam/

Author: olli
Date: Sat Jul 30 08:28:03 2016
New Revision: 1754597

URL: http://svn.apache.org/viewvc?rev=1754597&view=rev
Log:
SLING-5929 Provide Pax URL and Pax URL Classpath as Options for Pax Exam

Added:
    sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java
    sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java
Modified:
    sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java
    sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java
    sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingOptions.txt
    sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingVersionResolver.txt

Modified: sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java?rev=1754597&r1=1754596&r2=1754597&view=diff
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java (original)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java Sat Jul 30 08:28:03 2016
@@ -87,6 +87,23 @@ public class SlingOptions {
         );
     }
 
+    public static Option paxUrl() {
+        return composite(
+            mavenBundle().groupId("org.ops4j.pax.url").artifactId("pax-url-commons").version(versionResolver),
+            mavenBundle().groupId("org.ops4j.base").artifactId("ops4j-base-lang").version(versionResolver),
+            mavenBundle().groupId("org.ops4j.base").artifactId("ops4j-base-util-property").version(versionResolver),
+            mavenBundle().groupId("org.ops4j.pax.swissbox").artifactId("pax-swissbox-property").version(versionResolver),
+            config()
+        );
+    }
+
+    public static Option paxUrlClasspath() {
+        return composite(
+            mavenBundle().groupId("org.ops4j.pax.url").artifactId("pax-url-classpath").version(versionResolver),
+            paxUrl()
+        );
+    }
+
     public static Option sling() {
         return composite(
             config(),

Modified: sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java?rev=1754597&r1=1754596&r2=1754597&view=diff
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java (original)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java Sat Jul 30 08:28:03 2016
@@ -47,6 +47,11 @@ public class SlingVersionResolver implem
         versions.put("org.apache.felix:org.apache.felix.metatype", "1.1.2");
         versions.put("org.apache.felix:org.apache.felix.scr", "2.0.4");
         versions.put("org.apache.felix:org.apache.felix.webconsole", "4.2.16");
+        versions.put("org.ops4j.base:ops4j-base-lang", "1.5.0");
+        versions.put("org.ops4j.base:ops4j-base-util-property", "1.5.0");
+        versions.put("org.ops4j.pax.swissbox:pax-swissbox-property", "1.8.2");
+        versions.put("org.ops4j.pax.url:pax-url-classpath", "2.4.7");
+        versions.put("org.ops4j.pax.url:pax-url-commons", "2.4.7");
         versions.put("com.composum.sling.core:composum-sling-core-commons", "1.5.3");
         versions.put("com.composum.sling.core:composum-sling-core-console", "1.5.3");
         versions.put("com.composum.sling.core:composum-sling-core-jslibs", "1.5.3");

Modified: sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingOptions.txt
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingOptions.txt?rev=1754597&r1=1754596&r2=1754597&view=diff
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingOptions.txt (original)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingOptions.txt Sat Jul 30 08:28:03 2016
@@ -87,6 +87,23 @@ public class SlingOptions {
             http()
         );
     }
+
+    public static Option paxUrl() {
+        return composite(
+            mavenBundle().groupId("org.ops4j.pax.url").artifactId("pax-url-commons").version(versionResolver),
+            mavenBundle().groupId("org.ops4j.base").artifactId("ops4j-base-lang").version(versionResolver),
+            mavenBundle().groupId("org.ops4j.base").artifactId("ops4j-base-util-property").version(versionResolver),
+            mavenBundle().groupId("org.ops4j.pax.swissbox").artifactId("pax-swissbox-property").version(versionResolver),
+            config()
+        );
+    }
+
+    public static Option paxUrlClasspath() {
+        return composite(
+            mavenBundle().groupId("org.ops4j.pax.url").artifactId("pax-url-classpath").version(versionResolver),
+            paxUrl()
+        );
+    }
 [# th:each="feature : ${features}"]
     public static Option [(${feature.javaName})]() {
         return composite([# th:each="fc,fcsStatus : ${feature.getFeatures()}"]

Modified: sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingVersionResolver.txt
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingVersionResolver.txt?rev=1754597&r1=1754596&r2=1754597&view=diff
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingVersionResolver.txt (original)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/src/main/resources/templates/SlingVersionResolver.txt Sat Jul 30 08:28:03 2016
@@ -46,7 +46,12 @@ public class SlingVersionResolver implem
         versions.put("org.apache.felix:org.apache.felix.inventory", "1.0.4");
         versions.put("org.apache.felix:org.apache.felix.metatype", "1.1.2");
         versions.put("org.apache.felix:org.apache.felix.scr", "2.0.4");
-        versions.put("org.apache.felix:org.apache.felix.webconsole", "4.2.16");[# th:each="bundle : ${bundles}"]
+        versions.put("org.apache.felix:org.apache.felix.webconsole", "4.2.16");
+        versions.put("org.ops4j.base:ops4j-base-lang", "1.5.0");
+        versions.put("org.ops4j.base:ops4j-base-util-property", "1.5.0");
+        versions.put("org.ops4j.pax.swissbox:pax-swissbox-property", "1.8.2");
+        versions.put("org.ops4j.pax.url:pax-url-classpath", "2.4.7");
+        versions.put("org.ops4j.pax.url:pax-url-commons", "2.4.7");[# th:each="bundle : ${bundles}"]
         versions.put("[(${bundle.groupId})]:[(${bundle.artifactId})]", "[(${bundle.version})]");
 [/]    }
 

Added: sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java?rev=1754597&view=auto
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java (added)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java Sat Jul 30 08:28:03 2016
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.sling.testing.paxexam;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import static org.apache.sling.testing.paxexam.SlingOptions.paxUrlClasspath;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class SlingOptionsPaxUrlClasspathIT extends SlingOptionsTestSupport {
+
+    @Configuration
+    public Option[] configuration() {
+        return new Option[]{
+            baseConfiguration(),
+            paxUrlClasspath()
+        };
+    }
+
+    @Test
+    public void test() {
+    }
+
+}

Added: sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java?rev=1754597&view=auto
==============================================================================
--- sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java (added)
+++ sling/trunk/testing/org.apache.sling.testing.paxexam/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java Sat Jul 30 08:28:03 2016
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.sling.testing.paxexam;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import static org.apache.sling.testing.paxexam.SlingOptions.paxUrl;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class SlingOptionsPaxUrlIT extends SlingOptionsTestSupport {
+
+    @Configuration
+    public Option[] configuration() {
+        return new Option[]{
+            baseConfiguration(),
+            paxUrl()
+        };
+    }
+
+    @Test
+    public void test() {
+    }
+
+}