This is an automated email from the ASF dual-hosted git repository. amichair pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-rsa.git
commit 846d40538f102986ef0512f51a049765d93acb79 Author: Amichai Rothman <[email protected]> AuthorDate: Tue May 19 08:53:14 2026 +0300 Upgrade to pax-exam 4.14.0, hamcrest 2.2, awaitility 4.3.0 --- discovery/zookeeper/pom.xml | 6 +----- itests/felix/pom.xml | 17 +++++++++++++++ .../apache/aries/rsa/itests/felix/RsaTestBase.java | 24 +++++++++++++--------- itests/pom.xml | 13 ++++++++++++ parent/pom.xml | 20 ++++++++---------- 5 files changed, 53 insertions(+), 27 deletions(-) diff --git a/discovery/zookeeper/pom.xml b/discovery/zookeeper/pom.xml index eb4ce083..93674ef5 100644 --- a/discovery/zookeeper/pom.xml +++ b/discovery/zookeeper/pom.xml @@ -113,11 +113,7 @@ <artifactId>mockito-core</artifactId> <scope>test</scope> </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> - <scope>test</scope> - </dependency> + <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.converter</artifactId> diff --git a/itests/felix/pom.xml b/itests/felix/pom.xml index d2012279..7f79beef 100644 --- a/itests/felix/pom.xml +++ b/itests/felix/pom.xml @@ -265,6 +265,23 @@ <version>7.0.5</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.framework</artifactId> + <version>1.10.0</version> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + </dependency> + <dependency> + <groupId>org.ops4j.pax.url</groupId> + <artifactId>pax-url-wrap</artifactId> + <version>2.6.14</version> + <classifier>uber</classifier> + <scope>test</scope> + </dependency> <dependency> <groupId>org.apache.servicemix.bundles</groupId> diff --git a/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java b/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java index 09af4933..3b243654 100644 --- a/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java +++ b/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java @@ -18,12 +18,12 @@ */ package org.apache.aries.rsa.itests.felix; -import static org.ops4j.pax.exam.CoreOptions.bundle; import static org.ops4j.pax.exam.CoreOptions.composite; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.systemProperty; import static org.ops4j.pax.exam.CoreOptions.vmOption; import static org.ops4j.pax.exam.CoreOptions.when; +import static org.ops4j.pax.exam.CoreOptions.wrappedBundle; import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.newConfiguration; import java.io.IOException; @@ -33,6 +33,7 @@ import java.net.ServerSocket; import javax.inject.Inject; import org.ops4j.pax.exam.CoreOptions; +import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; import org.ops4j.pax.exam.options.OptionalCompositeOption; @@ -108,17 +109,20 @@ public class RsaTestBase { ); } - /** - * We create our own junit option to also provide hamcrest and Awaitility support - */ protected static Option junit() { - // based on CoreOptions.junitBundles() + // we use a custom configuration and not CoreOptions.junitBundles + // because so hamcrest is not too old and not too new for awaitility + String junitVersion = MavenUtils.getArtifactVersion("junit", "junit"); + String hamcrestVersion = MavenUtils.getArtifactVersion("org.hamcrest", "hamcrest"); return composite( - systemProperty("pax.exam.invoker").value("junit"), - bundle("link:classpath:META-INF/links/org.ops4j.pax.tipi.junit.link"), - bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link"), - mvn("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.hamcrest"), - mvn("org.awaitility", "awaitility")); + wrappedBundle(mavenBundle("junit", "junit", junitVersion)).instructions( + "Bundle-SymbolicName=junit", + "Export-Package=org.junit.*;version=" + junitVersion + ",junit.*;version=" + junitVersion, + "Import-Package=org.hamcrest;version=\"" + hamcrestVersion + + "\",org.hamcrest.core;version=\"" + hamcrestVersion + "\"" + ), + mvn("org.hamcrest", "hamcrest"), + mvn("org.awaitility", "awaitility")); } protected static Option rsaCore() { diff --git a/itests/pom.xml b/itests/pom.xml index e768310f..ac1d1c61 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -74,6 +74,19 @@ <artifactId>pax-exam-link-mvn</artifactId> <version>${exam.version}</version> </dependency> + + <dependency> + <groupId>org.ops4j.pax.tinybundles</groupId> + <artifactId>tinybundles</artifactId> + <version>4.0.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>biz.aQute.bnd</groupId> + <artifactId>biz.aQute.bndlib</artifactId> + <version>${bnd.version}</version> + <scope>test</scope> + </dependency> </dependencies> </dependencyManagement> diff --git a/parent/pom.xml b/parent/pom.xml index 12ac546c..6cc7eb33 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -40,7 +40,7 @@ <logback.version>1.5.32</logback.version> <hawtdispatch.version>1.22</hawtdispatch.version> <hawtbuf.version>1.11</hawtbuf.version> - <exam.version>4.13.5</exam.version> + <exam.version>4.14.0</exam.version> <paxlogging.version>2.3.3</paxlogging.version> </properties> @@ -100,18 +100,14 @@ <exclusions> <exclusion> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - </exclusion> - <exclusion> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-core</artifactId> + <artifactId>hamcrest</artifactId> </exclusion> </exclusions> </dependency> <dependency> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.hamcrest</artifactId> - <version>1.3_1</version> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <scope>test</scope> </dependency> </dependencies> @@ -229,8 +225,8 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> - <version>1.3</version> + <artifactId>hamcrest</artifactId> + <version>2.2</version> <scope>test</scope> </dependency> <dependency> @@ -242,7 +238,7 @@ <dependency> <groupId>org.awaitility</groupId> <artifactId>awaitility</artifactId> - <version>3.1.6</version> + <version>4.3.0</version> <scope>test</scope> </dependency> <dependency>
