Skip to content

Commit

Permalink
Fixed dependency exclusions + enhanced logging (#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
tandraschko authored Jan 16, 2024
1 parent 9eadc7e commit c80e191
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ public EntityManager createEntityManager() {
try {
em = delegate().createEntityManager();
} catch (final LinkageError le) {
if (delegate == null) {
LOGGER.error("Could not initialize EntityManagerFactory delegate", le);
throw le; // it's already a OpenEJBRuntimeException
}
em = delegate.createEntityManager();
}

Expand Down
101 changes: 81 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<!-- org.glassfish -->
<version.mojarra>4.0.1</version.mojarra>
<!-- org.hibernate -->
<version.hibernate.orm>6.3.1.Final</version.hibernate.orm>
<version.hibernate.orm>6.4.1.Final</version.hibernate.orm>
<version.hibernate.validator>7.0.5.Final</version.hibernate.validator>

<!-- Other API and Impl. not in Jakarta EE -->
Expand Down Expand Up @@ -1455,6 +1455,10 @@
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -1483,8 +1487,12 @@
<version>${version.geronimo.components}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
<groupId>jakarta.resource</groupId>
<artifactId>jakarta.resource-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.objectweb.howl</groupId>
Expand All @@ -1498,8 +1506,12 @@
<version>${version.geronimo.components}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
<groupId>jakarta.resource</groupId>
<artifactId>jakarta.resource-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.objectweb.howl</groupId>
Expand Down Expand Up @@ -1532,6 +1544,24 @@
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
<version>${version.openjpa}</version>
<exclusions>
<exclusion>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -1780,6 +1810,14 @@
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-finder-shaded</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -1793,8 +1831,8 @@
<version>${version.openwebbeans}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -1803,24 +1841,29 @@
<artifactId>openwebbeans-ejb</artifactId>
<version>${version.openwebbeans}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
</exclusion>

</exclusions>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-ee</artifactId>
<version>${version.openwebbeans}</version>
<exclusions>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-el_2.2_spec</artifactId>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -1833,25 +1876,43 @@
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-finder-shaded</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-el22</artifactId>
<version>${version.openwebbeans}</version>
<exclusions>
<exclusion>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>openwebbeans-ee-common</artifactId>
<groupId>org.apache.openwebbeans</groupId>
<version>${version.openwebbeans}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-atinject_1.0_spec</artifactId>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
38 changes: 36 additions & 2 deletions tomee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,18 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -231,16 +243,32 @@
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcdi_1.0_spec</artifactId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<groupId>org.apache.tomcat</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<artifactId>commons-beanutils</artifactId>
<groupId>commons-beanutils</groupId>
</exclusion>
<exclusion>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -308,6 +336,12 @@
<groupId>org.glassfish</groupId>
<artifactId>jakarta.faces</artifactId>
<version>${version.mojarra}</version>
<exclusions>
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down

0 comments on commit c80e191

Please sign in to comment.