From 9056b3dd38274e68b72eb42f4c5c446776524f04 Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Mon, 24 Aug 2026 07:52:04 +0200 Subject: [PATCH 1/5] felix.eventadmin: Replace dead SpringSource JUnit bundle --- .../eventadmin/ittests/AbstractTest.java | 44 +------------------ .../perftests/PerformanceTestIT.java | 39 +--------------- 2 files changed, 3 insertions(+), 80 deletions(-) diff --git a/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java b/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java index 325c0da94f..7d1724173b 100644 --- a/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java +++ b/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/ittests/AbstractTest.java @@ -17,7 +17,6 @@ package org.apache.felix.eventadmin.ittests; import static org.junit.Assert.assertNotNull; -import static org.ops4j.pax.exam.Constants.START_LEVEL_SYSTEM_BUNDLES; import static org.ops4j.pax.exam.CoreOptions.bundle; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.options; @@ -41,7 +40,6 @@ import org.ops4j.pax.exam.CoreOptions; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.options.AbstractDelegateProvisionOption; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.event.Event; @@ -267,9 +265,7 @@ public static Option[] configuration() { CoreOptions.bundle( bundleFile.toURI().toString() ), mavenBundle("org.ops4j.pax.url", "pax-url-mvn", "1.3.5") ), - // below is instead of normal Pax Exam junitBundles() to deal - // with build server issue - new DirectURLJUnitBundlesOption(), + mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.12_1"), systemProperty("pax.exam.invoker").value("junit"), //vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"), bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link") @@ -322,40 +318,4 @@ private void execute() { } - /** - * Clone of Pax Exam's JunitBundlesOption which uses a direct - * URL to the SpringSource JUnit bundle to avoid some weird - * repository issues on the Apache build server. - */ - private static class DirectURLJUnitBundlesOption - extends AbstractDelegateProvisionOption { - - /** - * Constructor. - */ - public DirectURLJUnitBundlesOption(){ - super( - bundle("http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.9.0/com.springsource.org.junit-4.9.0.jar") - ); - noUpdate(); - startLevel(START_LEVEL_SYSTEM_BUNDLES); - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return String.format("DirectURLJUnitBundlesOption{url=%s}", getURL()); - } - - /** - * {@inheritDoc} - */ - @Override - protected DirectURLJUnitBundlesOption itself() { - return this; - } - - } -} \ No newline at end of file +} diff --git a/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/perftests/PerformanceTestIT.java b/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/perftests/PerformanceTestIT.java index 3613a5b0cc..37b936abce 100644 --- a/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/perftests/PerformanceTestIT.java +++ b/eventadmin/impl/src/test/java/org/apache/felix/eventadmin/perftests/PerformanceTestIT.java @@ -16,7 +16,6 @@ */ package org.apache.felix.eventadmin.perftests; -import static org.ops4j.pax.exam.Constants.START_LEVEL_SYSTEM_BUNDLES; import static org.ops4j.pax.exam.CoreOptions.bundle; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.options; @@ -44,7 +43,6 @@ import org.ops4j.pax.exam.CoreOptions; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.options.AbstractDelegateProvisionOption; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; @@ -97,9 +95,7 @@ public static Option[] configuration() { CoreOptions.bundle(bundleFile.toURI().toString()), mavenBundle("org.ops4j.pax.url", "pax-url-mvn", "1.3.5") ), - // below is instead of normal Pax Exam junitBundles() to deal - // with build server issue - new DirectURLJUnitBundlesOption(), + mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.12_1"), systemProperty("pax.exam.invoker").value("junit"), bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link") ); @@ -303,37 +299,4 @@ public void unregister() { registration.unregister(); } } - - - private static class DirectURLJUnitBundlesOption - extends AbstractDelegateProvisionOption { - - /** - * Constructor. - */ - public DirectURLJUnitBundlesOption(){ - super( - bundle("http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.9.0/com.springsource.org.junit-4.9.0.jar") - ); - noUpdate(); - startLevel(START_LEVEL_SYSTEM_BUNDLES); - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return String.format("DirectURLJUnitBundlesOption{url=%s}", getURL()); - } - - /** - * {@inheritDoc} - */ - @Override - protected DirectURLJUnitBundlesOption itself() { - return this; - } - - } } From a918bb59584e96d333fe454531f15a4df991ce2f Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Mon, 24 Aug 2026 07:55:23 +0200 Subject: [PATCH 2/5] ipojo: Replace SpringSource Servlet bundle --- ipojo/distributions/ipojo-webconsole-quicktart/pom.xml | 10 ++-------- .../src/main/assembly/distribution.xml | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml index b578c5b7bc..83096bfe43 100644 --- a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml +++ b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml @@ -90,8 +90,8 @@ javax.servlet - com.springsource.javax.servlet - 2.4.0 + javax.servlet-api + 4.0.1 org.osgi @@ -116,12 +116,6 @@ ow2.releases http://repository.ow2.org/nexus/content/groups/public/ - - - com.springsource.repository.libraries.external - SpringSource Enterprise Bundle Repository - External Library Releases - http://repository.springsource.com/maven/bundles/external - diff --git a/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml b/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml index 20e8bf1a83..7bd609cb7a 100644 --- a/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml +++ b/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml @@ -45,7 +45,7 @@ *:org.apache.felix.*:jar - javax.servlet:com.springsource.javax.servlet:* + javax.servlet:javax.servlet-api:* org.osgi:org.osgi.compendium:* org.json:org.ow2.chameleon.commons.json:* commons-io:commons-io:* @@ -56,4 +56,4 @@ - \ No newline at end of file + From d777b4de3416dc3b84b149a582e0c064d445744d Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Mon, 24 Aug 2026 07:59:16 +0200 Subject: [PATCH 3/5] ipojo: Replace SpringSource Hamcrest bundles --- .../apache/felix/ipojo/handler/jmx/test/Common.java | 13 +------------ .../ipojo/handler/transaction/test/Common.java | 13 +------------ .../felix/ipojo/handler/whiteboard/test/Common.java | 13 +------------ 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/ipojo/handler/jmx/jmx-handler-it/src/it/jmx-it/src/test/java/org/apache/felix/ipojo/handler/jmx/test/Common.java b/ipojo/handler/jmx/jmx-handler-it/src/it/jmx-it/src/test/java/org/apache/felix/ipojo/handler/jmx/test/Common.java index 971fe0c3da..58a1fa67d1 100644 --- a/ipojo/handler/jmx/jmx-handler-it/src/it/jmx-it/src/test/java/org/apache/felix/ipojo/handler/jmx/test/Common.java +++ b/ipojo/handler/jmx/jmx-handler-it/src/it/jmx-it/src/test/java/org/apache/felix/ipojo/handler/jmx/test/Common.java @@ -27,7 +27,6 @@ import org.junit.Before; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.CoreOptions; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.options.CompositeOption; @@ -87,12 +86,7 @@ public Option[] config() throws IOException { public static Option junitAndMockitoBundles() { return new DefaultCompositeOption( - // Repository required to load harmcrest (OSGi-fied version). - repository("http://repository.springsource.com/maven/bundles/external").id( - "com.springsource.repository.bundles.external"), - - // Hamcrest with a version matching the range expected by Mockito - mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"), + mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.11_2"), // Mockito core does not includes Hamcrest mavenBundle("org.mockito", "mockito-core", "1.9.5"), @@ -101,11 +95,6 @@ public static Option junitAndMockitoBundles() { wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2")) .exports("*;version=1.2"), - // The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of - // 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets - // resolved correctly. - CoreOptions.junitBundles(), - /* * Felix has implicit boot delegation enabled by default. It conflicts with Mockito: * java.lang.LinkageError: loader constraint violation in interface itable initialization: diff --git a/ipojo/handler/transaction/transaction-handler-it/src/it/transaction-it/src/test/java/org/apache/felix/ipojo/handler/transaction/test/Common.java b/ipojo/handler/transaction/transaction-handler-it/src/it/transaction-it/src/test/java/org/apache/felix/ipojo/handler/transaction/test/Common.java index 87aa4c1244..906d360252 100644 --- a/ipojo/handler/transaction/transaction-handler-it/src/it/transaction-it/src/test/java/org/apache/felix/ipojo/handler/transaction/test/Common.java +++ b/ipojo/handler/transaction/transaction-handler-it/src/it/transaction-it/src/test/java/org/apache/felix/ipojo/handler/transaction/test/Common.java @@ -27,7 +27,6 @@ import org.junit.Before; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.CoreOptions; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.options.CompositeOption; @@ -70,12 +69,7 @@ public class Common { public static Option junitAndMockitoBundles() { return new DefaultCompositeOption( - // Repository required to load harmcrest (OSGi-fied version). - repository("http://repository.springsource.com/maven/bundles/external").id( - "com.springsource.repository.bundles.external"), - - // Hamcrest with a version matching the range expected by Mockito - mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"), + mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.11_2"), // Mockito core does not includes Hamcrest mavenBundle("org.mockito", "mockito-core", "1.9.5"), @@ -84,11 +78,6 @@ public static Option junitAndMockitoBundles() { wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2")) .exports("*;version=1.2"), - // The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of - // 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets - // resolved correctly. - CoreOptions.junitBundles(), - /* * Felix has implicit boot delegation enabled by default. It conflicts with Mockito: * java.lang.LinkageError: loader constraint violation in interface itable initialization: diff --git a/ipojo/handler/whiteboard/whiteboard-handler-it/src/it/whiteboard-it/src/test/java/org/apache/felix/ipojo/handler/whiteboard/test/Common.java b/ipojo/handler/whiteboard/whiteboard-handler-it/src/it/whiteboard-it/src/test/java/org/apache/felix/ipojo/handler/whiteboard/test/Common.java index e5c6725023..262524d983 100644 --- a/ipojo/handler/whiteboard/whiteboard-handler-it/src/it/whiteboard-it/src/test/java/org/apache/felix/ipojo/handler/whiteboard/test/Common.java +++ b/ipojo/handler/whiteboard/whiteboard-handler-it/src/it/whiteboard-it/src/test/java/org/apache/felix/ipojo/handler/whiteboard/test/Common.java @@ -27,7 +27,6 @@ import org.junit.Before; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.CoreOptions; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.options.CompositeOption; @@ -87,12 +86,7 @@ public Option[] config() throws IOException { public static Option junitAndMockitoBundles() { return new DefaultCompositeOption( - // Repository required to load harmcrest (OSGi-fied version). - repository("http://repository.springsource.com/maven/bundles/external").id( - "com.springsource.repository.bundles.external"), - - // Hamcrest with a version matching the range expected by Mockito - mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"), + mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.11_2"), // Mockito core does not includes Hamcrest mavenBundle("org.mockito", "mockito-core", "1.9.5"), @@ -101,11 +95,6 @@ public static Option junitAndMockitoBundles() { wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2")) .exports("*;version=1.2"), - // The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of - // 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets - // resolved correctly. - CoreOptions.junitBundles(), - /* * Felix has implicit boot delegation enabled by default. It conflicts with Mockito: * java.lang.LinkageError: loader constraint violation in interface itable initialization: From e766d6c7aed913b17616d4107da70a2f73f6ff18 Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Mon, 24 Aug 2026 08:03:29 +0200 Subject: [PATCH 4/5] ipojo: Remove obsolete OW2 repository --- ipojo/distributions/ipojo-webconsole-quicktart/pom.xml | 8 -------- .../src/main/assembly/distribution.xml | 1 - 2 files changed, 9 deletions(-) diff --git a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml index 83096bfe43..3b2c6c9f3f 100644 --- a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml +++ b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml @@ -110,14 +110,6 @@ - - - - ow2.releases - http://repository.ow2.org/nexus/content/groups/public/ - - - diff --git a/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml b/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml index 7bd609cb7a..391f342ddf 100644 --- a/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml +++ b/ipojo/distributions/ipojo-webconsole-quicktart/src/main/assembly/distribution.xml @@ -47,7 +47,6 @@ *:org.apache.felix.*:jar javax.servlet:javax.servlet-api:* org.osgi:org.osgi.compendium:* - org.json:org.ow2.chameleon.commons.json:* commons-io:commons-io:* commons-fileupload:*:* From 3a0c9d85c642e8c469bd31a7bafa583bd629742e Mon Sep 17 00:00:00 2001 From: Vaclav Haisman Date: Mon, 24 Aug 2026 08:08:33 +0200 Subject: [PATCH 5/5] ipojo: Use released Web Console plugin --- ipojo/distributions/ipojo-webconsole-quicktart/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml index 3b2c6c9f3f..bfa84fe2a7 100644 --- a/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml +++ b/ipojo/distributions/ipojo-webconsole-quicktart/pom.xml @@ -66,7 +66,7 @@ org.apache.felix org.apache.felix.ipojo.webconsole - 1.7.0-SNAPSHOT + 1.7.0 org.apache.felix