Execution of Genesis during Build

Genesis can be started during within the build process. This may be used to prepare for integration tests.

In Maven this is done via exec-maven-plugin:

	<plugin>
		<groupId>org.codehaus.mojo</groupId>
		<artifactId>exec-maven-plugin</artifactId>
		<executions>
			<execution>
				<id>genesis</id>
				<phase>pre-integration-test</phase>
				<goals>
					<goal>java</goal>
				</goals>
				<configuration>
					<includeProjectDependencies>true</includeProjectDependencies>
					<mainClass>com.puresoltechnologies.genesis.controller.GenesisController</mainClass>
					<arguments>
						<argument>--drop</argument>
						<argument>--migrate</argument>
					</arguments>
				</configuration>
			</execution>
		</executions>
	</plugin>

The implementation above starts both procedures: drop and migrate. It is possible to only start drop or migrate by removing the corresponding line.

As dependencies the implemented component transformators are needed which are to be run, the implemented tracker and the Genesis Controller as well:

	<dependency>
		<groupId>com.puresoltechnologies.genesis</groupId>
		<artifactId>controller</artifactId>
		<version>0.4.0</version>
	</dependency>

All dependencies need to be added in compile or runtime scope.

Fork me on GitHub