Skip to content

Commit 8678753

Browse files
committed
Not even the right plugin
1 parent 42af8fc commit 8678753

File tree

4 files changed

+49
-23
lines changed

4 files changed

+49
-23
lines changed

pom.xml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@
142142
<version>1.4</version>
143143
</dependency>
144144
<dependency>
145-
<groupId>org.hsqldb</groupId>
146-
<artifactId>hsqldb</artifactId>
147-
<version>2.2.7</version>
145+
<groupId>org.apache.derby</groupId>
146+
<artifactId>derby</artifactId>
147+
<version>10.8.2.2</version>
148148
</dependency>
149149
</dependencies>
150150
<build>
@@ -154,23 +154,33 @@
154154
<groupId>org.codehaus.mojo</groupId>
155155
<artifactId>hibernate3-maven-plugin</artifactId>
156156
<version>2.2</version>
157-
<configuration>
158-
<components>
159-
<component>
160-
<name>hbm2ddl</name>
161-
<implementation>annotationconfiguration</implementation>
162-
</component>
163-
</components>
164-
<componentProperties>
165-
<export>true</export>
166-
<jdk5>true</jdk5>
167-
<drop>true</drop>
168-
<create>true</create>
169-
<haltonerror>false</haltonerror>
170-
<autocommit>false</autocommit>
171-
<format>true</format>
172-
</componentProperties>
173-
</configuration>
157+
<executions>
158+
<execution>
159+
<phase>generate-sources</phase>
160+
<goals>
161+
<goal>hbm2java</goal>
162+
</goals>
163+
<inherited>false</inherited>
164+
<configuration>
165+
<components>
166+
<component>
167+
<name>hbm2ddl</name>
168+
<implementation>annotationconfiguration</implementation>
169+
</component>
170+
</components>
171+
<componentProperties>
172+
<export>true</export>
173+
<jdk5>true</jdk5>
174+
<drop>true</drop>
175+
<create>true</create>
176+
<haltonerror>false</haltonerror>
177+
<autocommit>false</autocommit>
178+
<format>true</format>
179+
</componentProperties>
180+
</configuration>
181+
</execution>
182+
</executions>
183+
174184
</plugin>
175185
</plugins>
176186
</build>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.goeswhere.frameworkgame.blogapp.dao;
2+
3+
public class PostDao {
4+
5+
}

src/main/resources/hibernate.cfg.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE hibernate-configuration PUBLIC " //Hibernate/Hibernate Configuration DTD 3.0//EN"
3+
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
4+
<hibernate-configuration>
5+
<session-factory>
6+
<mapping class="com.goeswhere.frameworkgame.blogapp.domain.Post"/>
7+
<mapping class="com.goeswhere.frameworkgame.blogapp.domain.Comment"/>
8+
<mapping class="com.goeswhere.frameworkgame.blogapp.domain.Category"/>
9+
</session-factory>
10+
</hibernate-configuration>
11+

src/main/resources/spring/appContext-main.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
<tx:annotation-driven transaction-manager="transactionManager" />
5050

5151
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
52-
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
53-
<property name="url" value="jdbc:hsqldb:hsql:mem:blogapp" />
52+
<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" />
53+
<property name="url" value="jdbc:derby:blogapp;create=true" />
5454
<property name="username" value="sa" />
5555
<property name="password" value="" />
5656
</bean>
@@ -59,7 +59,7 @@
5959
<property name="dataSource" ref="dataSource" />
6060
<property name="jpaVendorAdapter">
6161
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
62-
<property name="databasePlatform" value="org.hibernate.dialect.HSQLDialect" />
62+
<property name="databasePlatform" value="org.hibernate.dialect.DerbyDialect" />
6363
<property name="showSql" value="true" />
6464
<property name="generateDdl" value="true" />
6565
</bean>

0 commit comments

Comments
 (0)