We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9687f50 commit e8faf59Copy full SHA for e8faf59
gradle/plugin/src/functionalTest/java/org/hibernate/tool/gradle/test/func/utils/FuncTestTemplate.java
@@ -37,7 +37,16 @@ protected File getHibernatePropertiesFile() {
37
}
38
39
protected String getHibernatePropertiesContents() {
40
- return HIBERNATE_PROPERTIES_CONTENTS.replace("${projectDir}", projectDir.getAbsolutePath());
+ try {
41
+ Properties properties = new Properties();
42
+ properties.load(new StringReader(HIBERNATE_PROPERTIES_CONTENTS));
43
+ properties.setProperty("hibernate.connection.url", "jdbc:h2:" + new File(projectDir, DATABASE_PATH));
44
+ StringWriter writer = new StringWriter();
45
+ properties.store(writer, null);
46
+ return writer.toString();
47
+ } catch (IOException e) {
48
+ throw new RuntimeException(e);
49
+ }
50
51
52
protected void copyDatabase() {
0 commit comments