File tree Expand file tree Collapse file tree 6 files changed +110
-2
lines changed Expand file tree Collapse file tree 6 files changed +110
-2
lines changed Original file line number Diff line number Diff line change 1616<project name =" common" xmlns : ivy =" antlib:org.apache.ivy.ant" >
1717
1818 <property name =" hibernate-tools.version" value =" 7.0.0.CR1" />
19+ <property name =" javaee-api.version" value =" 8.0.1" />
1920 <property name =" jdbc-driver.org" value =" com.h2database" />
2021 <property name =" jdbc-driver.module" value =" h2" />
2122 <property name =" jdbc-driver.version" value =" 2.3.232" />
2627 revision =" ${hibernate-tools.version}"
2728 pathid =" hibernate-tools.path"
2829 inline =" true" />
30+ <ivy : cachepath
31+ organisation =" javax"
32+ module =" javaee-api"
33+ revision =" ${javaee-api.version}"
34+ pathid =" javaee-api.path"
35+ inline =" true" />
2936 <ivy : cachepath
3037 organisation =" ${jdbc-driver.org}"
3138 module =" ${jdbc-driver.module}"
3542
3643 <path id =" classpath" >
3744 <path refid =" hibernate-tools.path" />
45+ <path refid =" javaee-api.path" />
3846 <path refid =" jdbc-driver.path" />
3947 <path location =" ." />
4048 </path >
Original file line number Diff line number Diff line change 1+ import jakarta .persistence .Entity ;
2+ import jakarta .persistence .Id ;
3+
4+ @ Entity
5+ public class Foo {
6+
7+ @ Id
8+ private int id ;
9+ private String bar ;
10+
11+ public int getId () { return id ; }
12+ public void setId (int id ) { this .id = id ; }
13+
14+ public String getBar () { return bar ;}
15+ public void setBar (String bar ) { this .bar = bar ; }
16+
17+ }
Original file line number Diff line number Diff line change 1+ <!--
2+ ~ Copyright 2004 - 2025 Red Hat, Inc.
3+ ~
4+ ~ Licensed under the Apache License, Version 2.0 (the "License");
5+ ~ you may not use this file except in compliance with the License.
6+ ~ You may obtain a copy of the License at
7+ ~
8+ ~ http://www.apache.org/licenses/LICENSE-2.0
9+ ~
10+ ~ Unless required by applicable law or agreed to in writing, software
11+ ~ distributed under the License is distributed on an "AS IS" basis,
12+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ ~ See the License for the specific language governing permissions and
14+ ~ limitations under the License.
15+ -->
16+ <persistence >
17+ <persistence-unit name =" bar" >
18+ <properties >
19+ <property name =" jakarta.persistence.jdbc.driver" value =" org.h2.Driver" />
20+ <property name =" jakarta.persistence.jdbc.url" value =" jdbc:h2:mem:" />
21+ </properties >
22+ <class >Foo</class >
23+ </persistence-unit >
24+ </persistence >
Original file line number Diff line number Diff line change 1+ <!--
2+ ~ Copyright 2004 - 2025 Red Hat, Inc.
3+ ~
4+ ~ Licensed under the Apache License, Version 2.0 (the "License");
5+ ~ you may not use this file except in compliance with the License.
6+ ~ You may obtain a copy of the License at
7+ ~
8+ ~ http://www.apache.org/licenses/LICENSE-2.0
9+ ~
10+ ~ Unless required by applicable law or agreed to in writing, software
11+ ~ distributed under the License is distributed on an "AS IS" basis,
12+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ ~ See the License for the specific language governing permissions and
14+ ~ limitations under the License.
15+ -->
16+ To run this example:
17+ - Have [ Apache Ant] ( https://ant.apache.org ) installed
18+ - Issue ` ant ` from a command-line window
Original file line number Diff line number Diff line change 1+ <!--
2+ ~ Copyright 2004 - 2025 Red Hat, Inc.
3+ ~
4+ ~ Licensed under the Apache License, Version 2.0 (the "License");
5+ ~ you may not use this file except in compliance with the License.
6+ ~ You may obtain a copy of the License at
7+ ~
8+ ~ http://www.apache.org/licenses/LICENSE-2.0
9+ ~
10+ ~ Unless required by applicable law or agreed to in writing, software
11+ ~ distributed under the License is distributed on an "AS IS" basis,
12+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ ~ See the License for the specific language governing permissions and
14+ ~ limitations under the License.
15+ -->
16+ <project name =" jpa" default =" reveng" >
17+
18+ <!-- Include the 'hibernatetool' task definition from the file '../common/included.xml' -->
19+ <include file =" ../common/included.xml" />
20+
21+ <target name =" reveng" depends =" common.compile" >
22+ <hibernatetool destdir =" generated" >
23+ <classpath location =" ." />
24+ <!-- JPA configuration read from 'META-INF/persistence.xml' -->
25+ <jpaconfiguration persistenceunit =" bar" />
26+ <!-- Export the DDL file as an example use of the JPA configuration above -->
27+ <hbm2ddl outputfilename =" bar.sql" />
28+ </hibernatetool >
29+
30+ </target >
31+
32+ </project >
33+
Original file line number Diff line number Diff line change 3737 <maven .deploy.skip>true</maven .deploy.skip>
3838 <maven .install.skip>true</maven .install.skip>
3939 </properties >
40-
41- <profiles >
40+ <dependencies >
41+ <dependency >
42+ <groupId >org.junit.jupiter</groupId >
43+ <artifactId >junit-jupiter-api</artifactId >
44+ <version >5.12.2</version >
45+ <scope >compile</scope >
46+ </dependency >
47+ </dependencies >
48+
49+ <profiles >
4250 <profile >
4351 <id >all</id >
4452 <modules >
You can’t perform that action at this time.
0 commit comments