bnd 6.2.0
Signed-off-by: Raymond Augé <rotty3000@apache.org>
diff --git a/component-dsl/pom.xml b/component-dsl/pom.xml
index e3c21ea..7d79744 100644
--- a/component-dsl/pom.xml
+++ b/component-dsl/pom.xml
@@ -32,20 +32,8 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- </plugin>
- <plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
- <version>${bnd.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>bnd-process</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
@@ -93,7 +81,7 @@
<connection>scm:git:git@github.com:apache/aries-component-dsl.git</connection>
<developerConnection>scm:git:git@github.com:apache/aries-component-dsl.git</developerConnection>
<url>https://github.com/apache/aries-component-dsl</url>
- <tag>HEAD</tag>
- </scm>
+ <tag>HEAD</tag>
+ </scm>
</project>
\ No newline at end of file
diff --git a/itests/bnd.bnd b/itests/bnd.bnd
deleted file mode 100644
index c7e846e..0000000
--- a/itests/bnd.bnd
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-
-Bundle-Description: Integration Test bundle for component DSL
-
--includepackage:\
- org.apache.aries.component.dsl.*;-split-package:=merge-first
-
-Test-Cases: ${classes;CONCRETE;ANNOTATED;org.junit.Test}
diff --git a/itests/itest.bndrun b/itests/itest.bndrun
index 5bed55c..7dae60f 100644
--- a/itests/itest.bndrun
+++ b/itests/itest.bndrun
@@ -24,13 +24,15 @@
-resolve.effective: resolve, active
+-runrequires: osgi.identity;filter:='(osgi.identity=${project.artifactId}-tests)'
+
# Keep resolution results in sorted order for better diff
-runstartlevel: \
order=sortbynameversion,\
begin=-1
-runbundles: \
- org.apache.aries.component-dsl.itests;version='[2.0.0,2.0.1)',\
+ org.apache.aries.component-dsl.itests-tests;version='[2.0.0,2.0.1)',\
org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\
org.apache.servicemix.bundles.junit;version='[4.13.2,4.13.3)'
diff --git a/itests/pom.xml b/itests/pom.xml
index 29eec2a..5c3d321 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -45,18 +45,19 @@
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.junit</artifactId>
<version>4.13.2_1</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>1.9.22</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.17.100</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
</dependencies>
@@ -64,6 +65,25 @@
<plugins>
<plugin>
<groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-test-jar</id>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <bnd><![CDATA[
+ -includepackage: \
+ org.apache.aries.component.dsl.*;-split-package:=merge-first
+ ]]></bnd>
+ <testCases>junit4</testCases>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
@@ -111,6 +131,13 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff --git a/itests/src/main/java/org/apache/aries/component/dsl/internal/ProbeTests.java b/itests/src/test/java/org/apache/aries/component/dsl/internal/ProbeTests.java
similarity index 92%
rename from itests/src/main/java/org/apache/aries/component/dsl/internal/ProbeTests.java
rename to itests/src/test/java/org/apache/aries/component/dsl/internal/ProbeTests.java
index d975a23..38b6436 100644
--- a/itests/src/main/java/org/apache/aries/component/dsl/internal/ProbeTests.java
+++ b/itests/src/test/java/org/apache/aries/component/dsl/internal/ProbeTests.java
@@ -28,7 +28,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
-import static org.apache.aries.component.dsl.OSGi.just;
import static org.junit.Assert.assertEquals;
/**
@@ -49,16 +48,16 @@
OSGi<String> program =
probeA.flatMap(a ->
- OSGi.onClose(
- () -> result.accumulateAndGet("Hello", (x, y) -> x.replace(y, ""))).
+ OSGi.effects(
+ () -> result.accumulateAndGet("Hello", (x, y) -> x.replace(y, "")), () -> {}).
flatMap(__ -> {
ProbeImpl<String> probeB = new ProbeImpl<>();
probeBreference.set(probeB);
return probeB.flatMap(b ->
- OSGi.onClose(
- () -> result.accumulateAndGet(", World", (x, y) -> x.replace(y, ""))).
+ OSGi.effects(
+ () -> result.accumulateAndGet(", World", (x, y) -> x.replace(y, "")), () -> {}).
then(
OSGi.just(a + b)));
}
@@ -113,9 +112,9 @@
OSGi<Integer> just10 = OSGi.just(10);
OSGi<Integer> program = probeA.flatMap(a ->
- OSGi.onClose(result::incrementAndGet).then(
+ OSGi.effects(result::incrementAndGet, () -> {}).then(
just10.flatMap(b ->
- OSGi.onClose(result::incrementAndGet).then(
+ OSGi.effects(result::incrementAndGet, () -> {}).then(
OSGi.just(a + b)
))));
diff --git a/itests/src/main/java/org/apache/aries/component/dsl/test/AsynchronousTest.java b/itests/src/test/java/org/apache/aries/component/dsl/test/AsynchronousTest.java
similarity index 100%
rename from itests/src/main/java/org/apache/aries/component/dsl/test/AsynchronousTest.java
rename to itests/src/test/java/org/apache/aries/component/dsl/test/AsynchronousTest.java
diff --git a/itests/src/main/java/org/apache/aries/component/dsl/test/CachingServiceReferenceTests.java b/itests/src/test/java/org/apache/aries/component/dsl/test/CachingServiceReferenceTests.java
similarity index 100%
rename from itests/src/main/java/org/apache/aries/component/dsl/test/CachingServiceReferenceTests.java
rename to itests/src/test/java/org/apache/aries/component/dsl/test/CachingServiceReferenceTests.java
diff --git a/itests/src/main/java/org/apache/aries/component/dsl/test/ComponentTest.java b/itests/src/test/java/org/apache/aries/component/dsl/test/ComponentTest.java
similarity index 100%
rename from itests/src/main/java/org/apache/aries/component/dsl/test/ComponentTest.java
rename to itests/src/test/java/org/apache/aries/component/dsl/test/ComponentTest.java
diff --git a/itests/src/main/java/org/apache/aries/component/dsl/test/DSLTest.java b/itests/src/test/java/org/apache/aries/component/dsl/test/DSLTest.java
similarity index 99%
rename from itests/src/main/java/org/apache/aries/component/dsl/test/DSLTest.java
rename to itests/src/test/java/org/apache/aries/component/dsl/test/DSLTest.java
index 4d575d7..540b62c 100644
--- a/itests/src/main/java/org/apache/aries/component/dsl/test/DSLTest.java
+++ b/itests/src/test/java/org/apache/aries/component/dsl/test/DSLTest.java
@@ -869,7 +869,7 @@
CountDownLatch addedLatch = new CountDownLatch(3);
- ServiceTracker serviceTracker = new ServiceTracker<Service, Service>(
+ ServiceTracker<?, ?> serviceTracker = new ServiceTracker<Service, Service>(
bundleContext, Service.class, null) {
@Override
@@ -884,7 +884,7 @@
CountDownLatch deletedLatch = new CountDownLatch(3);
- ServiceTracker serviceTracker2 = new ServiceTracker<Service, Service>(
+ ServiceTracker<?, ?> serviceTracker2 = new ServiceTracker<Service, Service>(
bundleContext, Service.class, null) {
@Override
@@ -1672,7 +1672,9 @@
public void testNestedRecoverAndRethrow() {
ArrayList<Integer> result = new ArrayList<>();
+ @SuppressWarnings("serial")
class A extends RuntimeException {}
+ @SuppressWarnings("serial")
class B extends RuntimeException {}
OSGi<Integer> program = recover(
@@ -1714,7 +1716,9 @@
public void testNestedRecoverWithAndRethrow() {
ArrayList<Integer> result = new ArrayList<>();
+ @SuppressWarnings("serial")
class A extends RuntimeException {}
+ @SuppressWarnings("serial")
class B extends RuntimeException {}
OSGi<Integer> program = recoverWith(
diff --git a/itests/src/test/java/org/apache/aries/component/dsl/test/HashTable.java b/itests/src/test/java/org/apache/aries/component/dsl/test/HashTable.java
new file mode 100644
index 0000000..a07b447
--- /dev/null
+++ b/itests/src/test/java/org/apache/aries/component/dsl/test/HashTable.java
@@ -0,0 +1,38 @@
+/*
+ * 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.aries.component.dsl.test;
+
+import java.util.Hashtable;
+import java.util.function.Consumer;
+
+/**
+ * @author Raymond Augé
+ */
+public class HashTable {
+
+ public static <K, V> Hashtable<K, V> of() {
+ return of(h -> {});
+ }
+
+ public static <K, V> Hashtable<K, V> of(Consumer<Hashtable<K, V>> t) {
+ Hashtable<K, V> hashtable = new Hashtable<>();
+ t.accept(hashtable);
+ return hashtable;
+ }
+
+}
diff --git a/pom.xml b/pom.xml
index e411094..c484046 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,7 @@
<maven.compiler.target>${java.build.version}</maven.compiler.target>
<project.build.outputTimestamp>10</project.build.outputTimestamp>
- <bnd.version>6.1.0</bnd.version>
+ <bnd.version>6.2.0</bnd.version>
</properties>
<build>
@@ -46,26 +46,21 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.10.0</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.2.2</version>
- <configuration>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
+ <version>3.10.0</version><!--$NO-MVN-MAN-VER$-->
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <skipIfEmpty>true</skipIfEmpty>
+ </configuration>
<executions>
<execution>
+ <id>default-jar</id>
<goals>
- <goal>bnd-process</goal>
+ <goal>jar</goal>
</goals>
</execution>
</executions>
@@ -161,7 +156,7 @@
<connection>scm:git:git@github.com:apache/aries-component-dsl.git</connection>
<developerConnection>scm:git:git@github.com:apache/aries-component-dsl.git</developerConnection>
<url>https://github.com/apache/aries-component-dsl</url>
- <tag>HEAD</tag>
- </scm>
+ <tag>HEAD</tag>
+ </scm>
-</project>
\ No newline at end of file
+</project>