Skip to content

Commit

Permalink
HSEARCH-4691 Remove dependency management for dependencies in common …
Browse files Browse the repository at this point in the history
…with Hibernate ORM
  • Loading branch information
yrodiere committed Sep 1, 2022
1 parent a13bd9c commit 9e87ed0
Show file tree
Hide file tree
Showing 29 changed files with 397 additions and 234 deletions.
9 changes: 7 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ updates:
# See b8f044eea92d6f2dd3421779f54b8923e00a26b7
- dependency-name: org.asciidoctor:asciidoctorj-pdf
# We strictly align these dependencies on the version used in Hibernate ORM.
- dependency-name: org.jboss:jandex
- dependency-name: net.bytebuddy:*
- dependency-name: "org.jboss:jandex"
- dependency-name: "javax.persistence:javax.persistence-api"
- dependency-name: "javax.enterprise:cdi-api"
- dependency-name: "jakarta.persistence:jakarta.persistence-api"
- dependency-name: "jakarta.enterprise:jakarta.enterprise.cdi-api"
- dependency-name: "jakarta.xml.bind:jakarta.xml.bind-api"
- dependency-name: "net.bytebuddy:*"
11 changes: 6 additions & 5 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,18 @@
WARNING: All dependencies must have the "provided" scope, in order for the <moduleSet> mechanism
to work correctly. See the comment above for details.
-->
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.javax.persistence}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.org.jboss.spec.javax.transaction.jboss-transaction-api_1.2_spec}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -127,6 +126,8 @@
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.javax.enterprise}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
1 change: 0 additions & 1 deletion distribution/src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@
<outputDirectory>dist/lib/provided</outputDirectory>
<scope>provided</scope>
<includes>
<include>org.jboss.spec.javax.annotation:*</include>
<include>javax.persistence:javax.persistence-api</include>
<include>org.jboss.spec.javax.transaction:*</include>
<include>javax.batch:javax.batch-api</include>
Expand Down
2 changes: 2 additions & 0 deletions integrationtest/mapper/orm-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.javax.enterprise}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
6 changes: 0 additions & 6 deletions integrationtest/mapper/orm-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-util-internal-integrationtest-mapper-orm</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions integrationtest/showcase/library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
</dependency>

<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-util-internal-integrationtest-mapper-orm</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions jakarta/integrationtest/mapper/orm-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.jakarta.enterprise}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 2 additions & 0 deletions jakarta/mapper/orm-batch-jsr352/jberet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.jakarta.enterprise}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
36 changes: 13 additions & 23 deletions jakarta/mapper/orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,47 +36,37 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core-jakarta</artifactId>
<!-- Use `jakarta.activation:jakarta.activation-api` instead of `com.sun.activation:jakarta.activation` in Jakarta EE 10 -->
<exclusions>
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE this dependency. See the version property declaration. -->
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.org.jboss.jandex}</version>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.jakarta.persistence}</version>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.jakarta.enterprise}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
</dependency>
<dependency>
<!-- Necessary for jakarta.transaction, but unfortunately jakarta.transaction
doesn't include the dependency in its POM... -->
<groupId>jakarta.interceptor</groupId>
<artifactId>jakarta.interceptor-api</artifactId>
</dependency>
<dependency>
<!-- Necessary for jakarta.transaction, but unfortunately jakarta.transaction
doesn't include the dependency in its POM... -->
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.jakarta.transaction-api}</version>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.org.hibernate.commons.annotations}</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
Expand All @@ -95,7 +85,7 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE this dependency. See the version property declaration. -->
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.net.bytebuddy}</version>
<scope>test</scope>
</dependency>
Expand Down
41 changes: 41 additions & 0 deletions jakarta/parents/integrationtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,37 @@

<dependencyManagement>
<dependencies>
<!-- Solve dependency convergence issues through exclusions for transitive-only dependencies -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
<!-- DO NOT MANAGE the version of this dependency. -->
<exclusions>
<!-- Also imported by Hibernate ORM -->
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
<!-- Also imported by jakarta.xml.bind-api -->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<!-- DO NOT MANAGE the version of this dependency. -->
<exclusions>
<!-- Also imported by jakarta.xml.bind-api -->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-shaded</artifactId>
Expand All @@ -64,6 +95,16 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-commons</artifactId>
</exclusion>
<!-- We depend on a different version, the one used by Hibernate ORM -->
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<!-- We depend on a different version, the one used by Hibernate ORM -->
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
41 changes: 41 additions & 0 deletions jakarta/parents/internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,37 @@

<dependencyManagement>
<dependencies>
<!-- Solve dependency convergence issues through exclusions for transitive-only dependencies -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
<!-- DO NOT MANAGE the version of this dependency. -->
<exclusions>
<!-- Also imported by Hibernate ORM -->
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
<!-- Also imported by jakarta.xml.bind-api -->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<!-- DO NOT MANAGE the version of this dependency. -->
<exclusions>
<!-- Also imported by jakarta.xml.bind-api -->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-shaded</artifactId>
Expand All @@ -64,6 +95,16 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-commons</artifactId>
</exclusion>
<!-- We depend on a different version, the one used by Hibernate ORM -->
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<!-- We depend on a different version, the one used by Hibernate ORM -->
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
41 changes: 41 additions & 0 deletions jakarta/parents/public/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,37 @@

<dependencyManagement>
<dependencies>
<!-- Solve dependency convergence issues through exclusions for transitive-only dependencies -->
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
<!-- DO NOT MANAGE the version of this dependency. -->
<exclusions>
<!-- Also imported by Hibernate ORM -->
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
<!-- Also imported by jakarta.xml.bind-api -->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<!-- DO NOT MANAGE the version of this dependency. -->
<exclusions>
<!-- Also imported by jakarta.xml.bind-api -->
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.jberet</groupId>
<artifactId>jberet-core</artifactId>
Expand All @@ -59,6 +90,16 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-commons</artifactId>
</exclusion>
<!-- We depend on a different version, the one used by Hibernate ORM -->
<exclusion>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</exclusion>
<!-- We depend on a different version, the one used by Hibernate ORM -->
<exclusion>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand Down
14 changes: 8 additions & 6 deletions jakarta/util/internal/integrationtest/jberet-se/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.batch</groupId>
<artifactId>javax.batch-api</artifactId>
<groupId>jakarta.batch</groupId>
<artifactId>jakarta.batch-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.jakarta.enterprise}</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
7 changes: 7 additions & 0 deletions jakarta/util/internal/test/orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-util-internal-test-common</artifactId>
<exclusions>
<!-- This conflicts with jakarta.annotation, already imported by Hibernate ORM. -->
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

Expand Down
2 changes: 2 additions & 0 deletions mapper/orm-batch-jsr352/jberet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<!-- DO NOT REMOVE and DO NOT MANAGE the version of this dependency. See the version property declaration. -->
<version>${version.javax.enterprise}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 9e87ed0

Please sign in to comment.