Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>EDIT</strong>: Added a link to a blog post showing how to test Hibernate JPA with Spring and DbUnit.</p> <blockquote> <p>[...] I'd like to have a maven build which create database from entities</p> </blockquote> <p>There is a <a href="http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/" rel="nofollow noreferrer">maven hibernate3 plugin</a> with an <a href="http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/hbm2ddl-mojo.html" rel="nofollow noreferrer">hibernate3:hbm2ddl</a> goal that might help. Coupled with the <a href="http://mojo.codehaus.org/sql-maven-plugin/" rel="nofollow noreferrer">maven sql plugin</a>, it should be possible to create this schema from the generated DDL.</p> <blockquote> <p>[...] then populates initial/dictionary data</p> </blockquote> <p>Again, the <a href="http://mojo.codehaus.org/sql-maven-plugin/" rel="nofollow noreferrer">maven sql plugin</a> could do the job here. Or maybe with <a href="http://dbunit.sourceforge.net/" rel="nofollow noreferrer">DBUnit</a> which is another elegant solution (see the <a href="http://mojo.codehaus.org/dbunit-maven-plugin/" rel="nofollow noreferrer">maven dbunit plugin</a>).</p> <blockquote> <p>and run unit and integration tests.</p> </blockquote> <p>Well, I'm not sure your unit tests should access the database but, for integrations tests, check <a href="http://dbunit.sourceforge.net/" rel="nofollow noreferrer">DBUnit</a> as I said. It's really a very nice tool that allows you to setup up the database in a known state, test tables for expected content after a test execution and put the database back in the initial state. See <a href="http://zenoconsulting.wikidot.com/blog:8" rel="nofollow noreferrer">Testing JPA Hibernate with Spring &amp; DbUnit</a> for a nice example.</p> <blockquote> <p>This process should be fully automated to put this build in CI server (hudson), crating new database from scratch is also appreciate.</p> </blockquote> <p>I think this is feasible.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload