This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 5a6801b27b8 CAMEL-20792: Revert "camel-jpa - Cleanup (#14182)"
5a6801b27b8 is described below
commit 5a6801b27b808d67a9b78e5cf02126f6206d7d06
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Tue May 21 08:21:55 2024 +0000
CAMEL-20792: Revert "camel-jpa - Cleanup (#14182)"
This reverts commit e2783234e32535d5f06e30c0c48232385e773fe0.
Upgrading JPA needs additional work to make the build and tests stable.
---
components/camel-jpa/pom.xml | 52 +++++++++++++++++++++-
.../camel-jpa/src/main/docs/jpa-component.adoc | 2 +-
parent/pom.xml | 3 +-
3 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/components/camel-jpa/pom.xml b/components/camel-jpa/pom.xml
index 73843128fde..daaafe2afa0 100644
--- a/components/camel-jpa/pom.xml
+++ b/components/camel-jpa/pom.xml
@@ -34,7 +34,7 @@
<properties>
<!-- Needs to be investigated: crashes on CI on s390x -->
<skipTests.s390x>true</skipTests.s390x>
-
<camel.surefire.fork.additional-vmargs>-javaagent:${project.basedir}/target/openjpa-${openjpa-version}.jar
-Xmx3G</camel.surefire.fork.additional-vmargs>
+
<camel.surefire.fork.additional-vmargs>-javaagent:${project.basedir}/target/openjpa-${openjpa-version}-jakarta.jar
-Xmx3G</camel.surefire.fork.additional-vmargs>
<camel.surefire.forkTimeout>240</camel.surefire.forkTimeout>
</properties>
@@ -126,6 +126,11 @@
<profiles>
<profile>
<id>openjpa</id>
+ <activation>
+ <property>
+ <name>!hibernate</name>
+ </property>
+ </activation>
<build>
<pluginManagement>
<plugins>
@@ -183,6 +188,7 @@
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
<version>${openjpa-version}</version>
+ <classifier>jakarta</classifier>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
@@ -203,6 +209,49 @@
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
<version>${openjpa-version}</version>
+ <classifier>jakarta</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>hibernate</id>
+ <activation>
+ <property>
+ <name>hibernate</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-hibernate-persistence-xml</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <phase>generate-test-resources</phase>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>
+
${project.basedir}/src/test/resources/profiles/hibernate/META-INF
+ </directory>
+ </resource>
+ </resources>
+
<outputDirectory>${project.build.testOutputDirectory}/META-INF</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core-jakarta</artifactId>
+ <version>${hibernate-version}</version>
+ <scope>test</scope>
</dependency>
</dependencies>
</profile>
@@ -231,6 +280,7 @@
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
<version>${openjpa-version}</version>
+ <classifier>jakarta</classifier>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
diff --git a/components/camel-jpa/src/main/docs/jpa-component.adoc
b/components/camel-jpa/src/main/docs/jpa-component.adoc
index 5319ca82f03..3c9bb8ae64f 100644
--- a/components/camel-jpa/src/main/docs/jpa-component.adoc
+++ b/components/camel-jpa/src/main/docs/jpa-component.adoc
@@ -17,7 +17,7 @@
The JPA component enables you to store and retrieve Java objects from
persistent storage using EJB 3's Java Persistence Architecture (JPA).
JPA is a standard interface layer that wraps Object/Relational Mapping
-(ORM) products such as OpenJPA, Hibernate, and so on.
+(ORM) products such as OpenJPA, Hibernate, TopLink, and so on.
Maven users will need to add the following dependency to their `pom.xml`
for this component:
diff --git a/parent/pom.xml b/parent/pom.xml
index f7e09835771..7b8fe79894c 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -214,6 +214,7 @@
<hazelcast-version>5.3.7</hazelcast-version>
<hdrhistrogram-version>2.2.1</hdrhistrogram-version>
<hibernate-validator-version>8.0.1.Final</hibernate-validator-version>
+ <hibernate-version>6.3.2.Final</hibernate-version>
<hk2-version>2.6.1</hk2-version>
<hsqldb-version>2.7.2</hsqldb-version>
<httpunit-version>1.7</httpunit-version>
@@ -380,7 +381,7 @@
<olingo4-version>5.0.0</olingo4-version>
<ognl-version>3.4.3</ognl-version>
<openapi-generator>7.5.0</openapi-generator>
- <openjpa-version>4.0.0</openjpa-version>
+ <openjpa-version>3.2.2</openjpa-version>
<opensearch-rest-client-version>2.13.0</opensearch-rest-client-version>
<opensearch-java-client-version>2.10.2</opensearch-java-client-version>
<opensearch-version>2.11.0</opensearch-version>