Posts Tagged ‘maven maven2 exec execute plugin mojo hsql hsqldb’

Using the maven exec plugin to launch hsqldb

July 31st, 2008 No comments

Below is a short snippet I use to launch hsqldb automatically for unit testing in my java projects.
Biggest limitation to the exec-maven-plugin is that it can’t run processes asynchronous. This way a running application is blocking the maven process flow. A big limitation. I think they should add an option to be able to run the process in a separate process without blocking the flow if needed.

Below is the snippet, I tried to use the windows start command. But it didn’t really work.

					<!-- Execute plugin to launch hsqldb -->
								start java 
									-cp "c:/Documents and Settings/%USERNAME%/.m2/repository/hsqldb/hsqldb/" 
									-database.0 mydb 
									-dbname.0 xdb							-->
							<!-- use start to execute in separate thread -->
							<!-- optional -->
								<argument>"C:/Documents and Settings/%USERNAME%/.m2/repository/hsqldb/hsqldb/"</argument>