Skip to content

Commit af05cf3

Browse files
committed
[CDI2] Use new package structure for CDI2
1 parent f9300bd commit af05cf3

File tree

10 files changed

+21
-22
lines changed

10 files changed

+21
-22
lines changed
+10-11
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
1-
= Cucumber CDI 2
1+
Cucumber CDI 2
2+
==============
23

34
This module relies on CDI Standalone Edition (CDI SE) API to start/stop a CDI container
45
and customize it - adding steps. It looks up the beans/steps in CDI and if not available
56
it instantiates it as POJO with CDI injection support - unmanaged bean.
67

7-
== Setup
8+
## Setup
89

910
To use it, it is important to provide your CDI SE implementation - likely Weld or Apache OpenWebBeans.
1011

1112
For Apache OpenWebBeans the dependency is:
1213

13-
[source,xml]
14-
----
14+
```xml
1515
<dependency>
1616
<groupId>org.apache.openwebbeans</groupId>
1717
<artifactId>openwebbeans-se</artifactId>
1818
<version>2.0.10</version>
1919
<scope>test</scope>
2020
</dependency>
21-
----
21+
22+
```
2223

2324
And for Weld it is:
2425

25-
[source,xml]
26-
----
26+
```xml
2727
<dependency>
2828
<groupId>org.jboss.weld.se</groupId>
2929
<artifactId>weld-se-core</artifactId>
3030
<version>3.1.1.Final</version>
3131
<scope>test</scope>
3232
</dependency>
33-
----
33+
```
3434

3535
To ensure the module is compatible with all implementations and future API version, it does not transitively bring the API.
3636
If you don't know which one to use, you can import the following one but if you develop CDI code you should already have one provided:
3737

38-
[source,xml]
39-
----
38+
```xml
4039
<dependency>
4140
<groupId>javax.enterprise</groupId>
4241
<artifactId>cdi-api</artifactId>
4342
<version>2.0</version>
4443
</dependency>
45-
----
44+
```

cdi2/src/main/java/cucumber/runtime/java/cdi2/Cdi2Factory.java renamed to cdi2/src/main/java/io/cucumber/cdi2/Cdi2Factory.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cucumber.runtime.java.cdi2;
1+
package io.cucumber.cdi2;
22

33
import io.cucumber.core.backend.ObjectFactory;
44

@@ -9,10 +9,10 @@
99
import java.util.HashMap;
1010
import java.util.Map;
1111

12-
public class Cdi2Factory implements ObjectFactory {
12+
public final class Cdi2Factory implements ObjectFactory {
1313

14-
protected SeContainerInitializer initializer;
15-
protected SeContainer container;
14+
private SeContainerInitializer initializer;
15+
private SeContainer container;
1616
private final Map<Class<?>, Unmanaged.UnmanagedInstance<?>> standaloneInstances = new HashMap<>();
1717

1818
@Override
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cucumber.runtime.java.cdi2.Cdi2Factory
1+
io.cucumber.cdi2.Cdi2Factory

cdi2/src/test/java/cucumber/runtime/java/cdi2/Belly.java renamed to cdi2/src/test/java/io/cucumber/cdi2/Belly.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cucumber.runtime.java.cdi2;
1+
package io.cucumber.cdi2;
22

33
import javax.enterprise.context.ApplicationScoped;
44

cdi2/src/test/java/cucumber/runtime/java/cdi2/BellyStepdefs.java renamed to cdi2/src/test/java/io/cucumber/cdi2/BellyStepdefs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cucumber.runtime.java.cdi2;
1+
package io.cucumber.cdi2;
22

33
import cucumber.api.java.en.Given;
44

cdi2/src/test/java/cucumber/runtime/java/cdi2/CDIBellyStepdefs.java renamed to cdi2/src/test/java/io/cucumber/cdi2/CDIBellyStepdefs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cucumber.runtime.java.cdi2;
1+
package io.cucumber.cdi2;
22

33
import cucumber.api.java.en.Then;
44

cdi2/src/test/java/cucumber/runtime/java/cdi2/Cdi2FactoryTest.java renamed to cdi2/src/test/java/io/cucumber/cdi2/Cdi2FactoryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cucumber.runtime.java.cdi2;
1+
package io.cucumber.cdi2;
22

33
import io.cucumber.core.backend.ObjectFactory;
44
import org.junit.Test;

cdi2/src/test/java/cucumber/runtime/java/cdi2/RunCukesTest.java renamed to cdi2/src/test/java/io/cucumber/cdi2/RunCukesTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cucumber.runtime.java.cdi2;
1+
package io.cucumber.cdi2;
22

33
import cucumber.api.junit.Cucumber;
44
import org.junit.runner.RunWith;

cdi2/src/test/java/cucumber/runtime/java/cdi2/UnusedGlue.java renamed to cdi2/src/test/java/io/cucumber/cdi2/UnusedGlue.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cucumber.runtime.java.cdi2;
1+
package io.cucumber.cdi2;
22

33
import cucumber.api.java.Before;
44
import cucumber.api.java.en.Given;

0 commit comments

Comments
 (0)