Apache Winegrower :: Extension :: CDI

The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users.

License

License

GroupId

GroupId

org.apache.winegrower
ArtifactId

ArtifactId

winegrower-cdi
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Apache Winegrower :: Extension :: CDI
The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users.
Project Organization

Project Organization

The Apache Software Foundation

Download winegrower-cdi

How to add to project

<!-- https://jarcasting.com/artifacts/org.apache.winegrower/winegrower-cdi/ -->
<dependency>
    <groupId>org.apache.winegrower</groupId>
    <artifactId>winegrower-cdi</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.apache.winegrower/winegrower-cdi/
implementation 'org.apache.winegrower:winegrower-cdi:1.0.1'
// https://jarcasting.com/artifacts/org.apache.winegrower/winegrower-cdi/
implementation ("org.apache.winegrower:winegrower-cdi:1.0.1")
'org.apache.winegrower:winegrower-cdi:jar:1.0.1'
<dependency org="org.apache.winegrower" name="winegrower-cdi" rev="1.0.1">
  <artifact name="winegrower-cdi" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.apache.winegrower', module='winegrower-cdi', version='1.0.1')
)
libraryDependencies += "org.apache.winegrower" % "winegrower-cdi" % "1.0.1"
[org.apache.winegrower/winegrower-cdi "1.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.apache.winegrower : winegrower-core jar 1.0.1

provided (4)

Group / Artifact Type Version
org.apache.geronimo.specs : geronimo-jcdi_2.0_spec jar 1.2
org.apache.geronimo.specs : geronimo-interceptor_1.2_spec jar 1.2
org.apache.geronimo.specs : geronimo-atinject_1.0_spec jar 1.2
org.apache.geronimo.specs : geronimo-annotation_1.3_spec jar 1.2

test (2)

Group / Artifact Type Version
org.apache.openwebbeans : openwebbeans-se jar 2.0.17
org.junit.jupiter : junit-jupiter jar 5.7.0

Project Modules

There are no modules declared in this project.

Apache Winegrower

Apache Winegrower is a lightweight and powerful application framework.

It brings the powerful OSGi model without all the issue and help of bundle classloaders. Winegrower fully supports the activator and service model but use an unique classloader.

It supports both OSGi and regular application.

Apache Winegrower provides several packaging options, like standalone jar, exploded jar, docker images. It’s also cloud ready and provides tooling to provision your applications on cloud providers.

Sample

<?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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>mygroupid</groupId>
  <artifactId>mywinegrowerapp-with-shell</artifactId>
  <version>1.0-SNAPSHOT</version>

  <dependencies>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>6.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <version>5.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.winegrower</groupId>
      <artifactId>winegrower-core</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf.shell</groupId>
      <artifactId>org.apache.karaf.shell.core</artifactId>
      <version>4.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf.shell</groupId>
      <artifactId>org.apache.karaf.shell.console</artifactId>
      <version>4.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.25</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.6.0</version>
        <configuration>
          <mainClass>org.apache.winegrower.Ripener</mainClass>
          <systemProperties>
            <systemProperty>
              <key>org.slf4j.simpleLogger.defaultLogLevel</key>
              <value>DEBUG</value>
            </systemProperty>
            <systemProperty>
              <key>org.slf4j.simpleLogger.logFile</key>
              <value>System.out</value>
            </systemProperty>
            <systemProperty>
              <key>karaf.startLocalConsole</key>
              <value>true</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

You can now start Winegrower with:

mvn exec:java

How to add a command? Create a class with this class:

@Service
@Command(name = "hello", scope = "test")
public class MyCommand implements Action {
    public Object execute() throws Exception {
        System.out.println("Hello world");
        return "hello world";
    }
}

Then package it as a normal jar/exploded folder - not even a bundle - and add it in the previous classpath. You can now run "test:hello".

Note that to shortcut the build phase you can use @Header which to define a BundleActivator.

Here is an example:

@Header(name= Constants.BUNDLE_ACTIVATOR, value = "${@class}")
public class MyBundleActivator implements BundleActivator {
    // standard code
}
org.apache.winegrower

The Apache Software Foundation

Versions

Version
1.0.1
1.0.0