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 16
16
<project name =" common" xmlns : ivy =" antlib:org.apache.ivy.ant" >
17
17
18
18
<property name =" hibernate-tools.version" value =" 7.0.0.CR1" />
19
+ <property name =" javaee-api.version" value =" 8.0.1" />
19
20
<property name =" jdbc-driver.org" value =" com.h2database" />
20
21
<property name =" jdbc-driver.module" value =" h2" />
21
22
<property name =" jdbc-driver.version" value =" 2.3.232" />
26
27
revision =" ${hibernate-tools.version}"
27
28
pathid =" hibernate-tools.path"
28
29
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" />
29
36
<ivy : cachepath
30
37
organisation =" ${jdbc-driver.org}"
31
38
module =" ${jdbc-driver.module}"
35
42
36
43
<path id =" classpath" >
37
44
<path refid =" hibernate-tools.path" />
45
+ <path refid =" javaee-api.path" />
38
46
<path refid =" jdbc-driver.path" />
39
47
<path location =" ." />
40
48
</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 37
37
<maven .deploy.skip>true</maven .deploy.skip>
38
38
<maven .install.skip>true</maven .install.skip>
39
39
</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 >
42
50
<profile >
43
51
<id >all</id >
44
52
<modules >
You can’t perform that action at this time.
0 commit comments