This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.testing.paxexam-0.0.2 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-paxexam.git
commit 75c0a68bf1ec236dd669ff522c993b483990c121 Author: Oliver Lietz <[email protected]> AuthorDate: Sat Jul 30 08:28:03 2016 +0000 SLING-5929 Provide Pax URL and Pax URL Classpath as Options for Pax Exam git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/org.apache.sling.testing.paxexam@1754597 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/sling/testing/paxexam/SlingOptions.java | 17 ++++++++ .../testing/paxexam/SlingVersionResolver.java | 5 +++ src/main/resources/templates/SlingOptions.txt | 17 ++++++++ .../resources/templates/SlingVersionResolver.txt | 7 +++- .../paxexam/SlingOptionsPaxUrlClasspathIT.java | 47 ++++++++++++++++++++++ .../testing/paxexam/SlingOptionsPaxUrlIT.java | 47 ++++++++++++++++++++++ 6 files changed, 139 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java b/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java index 773750f..ed6e98c 100644 --- a/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java +++ b/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java @@ -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(), diff --git a/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java b/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java index 9c0aafd..1b9cf33 100644 --- a/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java +++ b/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java @@ -47,6 +47,11 @@ public class SlingVersionResolver implements VersionResolver { 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"); diff --git a/src/main/resources/templates/SlingOptions.txt b/src/main/resources/templates/SlingOptions.txt index 8b63c21..5f70e91 100644 --- a/src/main/resources/templates/SlingOptions.txt +++ b/src/main/resources/templates/SlingOptions.txt @@ -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()}"] diff --git a/src/main/resources/templates/SlingVersionResolver.txt b/src/main/resources/templates/SlingVersionResolver.txt index 9d9fbae..04951f8 100644 --- a/src/main/resources/templates/SlingVersionResolver.txt +++ b/src/main/resources/templates/SlingVersionResolver.txt @@ -46,7 +46,12 @@ public class SlingVersionResolver implements VersionResolver { 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})]"); [/] } diff --git a/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java b/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java new file mode 100644 index 0000000..9f8746e --- /dev/null +++ b/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlClasspathIT.java @@ -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() { + } + +} diff --git a/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java b/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java new file mode 100644 index 0000000..364bae6 --- /dev/null +++ b/src/test/java/org/apache/sling/testing/paxexam/SlingOptionsPaxUrlIT.java @@ -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() { + } + +} -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
