File tree Expand file tree Collapse file tree 5 files changed +84
-1
lines changed Expand file tree Collapse file tree 5 files changed +84
-1
lines changed Original file line number Diff line number Diff line change 5
5
<modelVersion >4.0.0</modelVersion >
6
6
7
7
<groupId >org.hibernate.tool.test</groupId >
8
- <artifactId >hbm2ddl </artifactId >
8
+ <artifactId >generateHbm </artifactId >
9
9
<version >0.0.1-SNAPSHOT</version >
10
10
11
11
<properties >
Original file line number Diff line number Diff line change
1
+ invoker.java.version = 1.8+
2
+ invoker.goals = generate-resources
Original file line number Diff line number Diff line change
1
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" >
2
+
3
+ <modelVersion >4.0.0</modelVersion >
4
+
5
+ <groupId >org.hibernate.tool.test</groupId >
6
+ <artifactId >transformHbm</artifactId >
7
+ <version >0.0.1-SNAPSHOT</version >
8
+
9
+
10
+ <properties >
11
+ <h2 .version>1.4.200</h2 .version>
12
+ <sql .version>1.5</sql .version>
13
+ <hibernate .version>7.0.0-SNAPSHOT</hibernate .version>
14
+ </properties >
15
+
16
+ <build >
17
+ <plugins >
18
+ <plugin >
19
+ <groupId >org.hibernate.tool</groupId >
20
+ <artifactId >hibernate-tools-maven</artifactId >
21
+ <version >${hibernate.version} </version >
22
+ <dependencies >
23
+ <dependency >
24
+ <groupId >org.hibernate.tool</groupId >
25
+ <artifactId >hibernate-tools-orm</artifactId >
26
+ <version >${hibernate.version} </version >
27
+ </dependency >
28
+ </dependencies >
29
+ <executions >
30
+ <execution >
31
+ <id >transformHbm</id >
32
+ <phase >generate-sources</phase >
33
+ <goals >
34
+ <goal >hbm2orm</goal >
35
+ </goals >
36
+ <configuration >
37
+ <ejb3 >true</ejb3 >
38
+ </configuration >
39
+ </execution >
40
+ </executions >
41
+ </plugin >
42
+
43
+ </plugins >
44
+ </build >
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+ </project >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" standalone =" no" ?>
2
+ <!-- Generated 18 jul. 2024 12:32:47 by Hibernate Tools 6.6.0-SNAPSHOT --> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
3
+ <hibernate-mapping >
4
+ <class catalog =" BARDB" name =" Foo" optimistic-lock =" none" schema =" PUBLIC" table =" FOO" >
5
+ <id name =" id" type =" int" >
6
+ <column name =" ID" />
7
+ <generator class =" assigned" />
8
+ </id >
9
+ <property name =" baz" type =" string" >
10
+ <column length =" 256" name =" BAZ" />
11
+ </property >
12
+ </class >
13
+ </hibernate-mapping >
Original file line number Diff line number Diff line change
1
+ import java.io.* ;
2
+
3
+ File file = new File (basedir, " src/main/resources/Foo.mapping.xml" );
4
+ if (! file. isFile()) {
5
+ throw new FileNotFoundException (" Could not find generated HBM file: " + file);
6
+ }
You can’t perform that action at this time.
0 commit comments