File tree Expand file tree Collapse file tree 6 files changed +45
-25
lines changed Expand file tree Collapse file tree 6 files changed +45
-25
lines changed Original file line number Diff line number Diff line change 4545 <cloneProjectsTo >${project.build.directory} /it</cloneProjectsTo >
4646 <settingsFile >src/it/settings.xml</settingsFile >
4747 <localRepositoryPath >${project.build.directory} /local-repo</localRepositoryPath >
48- <postBuildHookScript >verify</postBuildHookScript >
4948 <goal >install</goal >
5049 </configuration >
5150 <executions >
5655 </goals >
5756 </execution >
5857 </executions >
59- </plugin >
58+ <dependencies >
59+ <dependency >
60+ <groupId >com.h2database</groupId >
61+ <artifactId >h2</artifactId >
62+ <version >${h2.version} </version >
63+ </dependency >
64+ </dependencies >
65+ </plugin >
6066 </plugins >
6167 </build >
6268
Original file line number Diff line number Diff line change 2323 <artifactId >generateHbm</artifactId >
2424 <version >0.0.1-SNAPSHOT</version >
2525
26- <properties >
27- <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
28- <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
29-
30- <java .version>1.8</java .version>
31- <h2 .version>1.4.195</h2 .version>
32- </properties >
26+ <dependencies >
27+ <dependency >
28+ <!-- DB Driver of your choice -->
29+ <groupId >com.h2database</groupId >
30+ <artifactId >h2</artifactId >
31+ <version >@h2.version@</version >
32+ </dependency >
33+ </dependencies >
3334
3435 <build >
3536 <plugins >
5354 <configuration >
5455 <revengFile >${project.basedir} /src/main/resources/hibernate.reveng.xml</revengFile >
5556 </configuration >
56- <dependencies >
57- <dependency >
58- <!-- DB Driver of your choice -->
59- <groupId >com.h2database</groupId >
60- <artifactId >h2</artifactId >
61- <version >${h2.version} </version >
62- </dependency >
63- </dependencies >
6457 </plugin >
6558 </plugins >
6659 </build >
Original file line number Diff line number Diff line change 1515 * See the License for the specific language governing permissions and
1616 * limitations under the License.
1717 */
18- import java.io.* ;
19-
2018File file = new File(basedir, "target/generated-sources/Person.hbm.xml");
2119if (!file.isFile()) {
2220 throw new FileNotFoundException("Could not find generated HBM file: " + file);
Original file line number Diff line number Diff line change 1+ /*
2+ * Hibernate Tools, Tooling for your Hibernate Projects
3+ *
4+ * Copyright 2018-2025 Red Hat, Inc.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" basis,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
18+ import java.sql.DriverManager;
19+ import java.sql.Connection;
20+
21+ String JDBC_CONNECTION = "jdbc:h2:" + basedir + "/test";
22+ String CREATE_PERSON_TABLE = "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))";
23+
24+ Connection connection = DriverManager.getConnection(JDBC_CONNECTION);
25+ connection.createStatement().execute(CREATE_PERSON_TABLE);
26+ connection.close();
Original file line number Diff line number Diff line change 1515# See the License for the specific language governing permissions and #
1616# limitations under the License. #
1717# ###########################################################################
18- hibernate.dialect =org.hibernate.dialect.H2Dialect
1918hibernate.connection.driver_class =org.h2.Driver
20- hibernate.connection.url =jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE
21- hibernate.connection.username =sa
22- hibernate.connection.password =
23- hibernate.connection.pool_size =1
24- hibernate.show_sql =true
19+ hibernate.connection.url =jdbc:h2:./test
20+ hibernate.default_catalog =TEST
21+ hibernate.default_schema =PUBLIC
You can’t perform that action at this time.
0 commit comments