You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gg...@apache.org on 2021/02/16 09:36:52 UTC

[karaf] branch karaf-4.2.x updated (1ea8087 -> 729b2fb)

This is an automated email from the ASF dual-hosted git repository.

ggrzybek pushed a change to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git.


    from 1ea8087  Fix SoapExampleTest by importing javax.jws without a range (this package is exported from system)
     new f5369b1  Revert "Improve CDI example with API bundle"
     new 729b2fb  Revert "[KARAF-6434] Add CDI example" - it required OSGi Core R7 (Felix 6)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../features/standard/src/main/feature/feature.xml |  1 -
 examples/karaf-cdi-example/README.md               | 69 ---------------
 .../karaf-cdi-example-api/pom.xml                  | 44 ----------
 .../apache/karaf/examples/cdi/api/MyService.java   | 22 -----
 .../karaf-cdi-example-consumer/pom.xml             | 74 ----------------
 .../examples/cdi/consumer/MyConsumerBean.java      | 37 --------
 .../karaf-cdi-example-features/pom.xml             | 99 ----------------------
 .../src/main/feature/feature.xml                   | 34 --------
 .../karaf-cdi-example-provider/pom.xml             | 74 ----------------
 .../karaf/examples/cdi/provider/MyServiceBean.java | 32 -------
 examples/karaf-cdi-example/pom.xml                 | 42 ---------
 examples/pom.xml                                   |  2 +-
 .../karaf/itests/examples/CdiExampleTest.java      | 41 ---------
 13 files changed, 1 insertion(+), 570 deletions(-)
 delete mode 100644 examples/karaf-cdi-example/README.md
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-api/pom.xml
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-api/src/main/java/org/apache/karaf/examples/cdi/api/MyService.java
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-features/pom.xml
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml
 delete mode 100644 examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java
 delete mode 100644 examples/karaf-cdi-example/pom.xml
 delete mode 100644 itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java


[karaf] 01/02: Revert "Improve CDI example with API bundle"

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggrzybek pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit f5369b184ada3f3adce04c8aa3a6c41271941424
Author: Grzegorz Grzybek <gr...@gmail.com>
AuthorDate: Tue Feb 16 10:34:28 2021 +0100

    Revert "Improve CDI example with API bundle"
    
    This reverts commit 377eede66b193c2e5baa3735d486a3fa587a744a.
---
 examples/karaf-cdi-example/README.md               |  3 +-
 .../karaf-cdi-example-api/pom.xml                  | 44 ----------------------
 .../apache/karaf/examples/cdi/api/MyService.java   | 22 -----------
 .../karaf-cdi-example-consumer/pom.xml             |  2 +-
 .../examples/cdi/consumer/MyConsumerBean.java      |  4 +-
 .../src/main/feature/feature.xml                   |  1 -
 .../karaf-cdi-example-provider/pom.xml             |  5 ---
 .../karaf/examples/cdi/provider/MyServiceBean.java |  4 +-
 examples/karaf-cdi-example/pom.xml                 |  1 -
 .../karaf/itests/examples/CdiExampleTest.java      |  2 +-
 10 files changed, 6 insertions(+), 82 deletions(-)

diff --git a/examples/karaf-cdi-example/README.md b/examples/karaf-cdi-example/README.md
index a93da91..35b7f90 100644
--- a/examples/karaf-cdi-example/README.md
+++ b/examples/karaf-cdi-example/README.md
@@ -29,7 +29,6 @@ In this example, we are using Aries CDI and OpenWebBeans as CDI container.
 
 ## Artifacts
 
-* `karaf-cdi-example-api` provides API (interface) shared between provider and consumer bundles. It allows a decoupling between interface and bean implementation.
 * `karaf-cdi-example-provider` provides an application scope bean and using the `@Service` annotation to register the bean in the Karaf service registry (can be used in another bundle).
 * `karaf-cdi-example-consumer` creates another bean and inject the provider bean from the registry (thanks to the `@Reference` annotation).
 * `karaf-cdi-example-features` provides a Karaf features XML to easily install the example application.
@@ -66,4 +65,4 @@ When you install the consumer feature, you will see:
 
 ```
 Hello world
-```
+```
\ No newline at end of file
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-api/pom.xml b/examples/karaf-cdi-example/karaf-cdi-example-api/pom.xml
deleted file mode 100644
index 032d349..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-api/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.examples</groupId>
-        <artifactId>karaf-cdi-example</artifactId>
-        <version>4.2.11-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>karaf-cdi-example-api</artifactId>
-    <name>Apache Karaf :: Examples :: CDI :: API</name>
-    <packaging>bundle</packaging>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-api/src/main/java/org/apache/karaf/examples/cdi/api/MyService.java b/examples/karaf-cdi-example/karaf-cdi-example-api/src/main/java/org/apache/karaf/examples/cdi/api/MyService.java
deleted file mode 100644
index 50f9bdb..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-api/src/main/java/org/apache/karaf/examples/cdi/api/MyService.java
+++ /dev/null
@@ -1,22 +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.
- */
-package org.apache.karaf.examples.cdi.api;
-
-public interface MyService {
-
-    String greeting(String message);
-
-}
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml b/examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml
index f397989..acad1ae 100644
--- a/examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml
+++ b/examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml
@@ -35,7 +35,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.karaf.examples</groupId>
-            <artifactId>karaf-cdi-example-api</artifactId>
+            <artifactId>karaf-cdi-example-provider</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java b/examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java
index 09483ee..c8ef478 100644
--- a/examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java
+++ b/examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java
@@ -15,7 +15,7 @@
  */
 package org.apache.karaf.examples.cdi.consumer;
 
-import org.apache.karaf.examples.cdi.api.MyService;
+import org.apache.karaf.examples.cdi.provider.MyServiceBean;
 import org.osgi.service.cdi.annotations.Reference;
 
 import javax.enterprise.context.ApplicationScoped;
@@ -28,7 +28,7 @@ public class MyConsumerBean {
 
     @Reference
     @Inject
-    private MyService service;
+    private MyServiceBean service;
 
     public void onStart(@Observes @Initialized(ApplicationScoped.class) Object start) {
         System.out.println(service.greeting("world"));
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml b/examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml
index 00305c1..e7fbbbb 100644
--- a/examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml
+++ b/examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml
@@ -22,7 +22,6 @@
 
     <feature name="karaf-cdi-example-provider" version="${project.version}">
         <feature prerequisite="true">osgi-cdi-owb</feature>
-        <bundle>mvn:org.apache.karaf.examples/karaf-cdi-example-api/${project.version}</bundle>
         <bundle>mvn:org.apache.karaf.examples/karaf-cdi-example-provider/${project.version}</bundle>
     </feature>
 
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml b/examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml
index 8f61179..b6633e3 100644
--- a/examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml
+++ b/examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml
@@ -34,11 +34,6 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.karaf.examples</groupId>
-            <artifactId>karaf-cdi-example-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.cdi</artifactId>
             <version>1.0.0</version>
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java b/examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java
index f404dc5..8a5b141 100644
--- a/examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java
+++ b/examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java
@@ -15,16 +15,14 @@
  */
 package org.apache.karaf.examples.cdi.provider;
 
-import org.apache.karaf.examples.cdi.api.MyService;
 import org.osgi.service.cdi.annotations.Service;
 
 import javax.enterprise.context.ApplicationScoped;
 
 @Service
 @ApplicationScoped
-public class MyServiceBean implements MyService {
+public class MyServiceBean {
 
-    @Override
     public String greeting(String message) {
         return "Hello " + message;
     }
diff --git a/examples/karaf-cdi-example/pom.xml b/examples/karaf-cdi-example/pom.xml
index 5828dc6..75f35d2 100644
--- a/examples/karaf-cdi-example/pom.xml
+++ b/examples/karaf-cdi-example/pom.xml
@@ -33,7 +33,6 @@
     <packaging>pom</packaging>
 
     <modules>
-        <module>karaf-cdi-example-api</module>
         <module>karaf-cdi-example-provider</module>
         <module>karaf-cdi-example-consumer</module>
         <module>karaf-cdi-example-features</module>
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java
index 7425f7d..9493b0b 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java
@@ -31,7 +31,7 @@ public class CdiExampleTest extends BaseTest {
 
         installAndAssertFeature("karaf-cdi-example-provider");
 
-        Object object = getOsgiService("org.apache.karaf.examples.cdi.api.MyService");
+        Object object = getOsgiService("org.apache.karaf.examples.cdi.provider.MyServiceBean");
 
         Assert.assertNotNull(object);
 


[karaf] 02/02: Revert "[KARAF-6434] Add CDI example" - it required OSGi Core R7 (Felix 6)

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggrzybek pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 729b2fbd59894606efbf21e791c8e72da4064dd0
Author: Grzegorz Grzybek <gr...@gmail.com>
AuthorDate: Tue Feb 16 10:35:46 2021 +0100

    Revert "[KARAF-6434] Add CDI example" - it required OSGi Core R7 (Felix 6)
    
    This reverts commit c93475a7258b69b178e9821a253455358f9668a8.
---
 .../features/standard/src/main/feature/feature.xml |  1 -
 examples/karaf-cdi-example/README.md               | 68 ---------------
 .../karaf-cdi-example-consumer/pom.xml             | 74 ----------------
 .../examples/cdi/consumer/MyConsumerBean.java      | 37 --------
 .../karaf-cdi-example-features/pom.xml             | 99 ----------------------
 .../src/main/feature/feature.xml                   | 33 --------
 .../karaf-cdi-example-provider/pom.xml             | 69 ---------------
 .../karaf/examples/cdi/provider/MyServiceBean.java | 30 -------
 examples/karaf-cdi-example/pom.xml                 | 41 ---------
 examples/pom.xml                                   |  2 +-
 .../karaf/itests/examples/CdiExampleTest.java      | 41 ---------
 11 files changed, 1 insertion(+), 494 deletions(-)

diff --git a/assemblies/features/standard/src/main/feature/feature.xml b/assemblies/features/standard/src/main/feature/feature.xml
index 50544af..69ae837 100644
--- a/assemblies/features/standard/src/main/feature/feature.xml
+++ b/assemblies/features/standard/src/main/feature/feature.xml
@@ -112,7 +112,6 @@ pax-wicket=mvn:org.ops4j.pax.wicket/pax-wicket-features/RELEASE/xml/features
 ecf=http://download.eclipse.org/rt/ecf/RELEASE/site.p2/karaf-features.xml
 decanter=mvn:org.apache.karaf.decanter/apache-karaf-decanter/RELEASE/xml/features
 eclipsesource-jaxrs=mvn:com.eclipsesource.jaxrs/features/RELEASE/xml/features
-aries-cdi=mvn:org.apache.aries.cdi/aries-cdi-feature/RELEASE/xml/features
 aries-jpa=mvn:org.apache.aries.jpa/jpa-features/RELEASE/xml/features
 aries-rsa=mvn:org.apache.aries.rsa/rsa-features/RELEASE/xml/features
 hibernate=mvn:org.hibernate/hibernate-osgi/RELEASE/xml/karaf
diff --git a/examples/karaf-cdi-example/README.md b/examples/karaf-cdi-example/README.md
deleted file mode 100644
index 35b7f90..0000000
--- a/examples/karaf-cdi-example/README.md
+++ /dev/null
@@ -1,68 +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.
--->
-# Apache Karaf CDI Example
-
-## Abstract
-
-It's possible to use CDI in your applications, including sharing bean between bundles using the Karaf service registry.
-
-In addition of supporting the regular CDI annotations (`@ApplicationScoped`, `@Inject`, etc), Karaf CDI also supports
-couple of new OSGi CDI annotations: `@Service` and `@Reference`.
-
-In this example, we are using Aries CDI and OpenWebBeans as CDI container.
-
-## Artifacts
-
-* `karaf-cdi-example-provider` provides an application scope bean and using the `@Service` annotation to register the bean in the Karaf service registry (can be used in another bundle).
-* `karaf-cdi-example-consumer` creates another bean and inject the provider bean from the registry (thanks to the `@Reference` annotation).
-* `karaf-cdi-example-features` provides a Karaf features XML to easily install the example application.
-
-##Build 
-
-Simply use:
-
-```
-mvn clean install
-```
-
-##Feature and Deployment
-
-On a running Karaf instance, you register the CDI example features repository with:
-
-```
-karaf@root()> feature:repo-add mvn:org.apache.karaf.examples/karaf-cdi-example-features/LATEST/xml
-```
-
-Then you can install the `karaf-cdi-example-provider` feature:
-
-```
-karaf@root()> feature:install karaf-cdi-example-provider
-```
-
-Then, you can install the `karaf-cdi-example-consumer` feature:
-
-```
-karaf@root()> feature:install karaf-cdi-example-consumer
-```
-
-When you install the consumer feature, you will see:
-
-```
-Hello world
-```
\ No newline at end of file
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml b/examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml
deleted file mode 100644
index acad1ae..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-consumer/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.examples</groupId>
-        <artifactId>karaf-cdi-example</artifactId>
-        <version>4.2.11-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>karaf-cdi-example-consumer</artifactId>
-    <name>Apache Karaf :: Examples :: CDI :: Consumer</name>
-    <packaging>bundle</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.karaf.examples</groupId>
-            <artifactId>karaf-cdi-example-provider</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.service.cdi</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-atinject_1.0_spec</artifactId>
-            <version>1.2</version>
-        </dependency>
-        <dependency>
-            <groupId>jakarta.enterprise</groupId>
-            <artifactId>jakarta.enterprise.cdi-api</artifactId>
-            <version>2.0.2</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <!-- Waiting https://issues.apache.org/jira/browse/FELIX-6337 -->
-                <version>4.2.1</version>
-                <configuration>
-                    <instructions>
-                        <_cdiannotations>*;discover=annotated</_cdiannotations>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java b/examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java
deleted file mode 100644
index c8ef478..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-consumer/src/main/java/org/apache/karaf/examples/cdi/consumer/MyConsumerBean.java
+++ /dev/null
@@ -1,37 +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.
- */
-package org.apache.karaf.examples.cdi.consumer;
-
-import org.apache.karaf.examples.cdi.provider.MyServiceBean;
-import org.osgi.service.cdi.annotations.Reference;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.context.Initialized;
-import javax.enterprise.event.Observes;
-import javax.inject.Inject;
-
-@ApplicationScoped
-public class MyConsumerBean {
-
-    @Reference
-    @Inject
-    private MyServiceBean service;
-
-    public void onStart(@Observes @Initialized(ApplicationScoped.class) Object start) {
-        System.out.println(service.greeting("world"));
-    }
-
-}
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-features/pom.xml b/examples/karaf-cdi-example/karaf-cdi-example-features/pom.xml
deleted file mode 100644
index dfd68c4..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-features/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.examples</groupId>
-        <artifactId>karaf-cdi-example</artifactId>
-        <version>4.2.11-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>karaf-cdi-example-features</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Karaf :: Examples :: CDI :: Features</name>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/feature</directory>
-                <filtering>true</filtering>
-                <targetPath>${project.build.directory}/feature</targetPath>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>resources</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--
-            <plugin>
-                <groupId>org.apache.karaf.tooling</groupId>
-                <artifactId>karaf-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>verify</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>verify</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor>
-                            </descriptors>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-artifacts</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attach-artifact</goal>
-                        </goals>
-                        <configuration>
-                            <artifacts>
-                                <artifact>
-                                    <file>target/feature/feature.xml</file>
-                                    <type>xml</type>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml b/examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml
deleted file mode 100644
index e7fbbbb..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-features/src/main/feature/feature.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    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.
--->
-<features name="karaf-cdi-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">
-
-    <repository>mvn:org.apache.aries.cdi/aries-cdi-feature/1.1.3/xml/features</repository>
-
-    <feature name="karaf-cdi-example-provider" version="${project.version}">
-        <feature prerequisite="true">osgi-cdi-owb</feature>
-        <bundle>mvn:org.apache.karaf.examples/karaf-cdi-example-provider/${project.version}</bundle>
-    </feature>
-
-    <feature name="karaf-cdi-example-consumer" version="${project.version}">
-        <feature prerequisite="true">karaf-cdi-example-provider</feature>
-        <bundle>mvn:org.apache.karaf.examples/karaf-cdi-example-consumer/${project.version}</bundle>
-    </feature>
-
-</features>
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml b/examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml
deleted file mode 100644
index b6633e3..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-provider/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.examples</groupId>
-        <artifactId>karaf-cdi-example</artifactId>
-        <version>4.2.11-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>karaf-cdi-example-provider</artifactId>
-    <name>Apache Karaf :: Examples :: CDI :: Provider</name>
-    <packaging>bundle</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.service.cdi</artifactId>
-            <version>1.0.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-atinject_1.0_spec</artifactId>
-            <version>1.2</version>
-        </dependency>
-        <dependency>
-            <groupId>jakarta.enterprise</groupId>
-            <artifactId>jakarta.enterprise.cdi-api</artifactId>
-            <version>2.0.2</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <!-- Waiting https://issues.apache.org/jira/browse/FELIX-6337 -->
-                <version>4.2.1</version>
-                <configuration>
-                    <instructions>
-                        <_cdiannotations>*;discover=annotated</_cdiannotations>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
diff --git a/examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java b/examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java
deleted file mode 100644
index 8a5b141..0000000
--- a/examples/karaf-cdi-example/karaf-cdi-example-provider/src/main/java/org/apache/karaf/examples/cdi/provider/MyServiceBean.java
+++ /dev/null
@@ -1,30 +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.
- */
-package org.apache.karaf.examples.cdi.provider;
-
-import org.osgi.service.cdi.annotations.Service;
-
-import javax.enterprise.context.ApplicationScoped;
-
-@Service
-@ApplicationScoped
-public class MyServiceBean {
-
-    public String greeting(String message) {
-        return "Hello " + message;
-    }
-
-}
diff --git a/examples/karaf-cdi-example/pom.xml b/examples/karaf-cdi-example/pom.xml
deleted file mode 100644
index 75f35d2..0000000
--- a/examples/karaf-cdi-example/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <!--
-
-        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.
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.karaf.examples</groupId>
-        <artifactId>apache-karaf-examples</artifactId>
-        <version>4.2.11-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>karaf-cdi-example</artifactId>
-    <name>Apache Karaf :: Examples :: CDI</name>
-    <packaging>pom</packaging>
-
-    <modules>
-        <module>karaf-cdi-example-provider</module>
-        <module>karaf-cdi-example-consumer</module>
-        <module>karaf-cdi-example-features</module>
-    </modules>
-
-</project>
diff --git a/examples/pom.xml b/examples/pom.xml
index d41455f..427fa1a 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -38,7 +38,7 @@
         <module>karaf-branding-example</module>
         <module>karaf-bundle-example</module>
         <module>karaf-camel-example</module>
-        <module>karaf-cdi-example</module>
+        <!-- <module>karaf-cdi-example</module> -->
         <module>karaf-command-example</module>
         <module>karaf-config-example</module>
         <module>karaf-deployer-example</module>
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java
deleted file mode 100644
index 9493b0b..0000000
--- a/itests/test/src/test/java/org/apache/karaf/itests/examples/CdiExampleTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed 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.karaf.itests.examples;
-
-import org.apache.karaf.itests.BaseTest;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.junit.PaxExam;
-import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
-import org.ops4j.pax.exam.spi.reactors.PerClass;
-
-@RunWith(PaxExam.class)
-@ExamReactorStrategy(PerClass.class)
-public class CdiExampleTest extends BaseTest {
-
-    @Test
-    public void test() throws Exception {
-        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-cdi-example-features/" + System.getProperty("karaf.version") + "/xml");
-
-        installAndAssertFeature("karaf-cdi-example-provider");
-
-        Object object = getOsgiService("org.apache.karaf.examples.cdi.provider.MyServiceBean");
-
-        Assert.assertNotNull(object);
-
-        installAndAssertFeature("karaf-cdi-example-consumer");
-    }
-
-}