DATACMNS-1159 - Upgrade to OpenWebBeans 2.0.1.

This commit is contained in:
Mark Paluch
2017-09-18 15:05:47 +02:00
parent 687d7449be
commit a8cc4783bf
3 changed files with 23 additions and 25 deletions

12
pom.xml
View File

@@ -72,8 +72,8 @@
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
<artifactId>javax.annotation-api</artifactId>
<version>${javax-annotation-api}</version>
<optional>true</optional>
</dependency>
@@ -157,7 +157,7 @@
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>${cdi}</version>
<version>2.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
@@ -185,13 +185,13 @@
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>${cdi}</version>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans.test</groupId>
<artifactId>cditest-owb</artifactId>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-se</artifactId>
<version>${webbeans}</version>
<scope>test</scope>
</dependency>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2011 the original author or authors.
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,35 +15,39 @@
*/
package org.springframework.data.repository.cdi;
import org.apache.webbeans.cditest.CdiTestContainer;
import org.apache.webbeans.cditest.CdiTestContainerLoader;
import javax.enterprise.inject.se.SeContainer;
import javax.enterprise.inject.se.SeContainerInitializer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
/**
* CDI extension integration test using OpenWebbeans.
*
*
* @author Oliver Gierke
* @author Mark Paluch
*/
public class WebbeansCdiRepositoryExtensionSupportIntegrationTests extends
CdiRepositoryExtensionSupportIntegrationTests {
public class WebbeansCdiRepositoryExtensionSupportIntegrationTests
extends CdiRepositoryExtensionSupportIntegrationTests {
static CdiTestContainer container;
private static SeContainer container;
@BeforeClass
public static void setUp() throws Exception {
public static void setUp() {
container = CdiTestContainerLoader.getCdiContainer();
container.bootContainer();
container = SeContainerInitializer.newInstance() //
.disableDiscovery() //
.addPackages(SampleRepository.class) //
.initialize();
}
@Override
protected <T> T getBean(Class<T> type) {
return container.getInstance(type);
return container.select(type).get();
}
@AfterClass
public static void tearDown() throws Exception {
container.shutdownContainer();
public static void tearDown() {
container.close();
}
}

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>