+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-First install the H2 driver using:
-> install -s mvn:com.h2database/h2/1.3.163
-
-Then copy this file to the deploy folder
--->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
-
- <bean id="dataSource" class="org.h2.jdbcx.JdbcDataSource">
- <property name="URL" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE"/>
- <property name="user" value="sa"/>
- <property name="password" value=""/>
- </bean>
-
- <service interface="javax.sql.DataSource" ref="dataSource">
- <service-properties>
- <entry key="osgi.jndi.service.name" value="jdbc/h2ds"/>
- </service-properties>
- </service>
-</blueprint>
</execution>
</executions>
<configuration>
- <url>jdbc:h2:mem:db1;MVCC=TRUE</url>
+ <url>jdbc:h2:mem:db_managed_jpa;MVCC=TRUE</url>
<format>true</format>
<execute>false</execute>
</configuration>
<properties>
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
- <property name="hibernate.connection.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE"/>
+ <property name="hibernate.connection.url" value="jdbc:h2:mem:db_unmanaged_jpa;DB_CLOSE_DELAY=-1;MVCC=TRUE"/>
<property name="hibernate.connection.username" value="sa"/>
<property name="hibernate.connection.password" value=""/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>
-</persistence>
\ No newline at end of file
+</persistence>
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.h2.Driver</property>
- <property name="hibernate.connection.url">jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
+ <property name="hibernate.connection.url">jdbc:h2:mem:db_unmanaged_native;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
jdbc-0.proxool.alias=pool-one
-jdbc-0.proxool.driver-url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE
+jdbc-0.proxool.driver-url=jdbc:h2:mem:db_unmanaged_native;DB_CLOSE_DELAY=-1;MVCC=TRUE
jdbc-0.proxool.driver-class=org.h2.Driver
jdbc-0.user=sa
jdbc-0.password=
jdbc-0.proxool.maximum-connection-count=2
-jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE
\ No newline at end of file
+jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE
{
thread.setContextClassLoader(classLoader);
build((MetadataImplementor)metadataBuilder.build(), options, target);
+ if (handler.getExceptions().size() > 0)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("Hibernate failed:");
+ for (Exception e : handler.getExceptions())
+ {
+ builder.append("\n * ");
+ builder.append(e.getMessage());
+ }
+ String error = builder.toString();
+ getLog().error(error);
+ throw new MojoFailureException(error);
+ }
}
finally
{
thread.setContextClassLoader(contextClassLoader);
- for (Exception e : handler.getExceptions())
- getLog().error(e.getMessage());
/** Track, the content of the generated script */
checkOutputFile(output, tracker);
}