Skip to content
flurdy edited this page Sep 14, 2010 · 3 revisions

Specific:

Run Jetty

mvn -o -DskipTests jetty:run

Test specific test

mvn -o -Dtest=com.flurdy.grid.snaps.service.SomeServiceTest test

Install to local Maven repository

mvn -o clean install

Install to public Maven repository

mvn clean install deploy

Create DDL of JPA entities

mvn -o -DskipTests -Dhibernate.dialect=org.hibernate.dialect.HSQLDialect \
    -P hbm-export compile hibernate3:hbm2ddl

Create database

mvn -o -P sqlmaven sql:execute

Populate database

mvn -o -P dbunit dbunit:operation

Export database and use as stub data

mvn -o -P dbunit dbunit:export;
cp target/dbunit/export.xml src/test/data/stub.xml

Common Kitchen Sinks:

Clean, rebuild database and run Jetty

mvn -o -DskipTests -Dhibernate.dialect=org.hibernate.dialect.HSQLDialect \
    -P hbm-export,sqlmaven,dbunit \
    clean compile hibernate3:hbm2ddl sql:execute dbunit:operation

Reset database and run Jetty

rm -rf target/db; mvn -o -DskipTests -P sqlmaven,dbunit \
    sql:execute dbunit:operation jetty:run