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 2018/01/02 10:28:00 UTC
[sling-org-apache-sling-testing-paxexam] 01/02: SLING-7340 Provide
Tinybundles Option
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-paxexam.git
commit 16b194fd2345fd3ca3d5b138bbbbb3dfaef3742a
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jan 2 11:15:21 2018 +0100
SLING-7340 Provide Tinybundles Option
---
pom.xml | 8 ++++
.../apache/sling/testing/paxexam/SlingOptions.java | 7 ++++
.../testing/paxexam/SlingVersionResolver.java | 2 +
src/main/resources/templates/SlingOptions.txt | 7 ++++
.../resources/templates/SlingVersionResolver.txt | 4 +-
.../it/tests/SlingOptionsPaxTinybundlesIT.java | 48 ++++++++++++++++++++++
6 files changed, 75 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index fbf394b..076f691 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,7 @@
<Import-Package>
org.osgi.service.cm.*;resolution:=optional,
org.ops4j.pax.exam.cm.*;resolution:=optional,
+ org.ops4j.pax.tinybundles.*;resolution:=optional,
*
</Import-Package>
</instructions>
@@ -113,6 +114,13 @@
<version>5.6.10</version>
<scope>test</scope>
</dependency>
+ <!-- OPS4J Pax -->
+ <dependency>
+ <groupId>org.ops4j.pax.tinybundles</groupId>
+ <artifactId>tinybundles</artifactId>
+ <version>3.0.0</version>
+ <scope>provided</scope>
+ </dependency>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
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 73c52a1..75279ee 100644
--- a/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java
+++ b/src/main/java/org/apache/sling/testing/paxexam/SlingOptions.java
@@ -106,6 +106,13 @@ public class SlingOptions {
);
}
+ public static Option paxTinybundles() {
+ return composite(
+ mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").version(versionResolver),
+ mavenBundle().groupId("biz.aQute.bnd").artifactId("biz.aQute.bndlib").version(versionResolver)
+ );
+ }
+
public static Option logback() {
final String filename = String.format("file:%s/src/test/resources/logback.xml", PathUtils.getBaseDir());
return composite(
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 eb21841..40fc3e1 100644
--- a/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java
+++ b/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java
@@ -55,10 +55,12 @@ public class SlingVersionResolver implements VersionResolver {
versions.put("org.ops4j.pax.swissbox:pax-swissbox-property", "1.8.3");
versions.put("org.ops4j.pax.url:pax-url-classpath", "2.5.4");
versions.put("org.ops4j.pax.url:pax-url-commons", "2.5.4");
+ versions.put("org.ops4j.pax.tinybundles:tinybundles", "3.0.0");
versions.put("org.slf4j:slf4j-api", "1.7.25");
versions.put("org.slf4j:jcl-over-slf4j", "1.7.25");
versions.put("ch.qos.logback:logback-core", "1.2.3");
versions.put("ch.qos.logback:logback-classic", "1.2.3");
+ versions.put("biz.aQute.bnd:biz.aQute.bndlib", "3.5.0");
versions.put("com.composum.sling.core:composum-sling-core-commons", "1.8.2");
versions.put("com.composum.sling.core:composum-sling-core-console", "1.8.2");
versions.put("com.composum.sling.core:composum-sling-core-jslibs", "1.8.2");
diff --git a/src/main/resources/templates/SlingOptions.txt b/src/main/resources/templates/SlingOptions.txt
index 411cadb..e4e1154 100644
--- a/src/main/resources/templates/SlingOptions.txt
+++ b/src/main/resources/templates/SlingOptions.txt
@@ -106,6 +106,13 @@ public class SlingOptions {
);
}
+ public static Option paxTinybundles() {
+ return composite(
+ mavenBundle().groupId("org.ops4j.pax.tinybundles").artifactId("tinybundles").version(versionResolver),
+ mavenBundle().groupId("biz.aQute.bnd").artifactId("biz.aQute.bndlib").version(versionResolver)
+ );
+ }
+
public static Option logback() {
final String filename = String.format("file:%s/src/test/resources/logback.xml", PathUtils.getBaseDir());
return composite(
diff --git a/src/main/resources/templates/SlingVersionResolver.txt b/src/main/resources/templates/SlingVersionResolver.txt
index add3a8c..df9cb0c 100644
--- a/src/main/resources/templates/SlingVersionResolver.txt
+++ b/src/main/resources/templates/SlingVersionResolver.txt
@@ -55,10 +55,12 @@ public class SlingVersionResolver implements VersionResolver {
versions.put("org.ops4j.pax.swissbox:pax-swissbox-property", "1.8.3");
versions.put("org.ops4j.pax.url:pax-url-classpath", "2.5.4");
versions.put("org.ops4j.pax.url:pax-url-commons", "2.5.4");
+ versions.put("org.ops4j.pax.tinybundles:tinybundles", "3.0.0");
versions.put("org.slf4j:slf4j-api", "1.7.25");
versions.put("org.slf4j:jcl-over-slf4j", "1.7.25");
versions.put("ch.qos.logback:logback-core", "1.2.3");
- versions.put("ch.qos.logback:logback-classic", "1.2.3");[# th:each="bundle : ${bundles}"]
+ versions.put("ch.qos.logback:logback-classic", "1.2.3");
+ versions.put("biz.aQute.bnd:biz.aQute.bndlib", "3.5.0");[# th:each="bundle : ${bundles}"]
versions.put("[(${bundle.groupId})]:[(${bundle.artifactId})]", "[(${bundle.version})]");
[/] }
diff --git a/src/test/java/org/apache/sling/testing/paxexam/it/tests/SlingOptionsPaxTinybundlesIT.java b/src/test/java/org/apache/sling/testing/paxexam/it/tests/SlingOptionsPaxTinybundlesIT.java
new file mode 100644
index 0000000..5cf3df9
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/paxexam/it/tests/SlingOptionsPaxTinybundlesIT.java
@@ -0,0 +1,48 @@
+/*
+ * 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.it.tests;
+
+import org.apache.sling.testing.paxexam.it.SlingOptionsTestSupport;
+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.paxTinybundles;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class SlingOptionsPaxTinybundlesIT extends SlingOptionsTestSupport {
+
+ @Configuration
+ public Option[] configuration() {
+ return new Option[]{
+ baseConfiguration(),
+ paxTinybundles()
+ };
+ }
+
+ @Test
+ public void test() {
+ }
+
+}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.