Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency fixes for Hibernate extensions #37460

Merged
merged 2 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 3 additions & 14 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<classmate.version>1.5.1</classmate.version>
<!-- WARNING: When updating, also align other properties on this version:
bytebuddy.version (just below), hibernate-orm.version-for-documentation (in docs/pom.xml)
and antlr.version.version in build-parent/pom.xml
and both hibernate-orm.version and antlr.version in build-parent/pom.xml
WARNING again for diffs that don't provide enough context: when updating, see above -->
<hibernate-orm.version>6.4.0.Final</hibernate-orm.version>
<bytebuddy.version>1.14.7</bytebuddy.version> <!-- Version controlled by Hibernate ORM's needs -->
Expand Down Expand Up @@ -5010,8 +5010,9 @@
<artifactId>hibernate-core</artifactId>
<version>${hibernate-orm.version}</version>
<exclusions>
<!-- We don't want Jandex at runtime -->
<exclusion>
<groupId>org.jboss</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
</exclusion>
</exclusions>
Expand Down Expand Up @@ -5074,10 +5075,6 @@
<version>${hibernate-search.version}</version>
<exclusions>
<!-- We don't want Jandex at runtime -->
<exclusion>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
</exclusion>
<exclusion>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
Expand All @@ -5090,10 +5087,6 @@
<version>${hibernate-search.version}</version>
<exclusions>
<!-- We don't want Jandex at runtime -->
<exclusion>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
</exclusion>
<exclusion>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
Expand All @@ -5106,10 +5099,6 @@
<version>${hibernate-search.version}</version>
<exclusions>
<!-- We don't want Jandex at runtime -->
<exclusion>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
</exclusion>
<exclusion>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@

<!-- MicroProfile TCK versions used to be defined here but have moved to the concrete tck modules -->

<!-- Panache needs to run the hibernate-jpamodelgen annotation processor,
and unfortunately annotation processors are not covered by dependency management -->
<hibernate-orm.version>6.4.0.Final</hibernate-orm.version>
<!-- Antlr 4 is used by the PanacheQL parser but also needs to match the requirements of Hibernate ORM 6.x-->
<antlr.version>4.13.0</antlr.version>

Expand Down
14 changes: 0 additions & 14 deletions extensions/hibernate-envers/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-envers</artifactId>
<!-- We need to repeat the same exclusions applied on hibernate-core -->
<exclusions>
<!-- These XML parsers are banned in the project as we use the new package -->
<exclusion>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</exclusion>

<!-- Following dependencies are only necessary during metadata initialization -->
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
20 changes: 0 additions & 20 deletions extensions/hibernate-orm/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,6 @@
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- ByteBuddy is marked as a "runtime" dependency of Hibernate ORM but we need it to compile the extension -->
<dependency>
Expand Down Expand Up @@ -102,12 +88,6 @@
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
Expand Down
6 changes: 0 additions & 6 deletions extensions/hibernate-search-orm-elasticsearch/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
Expand Down
18 changes: 7 additions & 11 deletions extensions/panache/hibernate-orm-panache-kotlin/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,6 @@
<artifactId>quarkus-panache-common-deployment</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
<!-- Workaround for https://hibernate.atlassian.net/browse/HHH-17362 -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -117,6 +106,13 @@
<goal>kapt</goal>
</goals>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate-orm.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</annotationProcessor>
</annotationProcessors>
Expand Down
32 changes: 7 additions & 25 deletions extensions/panache/hibernate-orm-panache/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,20 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
<!-- Workaround for https://hibernate.atlassian.net/browse/HHH-17362 -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<scope>provided</scope>
</dependency>

<!-- Explicitly provide banned dependencies, in the correct version -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate-orm.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</annotationProcessor>
</annotationProcessors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,15 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
<!-- Workaround for https://hibernate.atlassian.net/browse/HHH-17362 -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-panache-common-deployment</artifactId>
<scope>test</scope>
</dependency>

<!-- Explicitly provide banned dependencies, in the correct version -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>provided</scope>
</dependency>

<!-- Necessary runtime dependency of jpamodelgen,
which needs to be imported explicitly
otherwise it's not available during annotation processing -->
<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
Expand Down Expand Up @@ -130,6 +115,13 @@
<goal>kapt</goal>
</goals>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate-orm.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</annotationProcessor>
</annotationProcessors>
Expand Down
32 changes: 7 additions & 25 deletions extensions/panache/hibernate-reactive-panache/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,38 +52,20 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
<!-- Workaround for https://hibernate.atlassian.net/browse/HHH-17362 -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<scope>provided</scope>
</dependency>

<!-- Explicitly provide banned dependencies, in the correct version -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
<scope>provided</scope>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah these were leftovers of when we weren't using these artifacts.

</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate-orm.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</annotationProcessor>
</annotationProcessors>
Expand Down