Created
May 21, 2012 23:52
-
-
Save rmannibucau/2765467 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ejb/pom.xml b/ejb/pom.xml | |
index 7e73f14..6b32f74 100644 | |
--- a/ejb/pom.xml | |
+++ b/ejb/pom.xml | |
@@ -90,9 +90,9 @@ | |
<plugin> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<configuration> | |
- <excludes> | |
+ <!--excludes> | |
<exclude>com/acme/ejb/calc/MortgageCalculatorEnvEntryTestCase.java</exclude> | |
- </excludes> | |
+ </excludes--> | |
</configuration> | |
</plugin> | |
</plugins> | |
diff --git a/jpa-lite/pom.xml b/jpa-lite/pom.xml | |
index 1397f5e..bb7e77d 100644 | |
--- a/jpa-lite/pom.xml | |
+++ b/jpa-lite/pom.xml | |
@@ -32,8 +32,8 @@ | |
</dependency> | |
<dependency> | |
- <groupId>org.jboss.arquillian</groupId> | |
- <artifactId>arquillian-junit</artifactId> | |
+ <groupId>org.jboss.arquillian.junit</groupId> | |
+ <artifactId>arquillian-junit-container</artifactId> | |
</dependency> | |
</dependencies> | |
@@ -76,19 +76,17 @@ | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<dependencies> | |
- <dependency> | |
- <groupId>org.jboss.arquillian.container</groupId> | |
- <artifactId>arquillian-openejb-embedded-3.1</artifactId> | |
- </dependency> | |
- <dependency> | |
- <groupId>org.apache.openejb</groupId> | |
- <artifactId>openejb-core</artifactId> | |
- </dependency> | |
- <dependency> | |
- <groupId>javax.inject</groupId> | |
- <artifactId>javax.inject</artifactId> | |
- <version>1</version> | |
- </dependency> | |
+ <dependency> | |
+ <groupId>${project.groupId}</groupId> | |
+ <artifactId>container-bom-openejb-embedded-4</artifactId> | |
+ <type>pom</type> | |
+ <scope>test</scope> | |
+ </dependency> | |
+ <dependency> | |
+ <groupId>org.apache.openejb</groupId> | |
+ <artifactId>openejb-core</artifactId> | |
+ <version>4.0.0-beta-3-SNAPSHOT</version> | |
+ </dependency> | |
</dependencies> | |
<build> | |
<testResources> | |
@@ -102,51 +100,60 @@ | |
<directory>src/test/resources-openejb-embedded-openjpa</directory> | |
</testResource> | |
</testResources> | |
+ <plugins> | |
+ <plugin> <!-- needed otherwise it will not work at runtime --> | |
+ <groupId>org.apache.openjpa</groupId> | |
+ <artifactId>openjpa-maven-plugin</artifactId> | |
+ <version>2.2.0</version> | |
+ <configuration> | |
+ <includes>com/acme/jpa/Game.class,com/acme/jpa/LineItem.class,com/acme/jpa/Record.class</includes> | |
+ <persistenceXmlFile>src/test/resources-openejb-embedded-openjpa/test-persistence.xml</persistenceXmlFile> | |
+ <addDefaultConstructor>true</addDefaultConstructor> | |
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions> | |
+ </configuration> | |
+ <executions> | |
+ <execution> | |
+ <id>enhancer</id> | |
+ <phase>process-classes</phase> | |
+ <goals> | |
+ <goal>enhance</goal> | |
+ </goals> | |
+ </execution> | |
+ </executions> | |
+ <dependencies> | |
+ <dependency> | |
+ <groupId>org.apache.openjpa</groupId> | |
+ <artifactId>openjpa</artifactId> | |
+ <version>2.2.0</version> | |
+ </dependency> | |
+ </dependencies> | |
+ </plugin> | |
+ </plugins> | |
</build> | |
</profile> | |
<profile> | |
<id>arq-openejb-embedded-hibernate</id> | |
<dependencies> | |
- <dependency> | |
- <groupId>org.jboss.arquillian.container</groupId> | |
- <artifactId>arquillian-openejb-embedded-3.1</artifactId> | |
- </dependency> | |
- <dependency> | |
- <groupId>org.apache.openejb</groupId> | |
- <artifactId>openejb-core</artifactId> | |
- <exclusions> | |
- <exclusion> | |
- <groupId>org.apache.openjpa</groupId> | |
- <artifactId>openjpa</artifactId> | |
- </exclusion> | |
- </exclusions> | |
- </dependency> | |
- <dependency> | |
- <groupId>javax.inject</groupId> | |
- <artifactId>javax.inject</artifactId> | |
- <version>1</version> | |
- </dependency> | |
- <dependency> | |
- <groupId>org.hibernate</groupId> | |
- <artifactId>hibernate-entitymanager</artifactId> | |
- <version>3.4.0.GA</version> | |
- <scope>test</scope> | |
- <exclusions> | |
- <exclusion> | |
- <groupId>javax.persistence</groupId> | |
- <artifactId>persistence-api</artifactId> | |
- </exclusion> | |
- <exclusion> | |
- <groupId>javax.transaction</groupId> | |
- <artifactId>jta</artifactId> | |
- </exclusion> | |
- </exclusions> | |
- </dependency> | |
- <dependency> | |
- <groupId>org.slf4j</groupId> | |
- <artifactId>slf4j-jdk14</artifactId> | |
- </dependency> | |
+ <dependency> | |
+ <groupId>${project.groupId}</groupId> | |
+ <artifactId>container-bom-openejb-embedded-4</artifactId> | |
+ <type>pom</type> | |
+ <scope>test</scope> | |
+ </dependency> | |
+ <dependency> | |
+ <groupId>org.apache.openejb</groupId> | |
+ <artifactId>openejb-core-hibernate</artifactId> | |
+ <version>4.0.0-beta-3-SNAPSHOT</version> | |
+ <type>pom</type> | |
+ <scope>test</scope> | |
+ </dependency> | |
+ <dependency> <!-- openejb-core:3.1.4 by inheritance so forcing the version --> | |
+ <groupId>org.apache.openejb</groupId> | |
+ <artifactId>openejb-core</artifactId> | |
+ <version>4.0.0-beta-3-SNAPSHOT</version> | |
+ <scope>test</scope> | |
+ </dependency> | |
</dependencies> | |
<build> | |
<testResources> | |
@@ -167,28 +174,27 @@ | |
<id>arq-openejb-embedded-eclipselink</id> | |
<dependencies> | |
<dependency> | |
- <groupId>org.jboss.arquillian.container</groupId> | |
- <artifactId>arquillian-openejb-embedded-3.1</artifactId> | |
- </dependency> | |
- <dependency> | |
- <groupId>org.apache.openejb</groupId> | |
- <artifactId>openejb-core</artifactId> | |
- <exclusions> | |
- <exclusion> | |
- <groupId>org.apache.openjpa</groupId> | |
- <artifactId>openjpa</artifactId> | |
- </exclusion> | |
- </exclusions> | |
+ <groupId>${project.groupId}</groupId> | |
+ <artifactId>container-bom-openejb-embedded-4</artifactId> | |
+ <type>pom</type> | |
+ <scope>test</scope> | |
</dependency> | |
- <dependency> | |
- <groupId>javax.inject</groupId> | |
- <artifactId>javax.inject</artifactId> | |
- <version>1</version> | |
+ <dependency> <!-- openejb-core:3.1.4 by inheritance so forcing the version --> | |
+ <groupId>org.apache.openejb</groupId> | |
+ <artifactId>openejb-core</artifactId> | |
+ <version>4.0.0-beta-3-SNAPSHOT</version> | |
+ <scope>test</scope> | |
+ <exclusions> | |
+ <exclusion> | |
+ <groupId>org.apache.openjpa</groupId> | |
+ <artifactId>openjpa</artifactId> | |
+ </exclusion> | |
+ </exclusions> | |
</dependency> | |
<dependency> | |
<groupId>org.eclipse.persistence</groupId> | |
<artifactId>eclipselink</artifactId> | |
- <version>1.1.2</version> | |
+ <version>2.3.0</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
diff --git a/jpa-lite/src/test/java/com/acme/jpa/GamePersistenceTestCase.java b/jpa-lite/src/test/java/com/acme/jpa/GamePersistenceTestCase.java | |
index df718b2..5097336 100644 | |
--- a/jpa-lite/src/test/java/com/acme/jpa/GamePersistenceTestCase.java | |
+++ b/jpa-lite/src/test/java/com/acme/jpa/GamePersistenceTestCase.java | |
@@ -22,7 +22,7 @@ import java.util.List; | |
import javax.ejb.EJB; | |
-import org.jboss.arquillian.api.Deployment; | |
+import org.jboss.arquillian.container.test.api.Deployment; | |
import org.jboss.arquillian.junit.Arquillian; | |
import org.jboss.shrinkwrap.api.Archive; | |
import org.jboss.shrinkwrap.api.ShrinkWrap; | |
diff --git a/jpa-lite/src/test/java/com/acme/jpa/PersistenceServiceTestCase.java b/jpa-lite/src/test/java/com/acme/jpa/PersistenceServiceTestCase.java | |
index 3c51588..151caaf 100644 | |
--- a/jpa-lite/src/test/java/com/acme/jpa/PersistenceServiceTestCase.java | |
+++ b/jpa-lite/src/test/java/com/acme/jpa/PersistenceServiceTestCase.java | |
@@ -8,7 +8,7 @@ import java.util.List; | |
import javax.ejb.EJB; | |
-import org.jboss.arquillian.api.Deployment; | |
+import org.jboss.arquillian.container.test.api.Deployment; | |
import org.jboss.arquillian.junit.Arquillian; | |
import org.jboss.shrinkwrap.api.ShrinkWrap; | |
import org.jboss.shrinkwrap.api.spec.JavaArchive; | |
diff --git a/jpa-lite/src/test/java/com/acme/jpa/RepositoryTestCase.java b/jpa-lite/src/test/java/com/acme/jpa/RepositoryTestCase.java | |
index 444e212..8b5e5ce 100644 | |
--- a/jpa-lite/src/test/java/com/acme/jpa/RepositoryTestCase.java | |
+++ b/jpa-lite/src/test/java/com/acme/jpa/RepositoryTestCase.java | |
@@ -6,7 +6,7 @@ import java.util.List; | |
import javax.ejb.EJB; | |
-import org.jboss.arquillian.api.Deployment; | |
+import org.jboss.arquillian.container.test.api.Deployment; | |
import org.jboss.arquillian.junit.Arquillian; | |
import org.jboss.shrinkwrap.api.ShrinkWrap; | |
import org.jboss.shrinkwrap.api.spec.JavaArchive; | |
@@ -65,11 +65,11 @@ public class RepositoryTestCase { | |
@Test | |
public void lazy_load_should_fail_outside_of_removed_ejb() { | |
Record record = repository.retrieveById(Record.class, idOfFirstRecord); | |
- repository.close(); | |
- // Some JPA providers (EclipseLink) allow LAZY relationships to be accessed after session is closed | |
int expected = service.isLazyLoadingPermittedOnClosedSession() ? 1 : 0; | |
int numLineItems = 0; | |
try { | |
+ repository.close(); | |
+ // Some JPA providers (EclipseLink) allow LAZY relationships to be accessed after session is closed | |
numLineItems = record.getLineItems().size(); | |
} catch (Exception e) { | |
} | |
diff --git a/parent/pom.xml b/parent/pom.xml | |
index 27c7975..0156f46 100644 | |
--- a/parent/pom.xml | |
+++ b/parent/pom.xml | |
@@ -40,7 +40,7 @@ | |
<version.junit>4.8.1</version.junit> | |
<version.log4j>1.2.14</version.log4j> | |
<version.openejb>3.1.4</version.openejb> | |
- <version.openejb_4>4.0.0</version.openejb_4> | |
+ <version.openejb_4>4.0.0-beta-3-SNAPSHOT</version.openejb_4> | |
<version.openwebbeans>1.1.1</version.openwebbeans> | |
<version.resin>4.0.20</version.resin> | |
<version.resteasy>2.0.1.GA</version.resteasy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment