maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jemos Infra <jemos.in...@googlemail.com>
Subject Re: Maven filter and hsqldb mem hibernate.hbm2ddl.auto
Date Sun, 09 May 2010 18:10:17 GMT
Stephane, the pom doesn't show any filtering / hibernate plugin. 

Regards,

M.

On Sun, 2010-05-09 at 11:03 -0700, Stephane Eybert wrote:
> Hello,
> 
> I have a pom.xml file with a filter for some data source properties.
> 
> The filter works for the data source properties, that is, for:
> 
> hibernate.dialect=org.hibernate.dialect.HSQLDialect
> dataSource.driverClassName=org.hsqldb.jdbcDriver
> dataSource.url=jdbc:hsqldb:mem:testdb
> dataSource.username=sa
> dataSource.password=
> 
> and my integration test is successful.
> 
> But when having also the following property in the filter file
> 
> hibernate.hbm2ddl.auto=create
> 
> I get an error message saying the sql statement could not be performed
> because the table does not exist.
> 
> What happens is that HSQLDB (in memory) does not create my table before
> running the test, if the hibernate.hbm2ddl.auto is in the filter file
> instead of being hard coded in the spring hibernate factory bean.
> 
> But the property hibernate.dialect does not pose such a problem. It is
> happily replaced by the value in the filter file.
> 
> I would like to have the property hibernate.hbm2ddl.auto being replaced by
> the value in the filter file, so as to have a different value, when running
> the integration test in HSQLDB (value should be create) and when running in
> production (value should be validate).
> 
> http://old.nabble.com/file/p28504415/spring-hibernate.xml
> spring-hibernate.xml 
> http://old.nabble.com/file/p28504415/data-source.properties
> data-source.properties  http://old.nabble.com/file/p28504415/pom.xml pom.xml 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message