This plugin provides goals that start/stop Greg Young's event store.
Java
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.mvn/wrapper
es-maven-plugin
es-maven-test
.gitignore
Jenkinsfile
LICENSE
README.md
mvnw
mvnw.cmd
pom.xml

README.md

event-store-maven-plugin

This Maven plugin provides goals that start/stop the event store.

Build Status Maven Central LGPLv3 License Java Development Kit 1.8

Getting started

Just add the plugin to your Maven POM:

<plugin>	
	<groupId>org.fuin.esmp</groupId>
	<artifactId>es-maven-plugin</artifactId>
	<version>0.4.3</version>
	<executions>
		<execution>
			<goals>
				<goal>download</goal>
				<goal>certificate</goal>
				<goal>start</goal>
				<goal>stop</goal>
			</goals>
		</execution>
	</executions>
    <!-- The default argument is '-MemDb' if you don't include the following configuration -->
    <configuration>
    	<!-- Creates a self-signed X509 certificate -->
    	<certificate-file>${project.build.directory}/domain.p12</certificate-file>
    	<!-- Start the event store in-memory with some parameters -->
        <arguments>			         
            <argument>--mem-db=TRUE</argument>
            <argument>--stats-period-sec=3000</argument>
            <argument>--ext-tcp-port=7773</argument>
            <argument>--ext-secure-tcp-port=7779</argument>
            <argument>--certificate-file=${project.build.directory}/domain.p12</argument>
            <argument>--run-projections=All</argument>
            <argument>--log=/tmp/log-eventstore</argument>
        </arguments>
    </configuration>
</plugin>

This will download the latest event store version to the 'target' build directory, create a self-signed certificate and start it before the integration tests will run. After execution the event store will be stopped.

A full example how to use it can be found here: test-project

Remember to name your test class according to Maven Failsafe Plugin's naming pattern.

To execute your integration test use: mvn clean verify or mvn verify

Snapshots

Snapshots can be found on the OSS Sonatype Snapshots Repository.

Add the following to your .m2/settings.xml to enable snapshots in your Maven build:

<pluginRepository>
    <id>sonatype.oss.snapshots</id>
    <name>Sonatype OSS Snapshot Repository</name>
    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
    <releases>
        <enabled>false</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</pluginRepository>